flake-fonts/flake.nix

49 lines
1.8 KiB
Nix
Raw Normal View History

# vim: set et sw=2 ts=2 sts=2:
2023-06-17 00:20:53 +02:00
{
description = "fonts";
2024-03-02 22:32:09 +01:00
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11-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
2023-07-10 23:45:11 +02:00
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 ];
}
);
};
2023-06-17 00:20:53 +02:00
}