81 lines
3.7 KiB
Nix
81 lines
3.7 KiB
Nix
{
|
|
description = "Aptos Fonts";
|
|
|
|
inputs = {
|
|
nixpkgs = {
|
|
url = "nixpkgs/nixos-23.05";
|
|
};
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
|
|
flake-utils.lib.eachDefaultSystem
|
|
(system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
makeFontPackage = (
|
|
name: src:
|
|
pkgs.stdenvNoCC.mkDerivation {
|
|
inherit name src;
|
|
sourceRoot = ".";
|
|
nativeBuildInputs = [
|
|
pkgs.unzip
|
|
];
|
|
installPhase = ''
|
|
mkdir -p $out/share/fonts/truetype
|
|
cp -v *.ttf $out/share/fonts/truetype
|
|
'';
|
|
}
|
|
);
|
|
|
|
in
|
|
{
|
|
packages = {
|
|
aptos = makeFontPackage "aptos" ./files/aptos-maisfontes.85e8.zip;
|
|
aptos-black = makeFontPackage "aptos-black" ./files/aptos-black-maisfontes.cd65.zip;
|
|
aptos-black-italic = makeFontPackage "aptos-black-italic" ./files/aptos-black-italic-maisfontes.d702.zip;
|
|
aptos-bold = makeFontPackage "aptos-bold" ./files/aptos-bold-maisfontes.d829.zip;
|
|
aptos-display = makeFontPackage "aptos-display" ./files/aptos-display-maisfontes.8968.zip;
|
|
aptos-display-bold = makeFontPackage "aptos-display-bold" ./files/aptos-display-bold-maisfontes.7113.zip;
|
|
aptos-display-italic = makeFontPackage "aptos-display-italic" ./files/aptos-display-italic-maisfontes.7bb2.zip;
|
|
aptos-extrabold = makeFontPackage "aptos-extrabold" ./files/aptos-extrabold-maisfontes.3c51.zip;
|
|
aptos-extrabold-italic = makeFontPackage "aptos-extrabold-italic" ./files/aptos-extrabold-italic-maisfontes.f4cf.zip;
|
|
aptos-italic = makeFontPackage "aptos-italic" ./files/aptos-italic-maisfontes.6f24.zip;
|
|
aptos-light = makeFontPackage "aptos-light" ./files/aptos-light-maisfontes.2b30.zip;
|
|
aptos-light-italic = makeFontPackage "aptos-light-italic" ./files/aptos-light-italic-maisfontes.1ddd.zip;
|
|
aptos-mono = makeFontPackage "aptos-mono" ./files/aptos-mono-maisfontes.6033.zip;
|
|
aptos-mono-bold = makeFontPackage "aptos-mono-bold" ./files/aptos-mono-bold-maisfontes.30fd.zip;
|
|
aptos-mono-italic = makeFontPackage "aptos-mono-italic" ./files/aptos-mono-italic-maisfontes.e594.zip;
|
|
aptos-semibold = makeFontPackage "aptos-semibold" ./files/aptos-semibold-maisfontes.5201.zip;
|
|
aptos-semibold-italic = makeFontPackage "aptos-semibold-italic" ./files/aptos-semibold-italic-maisfontes.8f69.zip;
|
|
|
|
aptos-fonts = pkgs.symlinkJoin {
|
|
name = "aptos-fonts";
|
|
paths = [
|
|
self.packages.${system}.aptos
|
|
self.packages.${system}.aptos-black
|
|
self.packages.${system}.aptos-black-italic
|
|
self.packages.${system}.aptos-bold
|
|
self.packages.${system}.aptos-display
|
|
self.packages.${system}.aptos-display-bold
|
|
self.packages.${system}.aptos-display-italic
|
|
self.packages.${system}.aptos-extrabold
|
|
self.packages.${system}.aptos-extrabold-italic
|
|
self.packages.${system}.aptos-italic
|
|
self.packages.${system}.aptos-light
|
|
self.packages.${system}.aptos-light-italic
|
|
self.packages.${system}.aptos-mono
|
|
self.packages.${system}.aptos-mono-bold
|
|
self.packages.${system}.aptos-mono-italic
|
|
self.packages.${system}.aptos-semibold
|
|
self.packages.${system}.aptos-semibold-italic
|
|
];
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|