2023-06-20 14:28:41 +02:00
|
|
|
# vim: set et sw=2 ts=2 sts=2:
|
2023-06-17 00:20:53 +02:00
|
|
|
{
|
2023-06-20 14:28:41 +02:00
|
|
|
description = "fonts";
|
|
|
|
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05-small;
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
|
|
|
forAllSystems = f: (nixpkgs.lib.genAttrs allSystems (system: f {
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
}));
|
|
|
|
in rec {
|
2023-06-20 15:14:02 +02:00
|
|
|
lib = forAllSystems ({pkgs}:
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
|
|
|
in
|
|
|
|
{ inherit fetchfont; }
|
|
|
|
);
|
2023-06-20 16:20:15 +02:00
|
|
|
defaultPackage = forAllSystems ({pkgs}:
|
2023-06-20 14:28:41 +02:00
|
|
|
with pkgs;
|
|
|
|
let
|
2023-06-20 16:20:15 +02:00
|
|
|
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
2023-06-20 14:28:41 +02:00
|
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
2023-06-20 16:20:15 +02:00
|
|
|
fonts = callPackage ./fonts.nix { fetchfont = fetchfont; };
|
|
|
|
default = callPackage ./collection.nix { fonts = fonts; };
|
|
|
|
in
|
|
|
|
default
|
|
|
|
);
|
|
|
|
packages = forAllSystems ({pkgs}:
|
|
|
|
with pkgs;
|
|
|
|
let
|
2023-06-20 14:28:41 +02:00
|
|
|
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
2023-06-20 16:20:15 +02:00
|
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
2023-06-20 14:28:41 +02:00
|
|
|
fonts = callPackage ./fonts.nix { fetchfont = fetchfont; };
|
|
|
|
default = callPackage ./collection.nix { fonts = fonts; };
|
|
|
|
in
|
|
|
|
fonts // { inherit sfnt2woff-zopfli default; }
|
|
|
|
);
|
|
|
|
devShell = forAllSystems ({pkgs}:
|
|
|
|
pkgs.mkShell {
|
|
|
|
name = "fonts-dev";
|
|
|
|
nativeBuildInputs = [ packages.${pkgs.system}.sfnt2woff-zopfli pkgs.woff2 ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
2023-06-17 00:20:53 +02:00
|
|
|
}
|
|
|
|
|