Merge pull request #271071 from pbsds/wrapAppImage-pname-redux

appimageTools.wrapAppImage: remove version from `pname`
This commit is contained in:
Atemu 2024-04-24 21:48:19 +02:00 committed by GitHub
commit 2432c6b829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
98 changed files with 84 additions and 239 deletions

View File

@ -6,7 +6,11 @@ It uses Linux' namespaces feature to create temporary lightweight environments w
Accepted arguments are:
- `name`
The name of the environment and the wrapper executable.
The name of the environment, and the wrapper executable if `pname` is unset.
- `pname`
The pname of the environment and the wrapper executable.
- `version`
The version of the environment.
- `targetPkgs`
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`

View File

@ -208,6 +208,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `cudaPackages.autoFixElfFiles` has been deprecated for `pkgs.autoFixElfFiles`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.
- `appimageTools.wrapAppImage` now create the binary at `$out/bin/${pname}` rather than `$out/bin/${pname}-${version}`, which will break downstream workarounds.
- `pdns` was updated to version [v4.9.x](https://doc.powerdns.com/authoritative/changelog/4.9.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-4-9-0) for details.
- `unrar` was updated to v7. See [changelog](https://www.rarlab.com/unrar7notes.htm) for more information.
@ -495,6 +497,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `boot.initrd.network.ssh.authorizedKeyFiles` is a new option in the initrd ssh daemon module, for adding authorized keys via list of files.
- `appimage`, `appimageTools.wrapAppImage` and `buildFHSEnvBubblewrap` now properly accepts `pname` and `version`.
- Programs written in [Nim](https://nim-lang.org/) are built with libraries selected by lockfiles.
The `nimPackages` and `nim2Packages` sets have been removed.
See https://nixos.org/manual/nixpkgs/unstable#nim for more information.

View File

@ -12,8 +12,6 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -17,8 +17,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
mkdir -p $out/share/${pname}
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/usr/share/icons $out/share/

View File

@ -21,10 +21,6 @@ appimageTools.wrapType2 {
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
# unless linked, the binary is placed in $out/bin/nuclear-someVersion
# link it to $out/bin/nuclear
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
'';
meta = with lib; {

View File

@ -20,7 +20,6 @@ in appimageTools.wrapType2 {
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop
install -m 444 -D ${appimageContents}/plexamp.png \
$out/share/icons/hicolor/512x512/apps/plexamp.png

View File

@ -16,8 +16,6 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}'
@ -33,4 +31,3 @@ appimageTools.wrapType2 rec {
mainProgram = "sonixd";
};
}

View File

@ -3,19 +3,17 @@
let
pname = "chain-desktop-wallet";
version = "0.1.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${name}-x86_64.AppImage";
url = "https://github.com/crypto-com/${pname}/releases/download/v${version}/${pname}-${version}-x86_64.AppImage";
sha256 = "12076hf8dlz0hg1pb2ixwlslrh8gi6s1iawnvhnn6vz4jmjvq356";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png
install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png

View File

@ -16,7 +16,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/frame.desktop $out/share/applications/frame.desktop
install -m 444 -D ${appimageContents}/frame.png \
$out/share/icons/hicolor/512x512/apps/frame.png

View File

@ -17,7 +17,6 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/ledger-live-desktop.desktop $out/share/applications/ledger-live-desktop.desktop
install -m 444 -D ${appimageContents}/ledger-live-desktop.png $out/share/icons/hicolor/1024x1024/apps/ledger-live-desktop.png
${imagemagick}/bin/convert ${appimageContents}/ledger-live-desktop.png -resize 512x512 ledger-live-desktop_512.png

View File

@ -5,7 +5,6 @@ let
pname = "MyCrypto";
version = "1.7.17";
sha256 = "20eb48989b5ae5e60e438eff6830ac79a0d89ac26dff058097260e747e866444"; # Taken from release's checksums.txt.gpg
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/mycryptohq/mycrypto/releases/download/${version}/linux-x86-64_${version}_MyCrypto.AppImage";
@ -13,7 +12,7 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
desktopItem = makeDesktopItem {
@ -26,14 +25,12 @@ let
};
in appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
multiArch = false; # no p32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
mkdir -p $out/share
cp -rt $out/share ${desktopItem}/share/applications ${appimageContents}/usr/share/icons
chmod -R +w $out/share

View File

@ -12,8 +12,6 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${contents}/zecwallet-lite.desktop -t $out/share/applications
substituteInPlace $out/share/applications/zecwallet-lite.desktop \
--replace 'Exec=AppRun' "Exec=$out/bin/zecwallet-lite"

View File

@ -19,7 +19,6 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -12,10 +12,6 @@ appimageTools.wrapType1 rec {
curl "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
'';
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
'';
meta = with lib; {
description = "Reference Image Viewer";
homepage = "https://www.pureref.com";

View File

@ -26,8 +26,6 @@ in
cp ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
cp ${appimageContents}/${pname}.png $out/share/pixmaps/${pname}.png
mv $out/bin/${pname}-${version} $out/bin/${pname}
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname}'
'';

View File

@ -37,8 +37,6 @@ appimageTools.wrapAppImage rec {
# to allow non-root modifications to the keyboards.
extraInstallCommands = ''
mv $out/bin/bazecor-* $out/bin/bazecor
install -m 444 -D ${src}/Bazecor.desktop -t $out/share/applications
substituteInPlace $out/share/applications/Bazecor.desktop \
--replace 'Exec=Bazecor' 'Exec=bazecor'

View File

@ -3,7 +3,6 @@
let
version = "0.7.2";
pname = "devdocs-desktop";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/egoist/devdocs-desktop/releases/download/v${version}/DevDocs-${version}.AppImage";
@ -11,14 +10,13 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/devdocs.desktop $out/share/applications/devdocs.desktop
install -m 444 -D ${appimageContents}/devdocs.png $out/share/icons/hicolor/0x0/apps/devdocs.png
substituteInPlace $out/share/applications/devdocs.desktop \

View File

@ -16,7 +16,6 @@ in appimageTools.wrapType2 {
extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/pixmaps
mv $out/bin/${pname}-${version} $out/bin/firefly-desktop
cp ${appimageContents}/desktop.desktop $out/share/applications/firefly-desktop.desktop
substituteInPlace $out/share/applications/firefly-desktop.desktop \
--replace 'Exec=AppRun' 'Exec=firefly-desktop' \

View File

@ -11,10 +11,6 @@ let
in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
'';
meta = with lib; {
description = "A cross platform app for quick and easy still image camera matching";
license = licenses.gpl3;

View File

@ -17,7 +17,7 @@ appimageTools.wrapType2 {
extraPkgs = pkgs: with pkgs; [ R zlib libusb-compat-0_1 ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/GoldenCheetah
mv $out/bin/${pname} $out/bin/GoldenCheetah
mkdir -p $out/share/applications
mkdir -p $out/share/pixmaps
cp ${appimageContents}/GoldenCheetah.desktop $out/share/applications/

View File

@ -52,7 +52,6 @@ let
multiArch = false; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}"

View File

@ -18,8 +18,6 @@ appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \

View File

@ -27,9 +27,6 @@ appimageTools.wrapType2 rec {
];
extraInstallCommands = ''
# Strip version from binary name.
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/marktext.desktop $out/share/applications/marktext.desktop
substituteInPlace $out/share/applications/marktext.desktop \
--replace "Exec=AppRun" "Exec=${pname} --"

View File

@ -2,21 +2,19 @@
let
pname = "neo4j-desktop";
version = "1.5.8";
name = "${pname}-${version}";
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/dist.neo4j.org/${pname}/linux-offline/${name}-x86_64.AppImage";
url = "https://s3-eu-west-1.amazonaws.com/dist.neo4j.org/${pname}/linux-offline/${pname}-${version}-x86_64.AppImage";
hash = "sha256-RqzR4TuvDasbkj/wKvOOS7r46sXDxvw3B5ydFGZeHX8=";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraPkgs = pkgs: with pkgs; [ libsecret ];
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 'Exec=AppRun' 'Exec=${pname}'

View File

@ -5,15 +5,13 @@ let
version = "1.8.4";
sha256 = "0rvz8zwsi62kiq89pv8n2wh9h5yb030kvdr1vf65xwqkhqcrzrby";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/notable/notable/releases/download/v${version}/Notable-${version}.AppImage";
inherit sha256;
};
appimageContents = appimageTools.extract {
inherit name src;
inherit pname version src;
};
nativeBuildInputs = [ makeWrapper ];
@ -29,7 +27,6 @@ appimageTools.wrapType2 rec {
multiArch = false; # no 32bit needed
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.at-spi2-atk p.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 -D ${appimageContents}/notable.desktop $out/share/applications/notable.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/1024x1024/apps/notable.png \
$out/share/icons/hicolor/1024x1024/apps/notable.png

View File

@ -51,7 +51,6 @@ let
multiPkgs = null; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
install -Dm444 ${appimageContents}/notesnook.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/notesnook.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/notesnook.desktop \

View File

@ -12,7 +12,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
mkdir -p $out/share/{applications,pixmaps}
cp ${appimageContents}/net.davidotek.pupgui2.desktop $out/share/applications/${pname}.desktop
cp ${appimageContents}/net.davidotek.pupgui2.png $out/share/pixmaps/${pname}.png

View File

@ -40,7 +40,7 @@ in
installPhase = ''
runHook preInstall
install -Dm755 ${appexec}/bin/remnote-${version} $out/bin/remnote
install -Dm755 ${appexec}/bin/remnote $out/bin/remnote
install -Dm444 "${desktopItem}/share/applications/"* -t $out/share/applications/
install -Dm444 ${icon} $out/share/pixmaps/remnote.png

View File

@ -28,7 +28,6 @@ in appimageTools.wrapAppImage {
extraInstallCommands = ''
# Add desktop convencience stuff
mv $out/bin/{${pname}-*,${pname}}
install -Dm444 ${appimageContents}/todoist.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/todoist.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/todoist.desktop \

View File

@ -10,22 +10,20 @@
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
let
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
inherit hash;
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in
appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
multiArch = false; # no 32bit needed
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ texliveMedium pandoc ];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/Zettlr.desktop
install -m 444 -D ${appimageContents}/Zettlr.png $out/share/icons/hicolor/512x512/apps/Zettlr.png
substituteInPlace $out/share/applications/Zettlr.desktop \

View File

@ -6,7 +6,7 @@ let
in
appimageTools.wrapType2 rec {
name = "${pname}-${version}";
inherit pname version;
src = fetchurl {
url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage";
@ -19,7 +19,6 @@ appimageTools.wrapType2 rec {
multiArch = false; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
meta = with lib; {
description = "Sylk WebRTC client";

View File

@ -20,7 +20,6 @@ in appimageTools.wrapType2 {
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png

View File

@ -19,8 +19,6 @@ appimageTools.wrapType2 {
unshareIpc = false;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/open-lens.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/open-lens.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png

View File

@ -6,19 +6,17 @@
let
pname = "cozydrive";
version = "3.38.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/cozy-labs/cozy-desktop/releases/download/v${version}/Cozy-Drive-${version}-x86_64.AppImage";
sha256 = "3liOzZVOjtV1cGrKlOKiFRRqnt8KHPr5Ye5HU0e/BYo=";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/cozydrive.desktop -t $out/share/applications
substituteInPlace $out/share/applications/cozydrive.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -14,8 +14,6 @@ in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
mkdir -p $out/share/${pname}
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications

View File

@ -35,8 +35,6 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
runHook preInstall
mv bin/${name} bin/${pname}
mkdir -p $out/
cp -r bin $out/bin

View File

@ -30,8 +30,6 @@ in
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},caprine}
mkdir -p $out/share
"${xorg.lndir}/bin/lndir" -silent "${extracted}/usr/share" "$out/share"
ln -s ${extracted}/caprine.png $out/share/icons/caprine.png

View File

@ -14,8 +14,6 @@ in appimageTools.wrapType2 {
inherit src pname version;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -44,8 +44,6 @@ stdenvNoCC.mkDerivation {
installPhase = ''
runHook preInstall
mv bin/session-desktop-${version} bin/session-desktop
mkdir -p $out/
cp -r bin $out/bin

View File

@ -23,7 +23,6 @@ in appimageTools.wrapType2 {
runScript = "appimage-exec.sh -w ${appimageContents} -- \${NIXOS_OZONE_WL:+\${WAYLAND_DISPLAY:+--ozone-platform-hint=auto}}";
extraInstallCommands = ''
mv "$out/bin/${pname}-${version}" "$out/bin/${pname}"
install -m 444 -D ${appimageContents}/zulip.desktop $out/share/applications/zulip.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/zulip.png \
$out/share/icons/hicolor/512x512/apps/zulip.png

View File

@ -3,7 +3,6 @@
let
pname = "irccloud";
version = "0.16.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
@ -11,16 +10,15 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraPkgs = pkgs: with pkgs; [ at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
$out/share/icons/hicolor/512x512/apps/irccloud.png

View File

@ -3,19 +3,17 @@
let
pname = "electron-mail";
version = "5.1.8";
name = "ElectronMail-${version}";
src = fetchurl {
url = "https://github.com/vladimiry/ElectronMail/releases/download/v${version}/electron-mail-${version}-linux-x86_64.AppImage";
sha256 = "sha256-btqlxFrQUyb728i99IE65A9jwEFNvJ5b6zji0kwwATU=";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
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 'Exec=AppRun' 'Exec=${pname}'

View File

@ -17,8 +17,6 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let appimageContents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm 444 ${appimageContents}/tutanota-desktop.desktop -t $out/share/applications
install -Dm 444 ${appimageContents}/tutanota-desktop.png -t $out/share/pixmaps

View File

@ -14,8 +14,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
mkdir -p $out/share/${pname}
cp -a ${appimageContents}/locales $out/share/${pname}
cp -a ${appimageContents}/resources $out/share/${pname}

View File

@ -3,7 +3,6 @@
let
pname = "station";
version = "1.52.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/getstation/desktop-app-releases/releases/download/${version}/Station-${version}-x86_64.AppImage";
@ -11,10 +10,10 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
profile = ''
export LC_ALL=C.UTF-8
@ -23,7 +22,6 @@ in appimageTools.wrapType2 rec {
multiArch = false;
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 -D ${appimageContents}/browserx.desktop $out/share/applications/browserx.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/browserx.png \
$out/share/icons/hicolor/512x512/apps/browserx.png

View File

@ -23,7 +23,7 @@ in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/$name $out/bin/${executableName}
mv $out/bin/$pname $out/bin/${executableName}
install -m 444 -D ${appimageContents}/${executableName}.desktop $out/share/applications/${executableName}.desktop
${imagemagick}/bin/convert ${appimageContents}/${executableName}.png -resize 512x512 ${pname}_512.png
install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${executableName}.png

View File

@ -2,20 +2,17 @@
let
pname = "notion-app-enhanced";
version = "2.0.18-1";
name = "${pname}-v${version}";
src = fetchurl {
url = "https://github.com/notion-enhancer/notion-repackaged/releases/download/v${version}/Notion-Enhanced-${version}.AppImage";
sha256 = "sha256-SqeMnoMzxxaViJ3NPccj3kyMc1xvXWULM6hQIDZySWY=";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
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 'Exec=AppRun' 'Exec=${pname}'

View File

@ -1,8 +1,8 @@
{ lib, stdenv, appimageTools, desktop-file-utils, fetchurl }:
let
pname = "p3x-onenote";
version = "2023.4.117";
name = "p3x-onenote-${version}";
plat = {
aarch64-linux = "-arm64";
@ -22,18 +22,17 @@ let
};
appimageContents = appimageTools.extractType2 {
inherit name src;
inherit pname version src;
};
in
appimageTools.wrapType2 rec {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mkdir -p $out/share/pixmaps $out/share/licenses/p3x-onenote
cp ${appimageContents}/p3x-onenote.png $out/share/pixmaps/
cp ${appimageContents}/p3x-onenote.desktop $out
cp ${appimageContents}/LICENSE.electron.txt $out/share/licenses/p3x-onenote/LICENSE
mv $out/bin/${name} $out/bin/p3x-onenote
${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value $out/bin/p3x-onenote \

View File

@ -24,7 +24,6 @@ in appimageTools.wrapType2 rec {
];
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
install -m 444 -D ${appimageContents}/timeular.desktop $out/share/applications/timeular.desktop
install -m 444 -D ${appimageContents}/timeular.png $out/share/icons/hicolor/512x512/apps/timeular.png
substituteInPlace $out/share/applications/timeular.desktop \

View File

@ -34,7 +34,6 @@ in appimageTools.wrapType2 rec {
multiArch = false; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
mkdir "$out/share"
ln -s "${desktopItem}/share/applications" "$out/share/"
'';

View File

@ -19,9 +19,7 @@ appimageTools.wrapType2 {
unshareIpc = false;
extraInstallCommands = ''
mkdir -p $out/bin
mv $out/bin/jbrowse-${version} $out/bin/jbrowse-desktop
mv $out/bin/jbrowse $out/bin/jbrowse-desktop
install -m 444 -D ${appimageContents}/jbrowse-desktop.desktop $out/share/applications/jbrowse-desktop.desktop
install -m 444 -D ${appimageContents}/jbrowse-desktop.png \
$out/share/icons/hicolor/512x512/apps/jbrowse-desktop.png

View File

@ -1,9 +1,8 @@
{ lib, stdenv, appimageTools, autoPatchelfHook, zlib, fetchurl, undmg }:
{ lib, stdenv, appimageTools, autoPatchelfHook, zlib, fetchurl, undmg, libgcc }:
let
pname = "radicle-upstream";
version = "0.3.0";
name = "${pname}-${version}";
srcs = {
x86_64-linux = fetchurl {
@ -17,7 +16,7 @@ let
};
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
contents = appimageTools.extract { inherit name src; };
contents = appimageTools.extract { inherit pname version src; };
git-remote-rad = stdenv.mkDerivation rec {
pname = "git-remote-rad";
@ -25,11 +24,11 @@ let
src = contents;
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ zlib ];
buildInputs = [ libgcc zlib ];
installPhase = ''
mkdir -p $out/bin/
cp ${contents}/resources/git-remote-rad $out/bin/git-remote-rad
install -Dm755 ${contents}/resources/git-remote-rad $out/bin/git-remote-rad
'';
};
@ -37,11 +36,9 @@ let
# v0.1.0) uses unstable rust features, making a from source build impossible at
# this time. See this PR for discussion: https://github.com/NixOS/nixpkgs/pull/105674
linux = appimageTools.wrapType2 {
inherit name src meta;
inherit pname version src meta;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
# this automatically adds the git-remote-rad binary to the users `PATH` so
# they don't need to mess around with shell profiles...
ln -s ${git-remote-rad}/bin/git-remote-rad $out/bin/git-remote-rad

View File

@ -181,7 +181,6 @@ let
in
buildFHSEnv {
inherit (davinci) pname version;
name = null;
targetPkgs = pkgs: with pkgs; [
alsa-lib

View File

@ -2,21 +2,18 @@
let
pname = "electronplayer";
version = "2.0.8";
name = "${pname}-${version}";
#TODO: remove the -rc4 from the tag in the url when possible
src = fetchurl {
url = "https://github.com/oscartbeaumont/ElectronPlayer/releases/download/v${version}-rc4/${name}.AppImage";
url = "https://github.com/oscartbeaumont/ElectronPlayer/releases/download/v${version}-rc4/${pname}-${version}.AppImage";
sha256 = "wAsmSFdbRPnYnDyWQSbtyj+GLJLN7ibksUE7cegfkhI=";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=ElectronPlayer'

View File

@ -1,14 +1,12 @@
{ lib, fetchurl, appimageTools}:
let
appimageTools.wrapAppImage rec {
pname = "lbry-desktop";
version = "0.53.9";
in appimageTools.wrapAppImage rec {
name = "${pname}-${version}";
# Fetch from GitHub Releases and extract
src = appimageTools.extract {
inherit name;
inherit pname version;
src = fetchurl {
url = "https://github.com/lbryio/lbry-desktop/releases/download/v${version}/LBRY_${version}.AppImage";
# Gotten from latest-linux.yml
@ -24,7 +22,7 @@ in appimageTools.wrapAppImage rec {
# General fixup
extraInstallCommands = ''
# Firstly, rename the executable to lbry for convinence
mv $out/bin/${name} $out/bin/lbry
mv $out/bin/${pname} $out/bin/lbry
# Now, install assets such as the desktop file and icons
install -m 444 -D ${src}/lbry.desktop -t $out/share/applications

View File

@ -32,7 +32,6 @@ in
extraPkgs = ps: appimageTools.defaultFhsEnvArgs.multiPkgs ps;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},losslesscut}
(
mkdir -p $out/share
cd ${extracted}/usr

View File

@ -12,7 +12,6 @@ in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D \
${appimageContents}/@molotovdesktop-wrapper.desktop \
$out/share/applications/${pname}.desktop

View File

@ -39,15 +39,12 @@ rec {
wrapType1 = wrapType2;
wrapAppImage = args@{
name ? "${args.pname}-${args.version}",
src,
extraPkgs,
meta ? {},
...
}: buildFHSEnv
(defaultFhsEnvArgs // {
inherit name;
targetPkgs = pkgs: [ appimage-exec ]
++ defaultFhsEnvArgs.targetPkgs pkgs ++ extraPkgs pkgs;
@ -56,12 +53,12 @@ rec {
meta = {
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
} // meta;
} // (removeAttrs args ([ "pname" "version" ] ++ (builtins.attrNames (builtins.functionArgs wrapAppImage)))));
} // (removeAttrs args (builtins.attrNames (builtins.functionArgs wrapAppImage))));
wrapType2 = args@{ name ? "${args.pname}-${args.version}", src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage
wrapType2 = args@{ src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage
(args // {
inherit name extraPkgs;
src = extract { inherit name src; };
inherit extraPkgs;
src = extract (lib.filterAttrs (key: value: builtins.elem key [ "name" "pname" "version" "src" ]) args);
# passthru src to make nix-update work
# hack to keep the origin position (unsafeGetAttrPos)
@ -73,8 +70,6 @@ rec {
});
defaultFhsEnvArgs = {
name = "appimage-env";
# Most of the packages were taken from the Steam chroot
targetPkgs = pkgs: with pkgs; [
gtk3

View File

@ -8,14 +8,14 @@
, pkgsi686Linux
}:
{ name ? null
, profile ? ""
{ profile ? ""
, targetPkgs ? pkgs: []
, multiPkgs ? pkgs: []
, multiArch ? false # Whether to include 32bit packages
, extraBuildCommands ? ""
, extraBuildCommandsMulti ? ""
, extraOutputsToInstall ? []
, ... # for name, or pname+version
} @ args:
# HOWTO:
@ -36,6 +36,10 @@
let
inherit (stdenv) is64bit;
name = if (args ? pname && args ? version)
then "${args.pname}-${args.version}"
else args.name;
# "use of glibc_multi is only supported on x86_64-linux"
isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
isTargetBuild = !isMultiBuild;

View File

@ -9,10 +9,7 @@
, bubblewrap
}:
{ name ? null
, pname ? null
, version ? null
, runScript ? "bash"
{ runScript ? "bash"
, extraInstallCommands ? ""
, meta ? {}
, passthru ? {}
@ -29,7 +26,7 @@
, ...
} @ args:
assert (pname != null || version != null) -> (name == null && pname != null); # You must declare either a name or pname + version (preferred).
assert (!args ? pname || !args ? version) -> (args ? name); # You must provide name if pname or version (preferred) is missing.
let
inherit (lib)
@ -43,16 +40,16 @@ let
inherit (lib.attrsets) removeAttrs;
pname = if args ? name && args.name != null then args.name else args.pname;
versionStr = optionalString (version != null) ("-" + version);
name = pname + versionStr;
name = args.name or "${args.pname}-${args.version}";
executableName = args.pname or args.name;
# we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal
nameAttrs = lib.filterAttrs (key: value: builtins.elem key [ "name" "pname" "version" ]) args;
buildFHSEnv = callPackage ./buildFHSEnv.nix { };
fhsenv = buildFHSEnv (removeAttrs (args // { inherit name; }) [
fhsenv = buildFHSEnv (removeAttrs args [
"runScript" "extraInstallCommands" "meta" "passthru" "extraPreBwrapCmds" "extraBwrapArgs" "dieWithParent"
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc" "privateTmp"
"pname" "version"
]);
etcBindEntries = let
@ -270,8 +267,7 @@ let
'';
bin = writeShellScript "${name}-bwrap" (bwrapCmd { initArgs = ''"$@"''; });
in runCommandLocal name {
inherit pname version;
in runCommandLocal name (nameAttrs // {
inherit meta;
passthru = passthru // {
@ -285,9 +281,9 @@ in runCommandLocal name {
'';
inherit args fhsenv;
};
} ''
}) ''
mkdir -p $out/bin
ln -s ${bin} $out/bin/${pname}
ln -s ${bin} $out/bin/${executableName}
${extraInstallCommands}
''

View File

@ -16,8 +16,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/alvr-${version} $out/bin/alvr
install -Dm444 ${appimageContents}/alvr.desktop -t $out/share/applications
substituteInPlace $out/share/applications/alvr.desktop \
--replace 'Exec=alvr_dashboard' 'Exec=alvr'

View File

@ -18,8 +18,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
install -Dm444 ${appimageContents}/${pname}.desktop -t $out/share/applications/
install -Dm444 ${appimageContents}/${pname}.png -t $out/share/pixmaps/
'';

View File

@ -30,7 +30,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -19,7 +19,6 @@ in appimageTools.wrapType2 {
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libthai ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/caido.desktop -t $out/share/applications
install -m 444 -D ${appimageContents}/caido.png \
$out/share/icons/hicolor/512x512/apps/caido.png

View File

@ -22,8 +22,6 @@ in appimageTools.wrapType2 rec {
# to allow non-root modifications to the keyboards.
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 \
-D ${appimageContents}/usr/lib/chrysalis/resources/static/udev/60-kaleidoscope.rules \
-t $out/lib/udev/rules.d

View File

@ -17,8 +17,6 @@ in appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/HiFile.desktop $out/share/applications/HiFile.desktop
install -m 444 -D ${appimageContents}/HiFile.png $out/share/icons/hicolor/512x512/apps/HiFile.png
substituteInPlace $out/share/applications/HiFile.desktop \

View File

@ -63,8 +63,6 @@ else appimageTools.wrapType2 {
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
''
mv $out/bin/${pname}-${version} $out/bin/${pname}
# Install .desktop files
install -Dm444 ${appimageContents}/hoppscotch.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/hoppscotch.png -t $out/share/pixmaps

View File

@ -7,8 +7,4 @@
appimageTools.wrapType2 rec {
inherit pname version src meta;
name = "${pname}-${version}";
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
'';
}

View File

@ -17,7 +17,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/jan-${version} $out/bin/jan
install -Dm444 ${appimageContents}/jan.desktop -t $out/share/applications
substituteInPlace $out/share/applications/jan.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=jan'

View File

@ -47,7 +47,7 @@ stdenv.mkDerivation {
runHook preInstall
install -Dm644 ${appimageContents}/.DirIcon $out/share/icons/hicolor/scalable/apps/jetbrains-toolbox.svg
makeWrapper ${appimage}/bin/${pname}-${version} $out/bin/${pname} \
makeWrapper ${appimage}/bin/${pname} $out/bin/${pname} \
--append-flags "--update-failed" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [icu]}

View File

@ -23,7 +23,7 @@ appimageTools.wrapType2 rec {
cp -r ${contents}/{locales,resources} "$out/share/lib/kchat"
cp -r ${contents}/usr/* "$out"
cp "${contents}/kchat-desktop.desktop" "$out/share/applications/"
mv "$out/bin/kchat-${version}" "$out/bin/${meta.mainProgram}"
mv "$out/bin/kchat" "$out/bin/${meta.mainProgram}" || true
substituteInPlace $out/share/applications/kchat-desktop.desktop --replace 'Exec=AppRun' 'Exec=${meta.mainProgram}'
'';

View File

@ -23,7 +23,7 @@ appimageTools.wrapType2 rec {
cp -r ${contents}/{locales,resources} "$out/share/lib/kmeet"
cp -r ${contents}/usr/* "$out"
cp "${contents}/kMeet.desktop" "$out/share/applications/"
mv "$out/bin/kmeet-${version}" "$out/bin/${meta.mainProgram}"
mv "$out/bin/kmeet" "$out/bin/${meta.mainProgram}" || true
substituteInPlace $out/share/applications/kMeet.desktop --replace 'Exec=AppRun' 'Exec=${meta.mainProgram}'
'';

View File

@ -13,7 +13,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/listen1.desktop -t $out/share/applications
substituteInPlace $out/share/applications/listen1.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -20,7 +20,6 @@ appimageTools.wrapType2 {
extraInstallCommands = ''
mkdir -p $out/share/applications
mv $out/bin/lmstudio-${version} $out/bin/lmstudio
cp -r ${appimageContents}/usr/share/icons $out/share
install -m 444 -D ${appimageContents}/lm-studio.desktop -t $out/share/applications
substituteInPlace $out/share/applications/lm-studio.desktop \

View File

@ -16,7 +16,6 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/{lunar-client-*,lunar-client}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/lunar-client \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -23,7 +23,6 @@ appimageTools.wrapType2 rec {
cp -r ${contents}/{locales,resources} "$out/share/lib/miru"
cp -r ${contents}/usr/* "$out"
cp "${contents}/${pname}.desktop" "$out/share/applications/"
mv "$out/bin/${pname}-${version}" "$out/bin/${pname}"
substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
'';

View File

@ -34,7 +34,6 @@ appimageTools.wrapType2 {
extraPkgs = pkgs: [ ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/1024x1024/apps/${pname}.png

View File

@ -68,9 +68,6 @@ if stdenv.isDarwin then stdenv.mkDerivation {
inherit pname version src;
};
in ''
# Replace version from binary name
mv $out/bin/${pname}-${version} $out/bin/${pname}
# Install XDG Desktop file and its icon
install -Dm444 ${appimageContents}/nosql-workbench.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/nosql-workbench.png -t $out/share/pixmaps

View File

@ -164,7 +164,7 @@ in
# Curl still needs to be in runtimeLibs because the library is used directly in other parts of the code.
# Fonts are also discovered by looking in /usr/share/fonts, so adding fonts to targetPkgs will include them
buildFHSEnv {
name = derivation.name;
inherit (derivation) pname version;
targetPkgs = pkgs': [
curl
@ -175,7 +175,6 @@ buildFHSEnv {
runScript = "/bin/onlyoffice-desktopeditors";
extraInstallCommands = ''
mv $out/bin/$name $out/bin/onlyoffice-desktopeditors
mkdir -p $out/share
ln -s ${derivation}/share/icons $out/share
cp -r ${derivation}/share/applications $out/share

View File

@ -15,8 +15,6 @@ appimageTools.wrapType2 rec {
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${contents}/@parsifydesktop.desktop -t $out/share/applications
substituteInPlace $out/share/applications/@parsifydesktop.desktop \

View File

@ -28,8 +28,6 @@ in appimageTools.wrapType2 {
];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install --mode=444 -D ${appimageContents}/chat.simplex.app.desktop --target-directory=$out/share/applications
substituteInPlace $out/share/applications/chat.simplex.app.desktop \
--replace 'Exec=simplex' 'Exec=${pname}'

View File

@ -65,9 +65,6 @@ else appimageTools.wrapType2 {
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
''
# Remove version from entrypoint
mv $out/bin/spacedrive-${version} $out/bin/spacedrive
# Install .desktop files
install -Dm444 ${appimageContents}/com.spacedrive.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/spacedrive.png -t $out/share/pixmaps

View File

@ -15,8 +15,6 @@ appimageTools.wrapType2 {
inherit src pname version;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -25,7 +25,6 @@ appimageTools.wrapType2 {
extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraInstallCommands = ''
ln -s $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png

View File

@ -13,8 +13,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/bstudio.desktop -t $out/share/applications
substituteInPlace $out/share/applications/bstudio.desktop \

View File

@ -52,7 +52,6 @@ let
fhsEnvAnki = buildFHSEnv (appimageTools.defaultFhsEnvArgs // {
inherit pname version;
name = null; # Appimage sets it to "appimage-env"
profile = ''
# anki vendors QT and mixing QT versions usually causes crashes

View File

@ -15,7 +15,6 @@ in
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/{${pname}-${version},${pname}}
install -Dm444 ${appimageContents}/BadlionClient.desktop $out/share/applications/BadlionClient.desktop
install -Dm444 ${appimageContents}/BadlionClient.png $out/share/pixmaps/BadlionClient.png
substituteInPlace $out/share/applications/BadlionClient.desktop \

View File

@ -64,7 +64,7 @@ else appimageTools.wrapType2 {
contents = appimageTools.extract { inherit pname version src; };
in
''
mv -v $out/bin/${pname}-${version} $out/bin/osu\!
mv -v $out/bin/${pname} $out/bin/osu\!
install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications
for i in 16 32 48 64 96 128 256 512 1024; do
install -D ${contents}/osu\!.png $out/share/icons/hicolor/''${i}x$i/apps/osu\!.png

View File

@ -2,20 +2,17 @@
let
pname = "betterdiscord-installer";
version = "1.0.0-beta";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/BetterDiscord/Installer/releases/download/v${version}/Betterdiscord-Linux.AppImage";
sha256 = "103acb11qmvjmf6g9lgsfm5jyahfwfdqw0x9w6lmv1hzwbs26dsr";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/betterdiscord.desktop -t $out/share/applications
substituteInPlace $out/share/applications/betterdiscord.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -35,7 +35,6 @@ in appimageTools.wrapAppImage {
extraInstallCommands = ''
# Add desktop convencience stuff
mv $out/bin/{${pname}-*,${pname}}
install -Dm444 ${appimageContents}/flexoptix-app.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/flexoptix-app.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/flexoptix-app.desktop \

View File

@ -2,20 +2,17 @@
let
pname = "mathpix-snipping-tool";
version = "03.00.0072";
name = "${pname}-${version}";
src = fetchurl {
url = "https://download.mathpix.com/linux/Mathpix_Snipping_Tool-x86_64.v${version}.AppImage";
sha256 = "1igg8wnshmg9f23qqw1gqb85h1aa3461c1n7dmgw6sn4lrrrh5ms";
};
appimageContents = appimageTools.extract { inherit name src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
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
cp -r ${appimageContents}/usr/share/icons $out/share

View File

@ -3,16 +3,15 @@
let
pname = "via";
version = "3.0.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/the-via/releases/releases/download/v${version}/via-${version}-linux.AppImage";
name = "via-${version}-linux.AppImage";
sha256 = "sha256-+uTvmrqHK7L5VA/lUHCZZeRYPUrcVA+vjG7venxuHhs=";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit name src;
inherit pname version src;
profile = ''
# Skip prompt to add udev rule.
@ -21,7 +20,6 @@ appimageTools.wrapType2 {
'';
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/via-nativia.desktop -t $out/share/applications
substituteInPlace $out/share/applications/via-nativia.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'

View File

@ -1,6 +1,5 @@
{ lib, fetchurl, appimageTools }:
let
name = "vial-${version}";
version = "0.7.1";
pname = "Vial";
@ -9,13 +8,12 @@ let
hash = "sha256-pOcrxZ6vbnbdE/H4Kxufxm/ZovaYBXjFpVpKZYV7f3c=";
};
appimageContents = appimageTools.extractType2 { inherit name src; };
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
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
cp -r ${appimageContents}/usr/share/icons $out/share

View File

@ -26,7 +26,6 @@ appimageTools.wrapType2 rec {
wooting-udev-rules
xorg.libxkbfile
]);
extraInstallCommands = "mv $out/bin/{${pname}-${version},${pname}}";
meta = with lib; {
homepage = "https://wooting.io/wootility";

View File

@ -21,8 +21,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share

View File

@ -19,8 +19,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share

View File

@ -18,8 +18,6 @@ appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
'';

View File

@ -15,7 +15,6 @@ in appimageTools.wrapType2 {
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/buttercup.desktop -t $out/share/applications
substituteInPlace $out/share/applications/buttercup.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'