From 085b17a0671dc37a722d55e59d5e55c718985cb3 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:22:27 +0100 Subject: [PATCH 1/8] steam-rom-manager: fix appimageTools version --- pkgs/by-name/st/steam-rom-manager/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/st/steam-rom-manager/package.nix b/pkgs/by-name/st/steam-rom-manager/package.nix index 9b74ee139847..9406330b8bf0 100644 --- a/pkgs/by-name/st/steam-rom-manager/package.nix +++ b/pkgs/by-name/st/steam-rom-manager/package.nix @@ -1,7 +1,7 @@ { lib, appimageTools, fetchurl }: appimageTools.wrapType2 rec { - name = "steam-rom-manager"; + pname = "steam-rom-manager"; version = "2.5.22"; src = fetchurl { @@ -10,11 +10,11 @@ appimageTools.wrapType2 rec { }; extraInstallCommands = let - appimageContents = appimageTools.extract { inherit name src; }; + appimageContents = appimageTools.extract { inherit pname version src; }; in '' - install -m 444 -D ${appimageContents}/${name}.desktop -t $out/share/applications - substituteInPlace $out/share/applications/${name}.desktop \ - --replace 'Exec=AppRun' 'Exec=${name}' + install -m 444 -D ${appimageContents}/steam-rom-manager.desktop -t $out/share/applications + substituteInPlace $out/share/applications/steam-rom-manager.desktop \ + --replace 'Exec=AppRun' 'Exec=steam-rom-manager' cp -r ${appimageContents}/usr/share/icons $out/share ''; From 41711056e6cb9c3e07c63dd162cef62b47fdf84a Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:22:43 +0100 Subject: [PATCH 2/8] ssb-patchwork: fix appimageTools version --- pkgs/by-name/ss/ssb-patchwork/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ss/ssb-patchwork/package.nix b/pkgs/by-name/ss/ssb-patchwork/package.nix index 4e271534a642..6915cd1f6902 100644 --- a/pkgs/by-name/ss/ssb-patchwork/package.nix +++ b/pkgs/by-name/ss/ssb-patchwork/package.nix @@ -11,12 +11,11 @@ let }; binary = appimageTools.wrapType2 { - name = pname; - inherit src; + inherit pname version src; }; # we only use this to extract the icon appimage-contents = appimageTools.extractType2 { - inherit name src; + inherit pname version src; }; desktopItem = makeDesktopItem { From 9f332351e6d2c4efb739f9e2b34f98be15fb9cfe Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:22:55 +0100 Subject: [PATCH 3/8] saleae-logic-2: fix appimageTools version --- pkgs/by-name/sa/saleae-logic-2/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/sa/saleae-logic-2/package.nix b/pkgs/by-name/sa/saleae-logic-2/package.nix index ce77855b419e..69e972afa7b7 100644 --- a/pkgs/by-name/sa/saleae-logic-2/package.nix +++ b/pkgs/by-name/sa/saleae-logic-2/package.nix @@ -1,14 +1,14 @@ { lib, fetchurl, makeDesktopItem, appimageTools }: let - name = "saleae-logic-2"; + pname = "saleae-logic-2"; version = "2.4.13"; src = fetchurl { url = "https://downloads.saleae.com/logic2/Logic-${version}-linux-x64.AppImage"; hash = "sha256-0GIZQKQDY3arDUlxjQKWOHDB3j76xVwkx5H+8q+d0Rc="; }; desktopItem = makeDesktopItem { - inherit name; - exec = name; + name = "saleae-logic-2"; + exec = "saleae-logic-2"; icon = "Logic"; comment = "Software for Saleae logic analyzers"; desktopName = "Saleae Logic"; @@ -17,11 +17,11 @@ let }; in appimageTools.wrapType2 { - inherit name src; + inherit pname version src; extraInstallCommands = let - appimageContents = appimageTools.extractType2 { inherit name src; }; + appimageContents = appimageTools.extractType2 { inherit pname version src; }; in '' mkdir -p $out/etc/udev/rules.d From 00b20dc6670c2cf762e829472407878facc5bc73 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:23:06 +0100 Subject: [PATCH 4/8] quba: fix appimageTools version --- pkgs/by-name/qu/quba/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/qu/quba/package.nix b/pkgs/by-name/qu/quba/package.nix index cfd80c6bdbe8..9142875eb8a2 100644 --- a/pkgs/by-name/qu/quba/package.nix +++ b/pkgs/by-name/qu/quba/package.nix @@ -7,20 +7,18 @@ let version = "1.4.0"; pname = "quba"; - name = "${pname}-${version}"; src = fetchurl { url = "https://github.com/ZUGFeRD/quba-viewer/releases/download/v${version}/Quba-${version}.AppImage"; hash = "sha256-EsTF7W1np5qbQQh3pdqsFe32olvGK3AowGWjqHPEfoM="; }; - appimageContents = appimageTools.extractType1 { inherit name src; }; + appimageContents = appimageTools.extractType1 { inherit pname version src; }; in appimageTools.wrapType1 { - inherit name src; + inherit pname version src; extraInstallCommands = '' - mv $out/bin/${name} $out/bin/${pname} install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications substituteInPlace $out/share/applications/${pname}.desktop \ --replace-fail 'Exec=AppRun' 'Exec=${pname}' From 0c64b29d2ac355308f44f4c4ab7628f90cc9d2c8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:23:32 +0100 Subject: [PATCH 5/8] deskreen: fix appimageTools version --- pkgs/by-name/de/deskreen/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/de/deskreen/package.nix b/pkgs/by-name/de/deskreen/package.nix index 98f735703e1b..517a38dd37d8 100644 --- a/pkgs/by-name/de/deskreen/package.nix +++ b/pkgs/by-name/de/deskreen/package.nix @@ -13,7 +13,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-0jI/mbXaXanY6ay2zn+dPWGvsqWRcF8aYHRvfGVsObE="; }; deskreenUnwrapped = appimageTools.wrapType2 { - name = "deskreen"; + inherit (finalAttrs) pname version; src = finalAttrs.src; }; From 9d4043d180a136ae7cf8a9c196c435b23ac09c55 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:23:46 +0100 Subject: [PATCH 6/8] cables: fix appimageTools version --- pkgs/by-name/ca/cables/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ca/cables/package.nix b/pkgs/by-name/ca/cables/package.nix index 4ce71233cb19..5c37aa4c87a7 100644 --- a/pkgs/by-name/ca/cables/package.nix +++ b/pkgs/by-name/ca/cables/package.nix @@ -18,17 +18,15 @@ let appimageContents = appimageTools.extract { inherit pname version src; postExtract = '' - substituteInPlace $out/${name}.desktop --replace 'Exec=AppRun' 'Exec=cables' + substituteInPlace $out/${pname}-${version}.desktop --replace 'Exec=AppRun' 'Exec=cables' ''; }; in appimageTools.wrapType2 { - inherit name src; + inherit pname version src; extraInstallCommands = '' - mv $out/bin/${name} $out/bin/cables - install -m 444 -D ${appimageContents}/${name}.desktop $out/share/applications/cables.desktop install -m 444 -D ${appimageContents}/${name}.png $out/share/icons/hicolor/512x512/apps/cables.png ''; From 4ff9194fae15c1001458beadfe5a601f13b32dd9 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:23:58 +0100 Subject: [PATCH 7/8] soulseekqt: fix appimageTools version --- pkgs/applications/networking/p2p/soulseekqt/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/soulseekqt/default.nix b/pkgs/applications/networking/p2p/soulseekqt/default.nix index 014dd89d7499..917012279eb6 100644 --- a/pkgs/applications/networking/p2p/soulseekqt/default.nix +++ b/pkgs/applications/networking/p2p/soulseekqt/default.nix @@ -9,7 +9,6 @@ mkDerivation rec { pname = "soulseekqt"; version = "2018-1-30"; - name="${pname}-${version}"; src = fetchzip { url = "https://www.slsknet.org/SoulseekQt/Linux/SoulseekQt-${version}-64bit-appimage.tgz"; @@ -17,7 +16,7 @@ mkDerivation rec { }; appextracted = appimageTools.extractType2 { - inherit name; + inherit pname version; src="${src}/SoulseekQt-2018-1-30-64bit.AppImage"; }; From 0e6cb950cfb797c397a3f6b579ce3e4807c1f17c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 28 Nov 2024 20:25:26 +0100 Subject: [PATCH 8/8] appimageTools: deprecate name & version --- pkgs/build-support/appimage/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index a6b08042db99..18b3ec99229b 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -26,7 +26,9 @@ rec { ]; }; - extract = args@{ name ? "${args.pname}-${args.version}", postExtract ? "", src, ... }: pkgs.runCommand "${name}-extracted" { + extract = args@{ pname, version, name ? null, postExtract ? "", src, ... }: + assert lib.assertMsg (name == null) "The `name` argument is deprecated. Use `pname` and `version` instead to construct the name."; + pkgs.runCommand "${pname}-${version}-extracted" { buildInputs = [ appimage-exec ]; } '' appimage-exec.sh -x $out ${src} @@ -58,7 +60,7 @@ rec { wrapType2 = args@{ src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage (args // { inherit extraPkgs; - src = extract (lib.filterAttrs (key: value: builtins.elem key [ "name" "pname" "version" "src" ]) args); + src = extract (lib.filterAttrs (key: value: builtins.elem key [ "pname" "version" "src" ]) args); # passthru src to make nix-update work # hack to keep the origin position (unsafeGetAttrPos)