diff options
Diffstat (limited to 'pkgs/build-support/node/fetch-npm-deps/default.nix')
-rw-r--r-- | pkgs/build-support/node/fetch-npm-deps/default.nix | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/pkgs/build-support/node/fetch-npm-deps/default.nix b/pkgs/build-support/node/fetch-npm-deps/default.nix index d6ee0124d2851..7d5ea7cbfbe8f 100644 --- a/pkgs/build-support/node/fetch-npm-deps/default.nix +++ b/pkgs/build-support/node/fetch-npm-deps/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, rustPlatform, Security, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }: +{ lib, stdenvNoCC, rustPlatform, makeWrapper, Security, gnutar, gzip, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }: { prefetch-npm-deps = rustPlatform.buildRustPackage { @@ -16,8 +16,13 @@ cargoLock.lockFile = ./Cargo.lock; + nativeBuildInputs = [ makeWrapper ]; buildInputs = lib.optional stdenvNoCC.isDarwin Security; + postInstall = '' + wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip ]} + ''; + passthru.tests = let makeTestSrc = { name, src }: stdenvNoCC.mkDerivation { @@ -46,7 +51,7 @@ hash = "sha256-uQmc+S+V1co1Rfc4d82PpeXjmd1UqdsG492ADQFcZGA="; }; - hash = "sha256-fk7L9vn8EHJsGJNMAjYZg9h0PT6dAwiahdiEeXVrMB8="; + hash = "sha256-wca1QvxUw3OrLStfYN9Co6oVBR1LbfcNUKlDqvObps4="; }; lockfileV2 = makeTest { @@ -57,7 +62,7 @@ hash = "sha256-qS29tq5QPnGxV+PU40VgMAtdwVLtLyyhG2z9GMeYtC4="; }; - hash = "sha256-s8SpZY/1tKZVd3vt7sA9vsqHvEaNORQBMrSyhWpj048="; + hash = "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw="; }; hashPrecedence = makeTest { @@ -68,7 +73,7 @@ hash = "sha256-1+0AQw9EmbHiMPA/H8OP8XenhrkhLRYBRhmd1cNPFjk="; }; - hash = "sha256-KRxwrEij3bpZ5hbQhX67KYpnY2cRS7u2EVZIWO1FBPM="; + hash = "sha256-oItUls7AXcCECuyA+crQO6B0kv4toIr8pBubNwB7kAM="; }; hostedGitDeps = makeTest { @@ -79,7 +84,30 @@ hash = "sha256-X9mCwPqV5yP0S2GonNvpYnLSLJMd/SUIked+hMRxDpA="; }; - hash = "sha256-oIM05TGHstX1D4k2K4TJ+SHB7H/tNKzxzssqf0GJwvY="; + hash = "sha256-5Mg7KDJLMM5e/7BCHGinGAnBRft2ySQzvKW06p3u/0o="; + }; + + linkDependencies = makeTest { + name = "link-dependencies"; + + src = fetchurl { + url = "https://raw.githubusercontent.com/evcc-io/evcc/0.106.3/package-lock.json"; + hash = "sha256-6ZTBMyuyPP/63gpQugggHhKVup6OB4hZ2rmSvPJ0yEs="; + }; + + hash = "sha256-VzQhArHoznYSXUT7l9HkJV4yoSOmoP8eYTLel1QwmB4="; + }; + + # This package contains both hosted Git shorthand, and a bundled dependency that happens to override an existing one. + etherpadLite1818 = makeTest { + name = "etherpad-lite-1.8.18"; + + src = fetchurl { + url = "https://raw.githubusercontent.com/ether/etherpad-lite/1.8.18/src/package-lock.json"; + hash = "sha256-1fGNxYJi1I4cXK/jinNG+Y6tPEOhP3QAqWOBEQttS9E="; + }; + + hash = "sha256-8xF8F74nHwL9KPN2QLsxnfvsk0rNCKOZniYJQCD5u/I="; }; }; |