function to lib, packages for any system
This commit is contained in:
parent
5963940d6b
commit
4b8974f7aa
19
flake.nix
19
flake.nix
|
@ -7,12 +7,17 @@
|
|||
sfnt2woff-zopfli = callPackage ./sfnt2woff-zopfli.nix {};
|
||||
fetchfont = callPackage ./fetchfont.nix {sfnt2woff-zopfli = sfnt2woff-zopfli; };
|
||||
fonts = callPackage ./fonts.nix {fetchfont = fetchfont; };
|
||||
in
|
||||
fetchfont = fetchfont;
|
||||
|
||||
defaultPackage.x86_64-linux =
|
||||
with import nixpkgs { system = "x86_64-linux"; };
|
||||
fonts // { sfnt2woff-zopfli = sfnt2woff-zopfli; };
|
||||
};
|
||||
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 {
|
||||
lib = {
|
||||
fetchfont = fetchfont;
|
||||
};
|
||||
packages = forAllSystems {pkgs}: {
|
||||
default = fonts // { sfnt2woff-zopfli = sfnt2woff-zopfli; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue