podman-desktop: use --replace-fail instead of --replace

This commit is contained in:
Ihar Hrachyshka 2024-10-15 23:24:59 -04:00
parent 2ec2f2a6ee
commit c1afccdb82

View File

@ -36,11 +36,12 @@ stdenv.mkDerivation (finalAttrs: {
];
postPatch = ''
for file in packages/main/src/tray-animate-icon.ts extensions/podman/packages/extension/src/util.ts packages/main/src/plugin/certificates.ts; do
for file in packages/main/src/tray-animate-icon.ts packages/main/src/plugin/certificates.ts; do
substituteInPlace "$file" \
--replace 'process.resourcesPath' "'$out/share/lib/podman-desktop/resources'" \
--replace '(process as any).resourcesPath' "'$out/share/lib/podman-desktop/resources'"
--replace-fail 'process.resourcesPath' "'$out/share/lib/podman-desktop/resources'"
done
substituteInPlace "extensions/podman/packages/extension/src/util.ts" \
--replace-fail '(process as any).resourcesPath' "'$out/share/lib/podman-desktop/resources'"
'';
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";