podman-desktop: 0.12.0 -> 1.13.2 (#343648)

This commit is contained in:
Artturin 2024-10-19 06:05:40 +03:00 committed by GitHub
commit 8017b961d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 66 additions and 62 deletions

View File

@ -2996,6 +2996,12 @@
githubId = 68566724;
name = "bootstrap-prime";
};
booxter = {
email = "ihar.hrachyshka@gmail.com";
github = "booxter";
githubId = 90200;
name = "Ihar Hrachyshka";
};
boozedog = {
email = "code@booze.dog";
github = "boozedog";

View File

@ -1,79 +1,69 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, yarn
, fixup-yarn-lock
, nodejs
, makeWrapper
, copyDesktopItems
, desktopToDarwinBundle
, electron
, nodejs
, pnpm
, makeDesktopItem
, autoSignDarwinBinariesHook
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "podman-desktop";
version = "0.12.0";
version = "1.13.2";
passthru.updateScript = nix-update-script { };
src = fetchFromGitHub {
owner = "containers";
repo = "podman-desktop";
rev = "v${finalAttrs.version}";
sha256 = "sha256-gEjcI+bfETYZB/pHDXRcNxNVDsbwuqQL1E22fMkIJHI=";
sha256 = "sha256-07lf9jy22JUT+Vc5y9Tu1nkWaXU5RTdu3GibcvQsSs8=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
sha256 = "sha256-x0hqNxi6r1i3vBe1tJQl+Oht2St9VIH3Eq27MZLkojA=";
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-mkWbFFv0IdLtog6uZM6xgTNlQPC+ytUQD8po8yiv/6Y=";
};
patches = [
# podman should be installed with nix; disable auto-installation
./patches/extension-no-download-podman.patch
./patches/fix-yarn-lock-deterministic.patch
];
postPatch = ''
for file in packages/main/src/tray-animate-icon.ts extensions/podman/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";
nativeBuildInputs = [
yarn
fixup-yarn-lock
nodejs
makeWrapper
makeWrapper nodejs pnpm.configHook
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
copyDesktopItems
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
autoSignDarwinBinariesHook
];
configurePhase = ''
runHook preConfigure
export HOME="$TMPDIR"
yarn config --offline set yarn-offline-mirror "$offlineCache"
fixup-yarn-lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn --offline run build
yarn --offline run electron-builder --dir \
cp -r ${electron.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.electronDist=electron-dist \
-c.electronVersion=${electron.version}
runHook postBuild
@ -83,6 +73,13 @@ stdenv.mkDerivation (finalAttrs: {
runHook preInstall
mkdir -p "$out/share/lib/podman-desktop"
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv dist/mac*/Podman\ Desktop.app $out/Applications
ln -s $out/Applications/Podman\ Desktop.app/Contents/Resources "$out/share/lib/podman-desktop/resources"
makeWrapper "$out/Applications/Podman Desktop.app/Contents/MacOS/Podman Desktop" $out/bin/podman-desktop
'' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
cp -r dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/podman-desktop"
install -Dm644 buildResources/icon.svg "$out/share/icons/hicolor/scalable/apps/podman-desktop.svg"
@ -91,6 +88,7 @@ stdenv.mkDerivation (finalAttrs: {
--add-flags "$out/share/lib/podman-desktop/resources/app.asar" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--inherit-argv0
'' + ''
runHook postInstall
'';
@ -112,9 +110,9 @@ stdenv.mkDerivation (finalAttrs: {
meta = with lib; {
description = "A graphical tool for developing on containers and Kubernetes";
homepage = "https://podman-desktop.io";
changelog = "https://github.com/containers/podman-desktop/releases/tag/v${finalAttrs.version}";
changelog = "https://github.com/containers/podman-desktop/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ panda2134 ];
maintainers = with maintainers; [ booxter panda2134 ];
inherit (electron.meta) platforms;
mainProgram = "podman-desktop";
};

View File

@ -1,13 +1,24 @@
diff --git a/extensions/podman/package.json b/extensions/podman/package.json
index 5f86bbe9..92c0ef3b 100644
--- a/extensions/podman/package.json
+++ b/extensions/podman/package.json
@@ -86,7 +86,7 @@
From f6dfc258742d03bd0270e9fded925ffa75cc60b0 Mon Sep 17 00:00:00 2001
From: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Date: Sat, 21 Sep 2024 18:56:02 -0400
Subject: [PATCH] Don't download podman
---
extensions/podman/packages/extension/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/podman/packages/extension/package.json b/extensions/podman/packages/extension/package.json
index 1824d817f1..d1cc9a5dbf 100644
--- a/extensions/podman/packages/extension/package.json
+++ b/extensions/podman/packages/extension/package.json
@@ -369,7 +369,7 @@
}
},
"scripts": {
- "build": "rollup --bundleConfigAsCjs --config rollup.config.js --compact --environment BUILD:production && npx ts-node ./scripts/download.ts && node ./scripts/build.js",
+ "build": "rollup --bundleConfigAsCjs --config rollup.config.js --compact --environment BUILD:production && node ./scripts/build.js",
"watch": "rollup --bundleConfigAsCjs --config rollup.config.js -w",
"test": "vitest run --passWithNoTests"
},
- "build": "vite build && tsx ./scripts/download.ts && node ./scripts/build.cjs",
+ "build": "vite build && node ./scripts/build.cjs",
"test": "vitest run --coverage --passWithNoTests",
"test:watch": "vitest watch --coverage --passWithNoTests",
"watch": "vite build -w"
--
2.46.0

View File

@ -1,13 +0,0 @@
diff --git a/yarn.lock b/yarn.lock
index ae340d04..5acc3fed 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -12753,7 +12753,7 @@ ws@^7.3.1:
resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz"
integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==
-ws@^8.11.0, ws@^8.4.2:
+ws@^8.11.0, ws@^8.12.0, ws@^8.4.2:
version "8.12.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8"
integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==

View File

@ -11293,7 +11293,9 @@ with pkgs;
podman-compose = python3Packages.callPackage ../applications/virtualization/podman-compose { };
podman-desktop = callPackage ../applications/virtualization/podman-desktop {};
podman-desktop = callPackage ../applications/virtualization/podman-desktop {
inherit (darwin) autoSignDarwinBinariesHook;
};
pods = callPackage ../applications/virtualization/pods { };