Skip to content

Commit 9967c41

Browse files
committed
use importNpmLock
1 parent 6741b11 commit 9967c41

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

flake.nix

+9-15
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,20 @@
2323
(fs.fileFilter (file: file.hasExt "json") r)
2424
]);
2525
};
26+
package-json = builtins.fromJSON (builtins.readFile ./package.json);
2627
in {
2728
packages.${system} = {
28-
# deps = with pkgs;
29-
# stdenvNoCC.mkDerivation {
30-
# name = "neohome-deps";
31-
# inherit src;
32-
# nativeBuildInputs = [prefetch-npm-deps];
33-
# buildPhase = ''
34-
# prefetch-npm-deps ./package-lock.json > $out
35-
# '';
36-
# outputHashAlgo = "sha256";
37-
# outputHashMode = "recursive";
38-
# outputHash = "sha256-4SePc3yGlBTGCoCeZtVL9A1NK5vv2CM8EnoRCinhPA0=";
39-
# };
40-
4129
default = with pkgs;
4230
buildNpmPackage {
43-
name = "neohome";
31+
pname = package-json.name;
32+
version = package-json.version;
4433
inherit src;
45-
npmDepsHash = "sha256-MXBEcrU3NZw24Ag7qPd4iY69EpSmkI+EU2y+vQehSEY=";
34+
35+
npmDeps = importNpmLock {
36+
npmRoot = src;
37+
};
38+
npmConfigHook = importNpmLock.npmConfigHook;
39+
4640
env.ASTRO_TELEMETRY_DISABLED = true;
4741
};
4842
};

0 commit comments

Comments
 (0)