nixos-aptos/flake.nix

82 lines
3.7 KiB
Nix
Raw Normal View History

2023-08-16 10:56:23 -05:00
{
2023-08-16 11:36:17 -05:00
description = "Aptos Fonts";
2023-08-16 10:56:23 -05:00
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-23.05";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
2023-08-16 11:01:53 -05:00
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
2023-08-16 10:56:23 -05:00
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 = {
2023-08-16 11:36:17 -05:00
aptos = makeFontPackage "aptos" ./files/aptos-maisfontes.85e8.zip;
2023-08-16 10:56:23 -05:00
aptos-black = makeFontPackage "aptos-black" ./files/aptos-black-maisfontes.cd65.zip;
2023-08-16 11:36:17 -05:00
aptos-black-italic = makeFontPackage "aptos-black-italic" ./files/aptos-black-italic-maisfontes.d702.zip;
2023-08-16 10:56:23 -05:00
aptos-bold = makeFontPackage "aptos-bold" ./files/aptos-bold-maisfontes.d829.zip;
2023-08-16 11:36:17 -05:00
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;
2023-08-16 10:56:23 -05:00
aptos-extrabold = makeFontPackage "aptos-extrabold" ./files/aptos-extrabold-maisfontes.3c51.zip;
2023-08-16 11:36:17 -05:00
aptos-extrabold-italic = makeFontPackage "aptos-extrabold-italic" ./files/aptos-extrabold-italic-maisfontes.f4cf.zip;
2023-08-16 10:56:23 -05:00
aptos-italic = makeFontPackage "aptos-italic" ./files/aptos-italic-maisfontes.6f24.zip;
aptos-light = makeFontPackage "aptos-light" ./files/aptos-light-maisfontes.2b30.zip;
2023-08-16 11:36:17 -05:00
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;
2023-08-16 10:56:23 -05:00
aptos-semibold = makeFontPackage "aptos-semibold" ./files/aptos-semibold-maisfontes.5201.zip;
2023-08-16 11:36:17 -05:00
aptos-semibold-italic = makeFontPackage "aptos-semibold-italic" ./files/aptos-semibold-italic-maisfontes.8f69.zip;
aptos-fonts = pkgs.symlinkJoin {
name = "aptos-fonts";
2023-08-16 10:56:23 -05:00
paths = [
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos
2023-08-16 10:56:23 -05:00
self.packages.${system}.aptos-black
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos-black-italic
2023-08-16 10:56:23 -05:00
self.packages.${system}.aptos-bold
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos-display
self.packages.${system}.aptos-display-bold
self.packages.${system}.aptos-display-italic
2023-08-16 10:56:23 -05:00
self.packages.${system}.aptos-extrabold
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos-extrabold-italic
2023-08-16 10:56:23 -05:00
self.packages.${system}.aptos-italic
self.packages.${system}.aptos-light
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos-light-italic
self.packages.${system}.aptos-mono
self.packages.${system}.aptos-mono-bold
self.packages.${system}.aptos-mono-italic
2023-08-16 10:56:23 -05:00
self.packages.${system}.aptos-semibold
2023-08-16 11:36:17 -05:00
self.packages.${system}.aptos-semibold-italic
2023-08-16 10:56:23 -05:00
];
};
};
}
);
}