summaryrefslogtreecommitdiffhomepage
path: root/nix/node_modules.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/node_modules.nix')
-rw-r--r--nix/node_modules.nix11
1 files changed, 4 insertions, 7 deletions
diff --git a/nix/node_modules.nix b/nix/node_modules.nix
index 981a60ef9..6d75b9e75 100644
--- a/nix/node_modules.nix
+++ b/nix/node_modules.nix
@@ -2,8 +2,6 @@
lib,
stdenvNoCC,
bun,
- bunCpu ? if stdenvNoCC.hostPlatform.isAarch64 then "arm64" else "x64",
- bunOs ? if stdenvNoCC.hostPlatform.isLinux then "linux" else "darwin",
rev ? "dirty",
hash ?
(lib.pipe ./hashes.json [
@@ -16,6 +14,9 @@ let
builtins.readFile
builtins.fromJSON
];
+ platform = stdenvNoCC.hostPlatform;
+ bunCpu = if platform.isAarch64 then "arm64" else "x64";
+ bunOs = if platform.isLinux then "linux" else "darwin";
in
stdenvNoCC.mkDerivation {
pname = "opencode-node_modules";
@@ -39,9 +40,7 @@ stdenvNoCC.mkDerivation {
"SOCKS_SERVER"
];
- nativeBuildInputs = [
- bun
- ];
+ nativeBuildInputs = [ bun ];
dontConfigure = true;
@@ -63,10 +62,8 @@ stdenvNoCC.mkDerivation {
installPhase = ''
runHook preInstall
-
mkdir -p $out
find . -type d -name node_modules -exec cp -R --parents {} $out \;
-
runHook postInstall
'';