forked from be5invis/Iosevka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
28 lines (27 loc) · 1.01 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
inputs = {
ttfautohint.url = github:toaq/ttfautohint;
};
outputs = { self, nixpkgs, flake-utils, ttfautohint, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in rec {
devShells.default = pkgs.mkShellNoCC {
inherit (defaultPackage) nativeBuildInputs;
};
defaultPackage = pkgs.buildNpmPackage {
name = "iosevka-toaq";
src = self;
nativeBuildInputs = [ pkgs.nodejs_latest ttfautohint.defaultPackage.${system} ];
npmDepsHash = "sha256-xw0GA1aIA/J5hfLQBSE+GJzXfbfWQI2k2pYdenlM9NY=";
buildPhase = ''
npm run build -- contents::IosevkaToaq contents::IosevkaToaqSlab contents::IosevkaToaqAile contents::IosevkaToaqEtoile
'';
installPhase = ''
mkdir -p $out/share/fonts/{truetype,woff2}
mv dist/*/TTF/*.ttf $out/share/fonts/truetype
mv dist/*/WOFF2/*.woff2 $out/share/fonts/woff2
'';
};
});
}