diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-10-29 16:42:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 16:42:01 +0200 |
commit | 31b495592feadb2785279988a2d7db6e2bdd7ed2 (patch) | |
tree | e892b6f1a235286b85b965441661559ee91d1805 /pkgs/build-support | |
parent | befee44c7708dbbc93e9a5405269cfc70b1fc7ee (diff) | |
parent | 85e55011028b9b4fe914456c8dec8278308040ac (diff) |
Merge pull request #143347 from SuperSandro2000/appimage-wrapType2-pname-version
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/appimage/default.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index 9df241a48cadc..8a2b2324574b6 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -1,5 +1,4 @@ { lib - , bash , binutils-unwrapped , coreutils @@ -27,7 +26,7 @@ rec { ]; }; - extract = { name, src }: pkgs.runCommand "${name}-extracted" { + extract = args@{ name ? "${args.pname}-${args.version}", src, ... }: pkgs.runCommand "${name}-extracted" { buildInputs = [ appimage-exec ]; } '' appimage-exec.sh -x $out ${src} @@ -38,7 +37,7 @@ rec { extractType2 = extract; wrapType1 = wrapType2; - wrapAppImage = args@{ name, src, extraPkgs, ... }: buildFHSUserEnv + wrapAppImage = args@{ name ? "${args.pname}-${args.version}", src, extraPkgs, ... }: buildFHSUserEnv (defaultFhsEnvArgs // { inherit name; @@ -46,9 +45,9 @@ rec { ++ defaultFhsEnvArgs.targetPkgs pkgs ++ extraPkgs pkgs; runScript = "appimage-exec.sh -w ${src} --"; - } // (removeAttrs args (builtins.attrNames (builtins.functionArgs wrapAppImage)))); + } // (removeAttrs args ([ "pname" "version" ] ++ (builtins.attrNames (builtins.functionArgs wrapAppImage))))); - wrapType2 = args@{ name, src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage + wrapType2 = args@{ name ? "${args.pname}-${args.version}", src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage (args // { inherit name extraPkgs; src = extract { inherit name src; }; |