-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbase.nix
More file actions
49 lines (43 loc) · 959 Bytes
/
base.nix
File metadata and controls
49 lines (43 loc) · 959 Bytes
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
46
47
48
49
{
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;
};
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
trap "set +x" ERR
set -x
npm run build --no-update-notifier --targets contents::${pname} -- --jCmd=$NIX_BUILD_CORES --verbose=9
set +x
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -avL dist/${pname}/* $out
runHook postInstall
'';
}