Skip to content

Commit

Permalink
use importNpmLock
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Jun 12, 2024
1 parent 6741b11 commit 9967c41
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,20 @@
(fs.fileFilter (file: file.hasExt "json") r)
]);
};
package-json = builtins.fromJSON (builtins.readFile ./package.json);
in {
packages.${system} = {
# deps = with pkgs;
# stdenvNoCC.mkDerivation {
# name = "neohome-deps";
# inherit src;
# nativeBuildInputs = [prefetch-npm-deps];
# buildPhase = ''
# prefetch-npm-deps ./package-lock.json > $out
# '';
# outputHashAlgo = "sha256";
# outputHashMode = "recursive";
# outputHash = "sha256-4SePc3yGlBTGCoCeZtVL9A1NK5vv2CM8EnoRCinhPA0=";
# };

default = with pkgs;
buildNpmPackage {
name = "neohome";
pname = package-json.name;
version = package-json.version;
inherit src;
npmDepsHash = "sha256-MXBEcrU3NZw24Ag7qPd4iY69EpSmkI+EU2y+vQehSEY=";

npmDeps = importNpmLock {
npmRoot = src;
};
npmConfigHook = importNpmLock.npmConfigHook;

env.ASTRO_TELEMETRY_DISABLED = true;
};
};
Expand Down

0 comments on commit 9967c41

Please sign in to comment.