From c271196d42a99c038472994b0fd0bfd9028b4423 Mon Sep 17 00:00:00 2001 From: emilylange Date: Sat, 11 Nov 2023 15:11:42 +0100 Subject: [PATCH] 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 --- pkgs/tools/misc/sharedown/default.nix | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/misc/sharedown/default.nix b/pkgs/tools/misc/sharedown/default.nix index 47e97fa25520..0f93551965e2 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 against the version in . - 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;