Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman-desktop: 1.13.2 -> 1.15.0 #361460

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions pkgs/applications/virtualization/podman-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
, fetchFromGitHub
, makeWrapper
, copyDesktopItems
, electron
, electron_33
, nodejs
, pnpm
, pnpm_9
, makeDesktopItem
, autoSignDarwinBinariesHook
, nix-update-script
}:

stdenv.mkDerivation (finalAttrs: {
pname = "podman-desktop";
version = "1.13.2";
version = "1.15.0";

passthru.updateScript = nix-update-script { };

src = fetchFromGitHub {
owner = "containers";
repo = "podman-desktop";
rev = "v${finalAttrs.version}";
sha256 = "sha256-07lf9jy22JUT+Vc5y9Tu1nkWaXU5RTdu3GibcvQsSs8=";
sha256 = "sha256-pewLcukPTXijEP11i2ah8F17N3Rav8UyHrpCu9fUScg=";
};

pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-LPsNRd1c/cQeyBn3LZKnKeAsZ981sOkLYTnXIZL82LA=";
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src patches;
hash = "sha256-EzkAcd84JEBq6eDkh9XCGfCyeo5r2vpZSIvb2hqpsBU=";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hash always will be different in nixpkgs-review in x86_64-linux report.

In nixpkgs-review

error: hash mismatch in fixed-output derivation '/nix/store/hm84x737h5dnd3g2ky8k5hg6fkmd8ly6-podman-desktop-pnpm-deps.drv':
         specified: sha256-EzkAcd84JEBq6eDkh9XCGfCyeo5r2vpZSIvb2hqpsBU=
            got:    sha256-2wmMuymv8C1ZVeGnWf2R3t9cf1jqiFIw0KJ/m3/cxZs=
error: 1 dependencies of derivation '/nix/store/wgrqfbf8wqkhvk7br091vw2nkfpn94dg-podman-desktop-1.15.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fiw3n0zkxpwv2zcsc6zc0rya43rs315l-review-shell.drv' failed to build

It succeeds in darwin. I have no idea what is this 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be related to #350063?

};

patches = [
Expand All @@ -35,18 +35,16 @@ stdenv.mkDerivation (finalAttrs: {
];

postPatch = ''
for file in packages/main/src/tray-animate-icon.ts packages/main/src/plugin/certificates.ts; do
substituteInPlace "$file" \
--replace-fail 'process.resourcesPath' "'$out/share/lib/podman-desktop/resources'"
done
substituteInPlace 'packages/main/src/plugin/certificates.ts' \
--replace-fail 'process.resourcesPath' "'$out/share/lib/podman-desktop/resources'"
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";

nativeBuildInputs = [
makeWrapper nodejs pnpm.configHook
makeWrapper nodejs pnpm_9.configHook
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
copyDesktopItems
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Expand All @@ -56,15 +54,15 @@ stdenv.mkDerivation (finalAttrs: {
buildPhase = ''
runHook preBuild

cp -r ${electron.dist} electron-dist
cp -r ${electron_33.dist} electron-dist
chmod -R u+w electron-dist

pnpm build
./node_modules/.bin/electron-builder \
--dir \
--config .electron-builder.config.cjs \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version}
-c.electronVersion=${electron_33.version}

runHook postBuild
'';
Expand All @@ -84,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: {

install -Dm644 buildResources/icon.svg "$out/share/icons/hicolor/scalable/apps/podman-desktop.svg"

makeWrapper '${electron}/bin/electron' "$out/bin/podman-desktop" \
makeWrapper '${electron_33}/bin/electron' "$out/bin/podman-desktop" \
--add-flags "$out/share/lib/podman-desktop/resources/app.asar" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--inherit-argv0
Expand Down Expand Up @@ -113,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/containers/podman-desktop/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ booxter panda2134 ];
inherit (electron.meta) platforms;
inherit (electron_33.meta) platforms;
mainProgram = "podman-desktop";
};
})
Loading