Skip to content

Commit

Permalink
appimageTools: deprecate name & version
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Nov 28, 2024
1 parent e950ee1 commit 572a064
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/build-support/appimage/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ rec {
];
};

extract = args@{ name ? "${args.pname}-${args.version}", postExtract ? "", src, ... }: pkgs.runCommand "${name}-extracted" {
extract = args@{ pname, version, name ? null, postExtract ? "", src, ... }:
if name != null then
throw "The 'name' argument is deprecated. Use 'pname' and 'version' instead to construct the name."
else
pkgs.runCommand "${pname}-${version}-extracted" {
buildInputs = [ appimage-exec ];
} ''
appimage-exec.sh -x $out ${src}
Expand Down Expand Up @@ -58,7 +62,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)
Expand Down

0 comments on commit 572a064

Please sign in to comment.