fetchPnpmDeps: don't fail on empty lockfile (#513736)
This commit is contained in:
@@ -162,9 +162,9 @@ in
|
||||
# See https://github.com/NixOS/nixpkgs/pull/350063
|
||||
# See https://github.com/NixOS/nixpkgs/issues/422889
|
||||
if [[ ${toString fetcherVersion} -ge 2 ]]; then
|
||||
find $storePath -type f -name "*-exec" -print0 | xargs -0 chmod 555
|
||||
find $storePath -type f -not -name "*-exec" -print0 | xargs -0 chmod 444
|
||||
find $storePath -type d -print0 | xargs -0 chmod 555
|
||||
find $storePath -type f -name "*-exec" -print0 | xargs --no-run-if-empty -0 chmod 555
|
||||
find $storePath -type f -not -name "*-exec" -print0 | xargs --no-run-if-empty -0 chmod 444
|
||||
find $storePath -type d -print0 | xargs --no-run-if-empty -0 chmod 555
|
||||
fi
|
||||
|
||||
if [[ ${toString fetcherVersion} -ge 3 ]]; then
|
||||
|
||||
@@ -170,6 +170,8 @@ in
|
||||
|
||||
php = recurseIntoAttrs (callPackages ./php { });
|
||||
|
||||
pnpm = recurseIntoAttrs (callPackages ./pnpm { });
|
||||
|
||||
go = recurseIntoAttrs (callPackage ../build-support/go/tests.nix { });
|
||||
|
||||
lake = callPackage ../build-support/lake/test { };
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{ callPackage }:
|
||||
{
|
||||
pnpm-empty-lockfile = callPackage ./pnpm-empty-lockfile { };
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
pkgs,
|
||||
stdenv,
|
||||
fetchPnpmDeps,
|
||||
nodejs,
|
||||
pnpm_10,
|
||||
pnpmConfigHook,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "pnpm-empty-lockfile";
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpm_10
|
||||
pnpmConfigHook
|
||||
];
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
pname = "pnpm-empty-lockfile";
|
||||
fetcherVersion = 3;
|
||||
pnpm = pnpm_10;
|
||||
src = ./.;
|
||||
hash = "sha256-u0GOAX5B1f2ANWbOezScp/eKQRRZA/JoYfQ5zLrNip4=";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
touch $out
|
||||
runHook postBuild
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "pnpm-empty-lockfile",
|
||||
"main": "main.mjs",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
importers:
|
||||
|
||||
.: {}
|
||||
Reference in New Issue
Block a user