nixos-aptos/flake.nix

76 lines
3 KiB
Nix
Raw Normal View History

2023-08-16 10:56:23 -05:00
{
description = "NetBox Maintenance";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-23.05";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
bash = {
url = "git+https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git";
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, poetry2nix, flake-utils, bash, ... }@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-normal = makeFontPackage "aptos" ./files/aptos-maisfontes.85e8.zip;
aptos-black-italic = makeFontPackage "aptos-black-italic" ./files/aptos-black-italic-maisfontes.d702.zip;
aptos-black = makeFontPackage "aptos-black" ./files/aptos-black-maisfontes.cd65.zip;
aptos-bold = makeFontPackage "aptos-bold" ./files/aptos-bold-maisfontes.d829.zip;
aptos-extrabold-italic = makeFontPackage "aptos-extrabold-italic" ./files/aptos-extrabold-italic-maisfontes.f4cf.zip;
aptos-extrabold = makeFontPackage "aptos-extrabold" ./files/aptos-extrabold-maisfontes.3c51.zip;
aptos-italic = makeFontPackage "aptos-italic" ./files/aptos-italic-maisfontes.6f24.zip;
aptos-light-italic = makeFontPackage "aptos-light-italic" ./files/aptos-light-italic-maisfontes.1ddd.zip;
aptos-light = makeFontPackage "aptos-light" ./files/aptos-light-maisfontes.2b30.zip;
aptos-semibold-italic = makeFontPackage "aptos-semibold-italic" ./files/aptos-semibold-italic-maisfontes.8f69.zip;
aptos-semibold = makeFontPackage "aptos-semibold" ./files/aptos-semibold-maisfontes.5201.zip;
aptos = pkgs.symlinkJoin {
name = "aptos";
paths = [
self.packages.${system}.aptos-normal
self.packages.${system}.aptos-black-italic
self.packages.${system}.aptos-black
self.packages.${system}.aptos-bold
self.packages.${system}.aptos-extrabold-italic
self.packages.${system}.aptos-extrabold
self.packages.${system}.aptos-italic
self.packages.${system}.aptos-light-italic
self.packages.${system}.aptos-light
self.packages.${system}.aptos-semibold-italic
self.packages.${system}.aptos-semibold
];
};
};
}
);
}