49 lines
1.8 KiB
Nix
49 lines
1.8 KiB
Nix
# vim: set et sw=2 ts=2 sts=2:
|
|
{
|
|
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 {
|
|
lib = forAllSystems ({pkgs}:
|
|
with pkgs;
|
|
let
|
|
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
|
in
|
|
{ inherit fetchfont; }
|
|
);
|
|
defaultPackage = forAllSystems ({pkgs}:
|
|
with pkgs;
|
|
let
|
|
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
|
fonts = callPackage ./fonts.nix { fetchfont = fetchfont; };
|
|
default = callPackage ./collection.nix { fonts = fonts; };
|
|
in
|
|
default
|
|
);
|
|
packages = forAllSystems ({pkgs}:
|
|
with pkgs;
|
|
let
|
|
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
|
fetchfont = callPackage ./fetchfont.nix { pkgs = pkgs // { inherit sfnt2woff-zopfli; }; };
|
|
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 ];
|
|
}
|
|
);
|
|
};
|
|
}
|
|
|