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
This commit is contained in:
parent
04ba088381
commit
c271196d42
1 changed files with 2 additions and 12 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue