mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] podman-desktop: disable pnpm auto-bump & derive .desktop entry (#536832)
This commit is contained in:
commit
34bfdcf13a
1 changed files with 9 additions and 21 deletions
|
|
@ -3,13 +3,11 @@
|
|||
stdenv,
|
||||
fetchFromGitHub,
|
||||
makeBinaryWrapper,
|
||||
copyDesktopItems,
|
||||
electron_41,
|
||||
nodejs-slim_24,
|
||||
pnpm_10_29_2,
|
||||
pnpm_10,
|
||||
fetchPnpmDeps,
|
||||
pnpmConfigHook,
|
||||
makeDesktopItem,
|
||||
darwin,
|
||||
nix-update-script,
|
||||
_experimental-update-script-combinators,
|
||||
|
|
@ -22,7 +20,7 @@
|
|||
|
||||
let
|
||||
nodejs-slim = nodejs-slim_24;
|
||||
pnpm = pnpm_10_29_2.override { inherit nodejs-slim; };
|
||||
pnpm = pnpm_10.override { inherit nodejs-slim; };
|
||||
electron = electron_41;
|
||||
appName = "Podman Desktop";
|
||||
in
|
||||
|
|
@ -96,9 +94,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
pnpm
|
||||
pnpmConfigHook
|
||||
]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
copyDesktopItems
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.autoSignDarwinBinariesHook
|
||||
];
|
||||
|
|
@ -147,6 +142,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
install -Dm644 buildResources/icon.svg "$out/share/icons/hicolor/scalable/apps/podman-desktop.svg"
|
||||
|
||||
# Derive the .desktop entry from upstream to keep it aligned and avoid regressions.
|
||||
install -Dm644 .flatpak.desktop "$out/share/applications/podman-desktop.desktop"
|
||||
substituteInPlace "$out/share/applications/podman-desktop.desktop" \
|
||||
--replace-fail 'Exec=run.sh %U' 'Exec=podman-desktop %U' \
|
||||
--replace-fail 'Icon=io.podman_desktop.PodmanDesktop' 'Icon=podman-desktop'
|
||||
sed -i '/^X-Flatpak=/d' "$out/share/applications/podman-desktop.desktop"
|
||||
|
||||
makeWrapper '${electron}/bin/electron' "$out/bin/podman-desktop" \
|
||||
--add-flags "$out/share/lib/podman-desktop/resources/app.asar" \
|
||||
--set XDG_SESSION_TYPE 'x11' \
|
||||
|
|
@ -159,20 +161,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
''
|
||||
);
|
||||
|
||||
# see: https://github.com/podman-desktop/podman-desktop/blob/main/.flatpak.desktop
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "podman-desktop";
|
||||
exec = "podman-desktop %U";
|
||||
icon = "podman-desktop";
|
||||
desktopName = appName;
|
||||
genericName = "Desktop client for podman";
|
||||
comment = finalAttrs.meta.description;
|
||||
categories = [ "Utility" ];
|
||||
startupWMClass = appName;
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Graphical tool for developing on containers and Kubernetes";
|
||||
homepage = "https://podman-desktop.io";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue