diff options
author | emilylange <git@emilylange.de> | 2023-11-11 15:11:42 +0100 |
---|---|---|
committer | emilylange <git@emilylange.de> | 2023-11-11 15:11:42 +0100 |
commit | c271196d42a99c038472994b0fd0bfd9028b4423 (patch) | |
tree | 8e23890a893ece31010bf512a0ead2036b60aa58 | |
parent | 04ba0883815d54efa12dba5b9fea7834b9962cf3 (diff) |
sharedown: unbreak build
fixes the following error message: ``` $ node-gyp rebuild info This package requires node-gyp, which is not currently installed. Yarn will attempt to automatically install it. If this fails, you can run "yarn global add node-gyp" to manually install it. [1/4] Resolving packages... error Failed to auto-install node-gyp. Please run "yarn global add node-gyp" manually. Error: "Couldn't find any versions for \"node-gyp\" that matches \"latest\" in our cache (possible versions are \"\"). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue." info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` https://hydra.nixos.org/build/239684452
-rw-r--r-- | pkgs/tools/misc/sharedown/default.nix | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/pkgs/tools/misc/sharedown/default.nix b/pkgs/tools/misc/sharedown/default.nix index 47e97fa25520e..0f93551965e23 100644 --- a/pkgs/tools/misc/sharedown/default.nix +++ b/pkgs/tools/misc/sharedown/default.nix @@ -6,7 +6,7 @@ , libsecret , python3 , pkg-config -, nodejs +, nodePackages , electron , makeWrapper , makeDesktopItem @@ -63,6 +63,7 @@ stdenvNoCC.mkDerivation rec { nativeBuildInputs = [ python3 pkg-config + nodePackages.node-gyp ]; buildInputs = [ libsecret @@ -75,17 +76,6 @@ stdenvNoCC.mkDerivation rec { }; }; - preBuild = '' - # Set up headers for node-gyp, which is needed to build keytar. - mkdir -p "$HOME/.cache/node-gyp/${nodejs.version}" - - # Set up version which node-gyp checks in <https://github.com/nodejs/node-gyp/blob/4937722cf597ccd1953628f3d5e2ab5204280051/lib/install.js#L87-L96> against the version in <https://github.com/nodejs/node-gyp/blob/4937722cf597ccd1953628f3d5e2ab5204280051/package.json#L15>. - echo 9 > "$HOME/.cache/node-gyp/${nodejs.version}/installVersion" - - # Link node headers so that node-gyp does not try to download them. - ln -sfv "${nodejs}/include" "$HOME/.cache/node-gyp/${nodejs.version}" - ''; - packageJSON = "${src}/package.json"; yarnLock = ./yarn.lock; |