treewide: use nativeBuildInputs in appimage builder derivations

This commit is contained in:
Artturin 2024-09-25 23:01:28 +03:00
parent f7ef27a982
commit 4cb379f4d7
16 changed files with 30 additions and 17 deletions

View File

@ -9,10 +9,11 @@ appimageTools.wrapType2 rec {
sha256 = "sha256-NwoV1eeAN0u9VXWpu5mANXhmgqe8u3h7BlsREP1f/pI=";
};
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
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

@ -14,13 +14,12 @@ let
in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
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
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

@ -16,13 +16,14 @@ in
appimageTools.wrapType2 rec {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
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
install -m 444 -D ledger-live-desktop_512.png $out/share/icons/hicolor/512x512/apps/ledger-live-desktop.png
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram "$out/bin/${pname}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"

View File

@ -44,13 +44,13 @@ let
linux = appimageTools.wrapType2 rec {
inherit pname version src meta;
nativeBuildInputs = [ makeWrapper ];
profile = ''
export LC_ALL=C.UTF-8
'';
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${appimageContents}/@joplinapp-desktop.desktop -t $out/share/applications

View File

@ -22,6 +22,8 @@ appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';
nativeBuildInputs = [ makeWrapper ];
extraPkgs = pkgs: [ pkgs.at-spi2-atk pkgs.at-spi2-core ];
extraInstallCommands = ''
@ -30,7 +32,6 @@ appimageTools.wrapType2 rec {
$out/share/icons/hicolor/1024x1024/apps/notable.png
substituteInPlace $out/share/applications/notable.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram "$out/bin/${pname}" \
--add-flags "--disable-seccomp-filter-sandbox"
'';

View File

@ -26,8 +26,9 @@ appimageTools.wrapType2 rec {
pkgs.pandoc
];
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/zettlr \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/Zettlr.desktop

View File

@ -9,9 +9,10 @@ in
appimageTools.wrapType2 {
inherit pname version src meta;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands =
''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop

View File

@ -22,6 +22,8 @@ in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
profile = ''
export LC_ALL=C.UTF-8
'';
@ -38,7 +40,6 @@ appimageTools.wrapType2 {
cp ${extracted}/losslesscut.desktop $out/share/applications
substituteInPlace $out/share/applications/losslesscut.desktop \
--replace AppRun losslesscut
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram "$out/bin/losslesscut" \
--add-flags "--disable-seccomp-filter-sandbox"
'';

View File

@ -12,10 +12,11 @@ let
in appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraPkgs = pkgs: [ pkgs.libsecret ];
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}

View File

@ -31,6 +31,8 @@ appimageTools.wrapAppImage {
# taken from
# https://github.com/Dygmalab/Bazecor/blob/v1.4.4/src/main/utils/udev.ts#L6
nativeBuildInputs = [ makeWrapper ];
extraPkgs = pkgs: [ pkgs.glib ];
# Also expose the udev rules here, so it can be used as:
@ -38,7 +40,6 @@ appimageTools.wrapAppImage {
# to allow non-root modifications to the keyboards.
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/bazecor \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -29,8 +29,9 @@ in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${appimageContents}/${pname}.desktop -t $out/share/applications/

View File

@ -33,13 +33,14 @@ let
src = desktop;
inherit pname version;
nativeBuildInputs = [ makeWrapper ];
extraPkgs = pkgs: [ pkgs.libthai ];
extraInstallCommands = ''
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
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/caido \
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
'';

View File

@ -13,10 +13,11 @@ appimageTools.wrapType2 rec {
hash = "sha512-hzW7khHfWEYPtzMmedy/dXqKh7LPniqI7/0F1FtBtrlDnEIEQUq/7VUcygsVTBI6kuj8vTG5+PYcLez+cYAjqg==";
};
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/lunarclient \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -Dm444 ${contents}/lunarclient.desktop -t $out/share/applications/

View File

@ -17,8 +17,9 @@ in
appimageTools.wrapType2 {
inherit pname src version;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/muffon \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${appimageContents}/muffon.desktop -t $out/share/applications

View File

@ -14,8 +14,9 @@ in
appimageTools.wrapType2 {
inherit src pname version;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
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

@ -16,10 +16,11 @@ in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands =
let contents = appimageTools.extract { inherit pname version src; };
in ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/wootility \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"