diff --git a/flake.nix b/flake.nix index da1527d..641e7fc 100644 --- a/flake.nix +++ b/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; }; + }; + }; }