From eba559008c5fbfbbd3d3d50e9bb4465e1db8706a Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Thu, 9 Jun 2022 23:42:33 +0800 Subject: [PATCH] caprine-bin.x86_64-appimage: passthru pname version src Use pname version instead of name as appimageTools now support that Passthru pname version src for users' convenience --- .../caprine-bin/build-from-appimage.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/caprine-bin/build-from-appimage.nix b/pkgs/applications/networking/instant-messengers/caprine-bin/build-from-appimage.nix index d08e1cd1ba48..4194f4c22887 100644 --- a/pkgs/applications/networking/instant-messengers/caprine-bin/build-from-appimage.nix +++ b/pkgs/applications/networking/instant-messengers/caprine-bin/build-from-appimage.nix @@ -9,16 +9,19 @@ }: let - name = "${pname}-${version}"; src = fetchurl { url = "https://github.com/sindresorhus/caprine/releases/download/v${version}/Caprine-${version}.AppImage"; name = "Caprine-${version}.AppImage"; inherit sha256; }; - extracted = appimageTools.extractType2 { inherit name src; }; + extracted = appimageTools.extractType2 { inherit pname version src; }; in (appimageTools.wrapType2 { - inherit name src; + inherit pname version src; + + passthru = { + inherit pname version src; + }; profile = '' export LC_ALL=C.UTF-8 @@ -27,7 +30,7 @@ in extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs; extraInstallCommands = '' - mv $out/bin/{${name},caprine} + mv $out/bin/{${pname}-${version},caprine} mkdir -p $out/share "${xorg.lndir}/bin/lndir" -silent "${extracted}/usr/share" "$out/share" @@ -42,6 +45,4 @@ in platforms = [ "x86_64-linux" ]; mainProgram = "caprine"; }; -}) // { - inherit pname version; -} +})