-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase.nix
45 lines (39 loc) · 912 Bytes
/
base.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
pname,
# --
buildNpmPackage,
importNpmLock,
remarshal,
ttfautohint-nox,
callPackages,
}: let
nv = (callPackages ./_sources/generated.nix {}).iosevka;
in
buildNpmPackage {
inherit pname;
inherit (nv) version src;
npmDeps = importNpmLock {
npmRoot = nv.src; # ifd
};
npmConfigHook = importNpmLock.npmConfigHook;
nativeBuildInputs = [
remarshal
ttfautohint-nox
];
postPatch = ''
cp -v ${./private-build-plans.toml} private-build-plans.toml
'';
enableParallelBuilding = true;
buildPhase = ''
export HOME=$TMPDIR
runHook preBuild
npm run build --no-update-notifier --targets contents::${pname} -- --jCmd=$NIX_BUILD_CORES --verbose=9
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -avL dist/${pname}/* $out
runHook postInstall
'';
}