open-stage-control: use postPatch for linking in package-lock.json

This commit is contained in:
Lily Foster 2022-11-25 17:20:37 -05:00
parent 3efdc71b5b
commit cfec4c6813
No known key found for this signature in database
GPG Key ID: 49340081E484C893
4 changed files with 18250 additions and 18256 deletions

View File

@ -11,10 +11,10 @@ buildNpmPackage rec {
hash = "sha256-XgwlRdwUSl4gIRKqk6BnMAKarVvp291zk8vmNkuRWKo=";
};
patches = [
# Use generated package-lock.json since upstream does not provide one in releases
./package-lock.json.patch
];
# Use generated package-lock.json since upstream does not provide one in releases
postPatch = ''
ln -sT ${./package-lock.json} ./package-lock.json
'';
npmDepsHash = "sha256-5KZXZ4agHcAh3gai5w9YodETIEGJtDq/kyEZOHb9dOc=";
@ -38,7 +38,7 @@ buildNpmPackage rec {
runHook preInstall
# prune unused deps
npm prune --omit dev $npmFlags
npm prune --omit dev --no-save $npmFlags
# copy built app and node_modules directories
mkdir -p $out/lib/node_modules/open-stage-control

File diff suppressed because it is too large Load Diff

View File

@ -47,10 +47,7 @@ curl -sSL https://raw.githubusercontent.com/jean-emmanuel/open-stage-control/v"$
# Lock dependencies with npm
(cd "$pkgdir" && npm install --package-lock-only --ignore-scripts --legacy-peer-deps)
# Turn lock file into patch file
(cd "$pkgdir" && (diff -u /dev/null ./package-lock.json || [ $? -eq 1 ])) >"$pkgdir"/package-lock.json.patch
rm -f "$pkgdir"/{package.json,package-lock.json}
rm -f "$pkgdir"/package.json
# Update FOD hash
curhash="$(nixeval "$attr.npmDeps.outputHash")"