Skip to content

Commit

Permalink
treewide: fix use of extraPkgs in AppImages
Browse files Browse the repository at this point in the history
Mostly removes unnecessary use of `extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs;`
This caused some packages to be listed twice.

Also, fix some styling, and accidental use of top-level packages (sometimes due to the `with;` keyword, e.g. on `beeper`).
  • Loading branch information
SuperSamus committed Apr 24, 2024
1 parent 2d8bd0f commit 3f21cfe
Show file tree
Hide file tree
Showing 42 changed files with 39 additions and 84 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/audio/plexamp/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, fetchurl, appimageTools, pkgs }:
{ lib, fetchurl, appimageTools }:

let
pname = "plexamp";
Expand All @@ -16,7 +16,7 @@ let
in appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraPkgs = pkgs: [ pkgs.bash ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/blockchains/mycrypto/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib, appimageTools, fetchurl, makeDesktopItem
}:
{ lib, appimageTools, fetchurl, makeDesktopItem }:

let
pname = "MyCrypto";
Expand Down Expand Up @@ -27,8 +26,6 @@ let
in appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;

extraInstallCommands = ''
mkdir -p $out/share
cp -rt $out/share ${desktopItem}/share/applications ${appimageContents}/usr/share/icons
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/graphics/upscayl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in
appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: with pkgs; [vulkan-headers vulkan-loader];
extraPkgs = pkgs: [ pkgs.vulkan-headers pkgs.vulkan-loader ];

extraInstallCommands = ''
mkdir -p $out/share/{applications,pixmaps}
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/bazecor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ appimageTools.wrapAppImage rec {
# taken from
# https://github.com/Dygmalab/Bazecor/blob/v1.3.11/src/main/utils/udev.ts#L6

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.glib
];
extraPkgs = pkgs: [ pkgs.glib ];

# Also expose the udev rules here, so it can be used as:
# services.udev.packages = [ pkgs.bazecor ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/firefly-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let
in appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/pixmaps
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/golden-cheetah-bin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
appimageTools.wrapType2 {
inherit pname src version;

extraPkgs = pkgs: with pkgs; [ R zlib libusb-compat-0_1 ];
extraPkgs = pkgs: [ pkgs.R pkgs.zlib pkgs.libusb-compat-0_1 ];

extraInstallCommands = ''
mv $out/bin/${pname} $out/bin/GoldenCheetah
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/joplin-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ let
export LC_ALL=C.UTF-8
'';

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/misc/marktext/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.libsecret
p.xorg.libxkbfile
];
extraPkgs = pkgs: [ pkgs.libsecret pkgs.xorg.libxkbfile ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/marktext.desktop $out/share/applications/marktext.desktop
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/mobilecoin-wallet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
in appimageTools.wrapType2 {
inherit name src;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/neo4j-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let
in appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: with pkgs; [ libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
Expand Down
5 changes: 2 additions & 3 deletions pkgs/applications/misc/notable/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ let
appimageContents = appimageTools.extract {
inherit pname version src;
};

nativeBuildInputs = [ makeWrapper ];
in
appimageTools.wrapType2 rec {

Expand All @@ -24,7 +22,8 @@ appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.at-spi2-atk p.at-spi2-core ];
extraPkgs = pkgs: [ pkgs.at-spi2-atk pkgs.at-spi2-core ];

extraInstallCommands = ''
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 \
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/notesnook/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ let
export LC_ALL=C.UTF-8
'';

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
install -Dm444 ${appimageContents}/notesnook.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/notesnook.png -t $out/share/pixmaps
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/todoist-electron/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ in appimageTools.wrapAppImage {
inherit pname version;
src = appimageContents;

extraPkgs = { pkgs, ... }@args: [
pkgs.hidapi
] ++ appimageTools.defaultFhsEnvArgs.multiPkgs args;
extraPkgs = pkgs: [ pkgs.hidapi ];

extraInstallCommands = ''
# Add desktop convencience stuff
Expand Down
5 changes: 2 additions & 3 deletions pkgs/applications/misc/zettlr/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
, appimageTools
, lib
, fetchurl
, texliveMedium
, pandoc
}:

# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
Expand All @@ -21,7 +19,8 @@ in
appimageTools.wrapType2 rec {
inherit pname version src;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ texliveMedium pandoc ];
extraPkgs = pkgs: [ pkgs.texliveMedium pkgs.pandoc ];

extraInstallCommands = ''
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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/networking/Sylk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;

meta = with lib; {
description = "Sylk WebRTC client";
homepage = "https://sylkserver.com/";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/browsers/polypane/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let
in appimageTools.wrapType2 {
inherit pname src version;

extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
extraPkgs = pkgs: [ pkgs.bash ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/cluster/lens/linux.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, pname, version, src, meta, appimageTools, makeWrapper, nss_latest }:
{ pname, version, src, meta, appimageTools, makeWrapper }:
let

name = "${pname}-${version}";
Expand All @@ -25,5 +25,5 @@ appimageTools.wrapType2 {
--replace 'Exec=AppRun' 'Exec=${pname}'
'';

extraPkgs = _: [ nss_latest ];
extraPkgs = pkgs: [ pkgs.nss_latest ];
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, stdenvNoCC
, fetchurl
, appimageTools
, libsecret
, makeWrapper
, writeShellApplication
, curl
Expand All @@ -19,7 +18,7 @@ let
};
appimage = appimageTools.wrapType2 {
inherit version pname src;
extraPkgs = pkgs: with pkgs; [ libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];
};
appimageContents = appimageTools.extractType2 {
inherit version pname src;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, fetchurl
{ fetchurl
, appimageTools
, xorg
, pname
Expand Down Expand Up @@ -27,8 +26,6 @@ in
export LC_ALL=C.UTF-8
'';

extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs;

extraInstallCommands = ''
mkdir -p $out/share
"${xorg.lndir}/bin/lndir" -silent "${extracted}/usr/share" "$out/share"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ appimageTools.wrapType2 {
install -Dm644 ${desktopItem}/share/applications/* $out/share/applications
'';

extraPkgs = pkgs: with pkgs; [ procps ];
extraPkgs = pkgs: [ pkgs.procps ];

meta = with lib; {
description = "Workspace Simplifier - a cross-platform application organizing web services into Workspaces similar to browser profiles";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/irc/irccloud/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let
in appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: with pkgs; [ at-spi2-core ];
extraPkgs = pkgs: [ pkgs.at-spi2-core ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ appimageTools, lib, fetchurl, libsecret }:
{ appimageTools, lib, fetchurl }:

let
pname = "electron-mail";
Expand All @@ -20,9 +20,9 @@ in appimageTools.wrapType2 {
cp -r ${appimageContents}/usr/share/icons $out/share
'';

extraPkgs = pkgs: with pkgs; [
libsecret
libappindicator-gtk3
extraPkgs = pkgs: [
pkgs.libsecret
pkgs.libappindicator-gtk3
];

meta = with lib; {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ appimageTools.wrapType2 rec {
hash = "sha256-LbvldnhvKHvBEaOwkxA2acuUKMcYi16ceYPuMW73qLs=";
};

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands =
let appimageContents = appimageTools.extract { inherit pname version src; };
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/networking/station/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ in appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
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 \
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/office/timeular/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ lib
, fetchurl
, appimageTools
, libsecret
}:

let
Expand All @@ -19,9 +18,7 @@ let
in appimageTools.wrapType2 rec {
inherit pname version src;

extraPkgs = pkgs: with pkgs; [
libsecret
];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/timeular.desktop $out/share/applications/timeular.desktop
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/office/tusk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ in appimageTools.wrapType2 rec {
export LC_ALL=C.UTF-8
'';

extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mkdir "$out/share"
ln -s "${desktopItem}/share/applications" "$out/share/"
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/video/lbry/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ appimageTools.wrapAppImage rec {
};

# At runtime, Lbry likes to have access to Ffmpeg
extraPkgs = pkgs: with pkgs; [
ffmpeg
];
extraPkgs = pkgs: [ pkgs.ffmpeg ];

# General fixup
extraInstallCommands = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ in
export LC_ALL=C.UTF-8
'';

extraPkgs = ps: appimageTools.defaultFhsEnvArgs.multiPkgs ps;

extraInstallCommands = ''
(
mkdir -p $out/share
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/an/anytype/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ let
in appimageTools.wrapType2 {
inherit name src;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs)
++ [ pkgs.libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ar/arduino-ide/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ appimageTools.wrapType2 {
install -Dm444 ${appimageContents}/${pname}.png -t $out/share/pixmaps/
'';

extraPkgs = pkgs: with pkgs; [ libsecret ];
extraPkgs = pkgs: [ pkgs.libsecret ];

meta = with lib; {
description = "Open-source electronics prototyping platform";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ca/caido/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let
in appimageTools.wrapType2 {
inherit pname src version;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libthai ];
extraPkgs = pkgs: [ pkgs.libthai ];

extraInstallCommands = ''
install -m 444 -D ${appimageContents}/caido.desktop -t $out/share/applications
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ch/chrysalis/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
in appimageTools.wrapType2 rec {
inherit name pname src;

extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.glib ];
extraPkgs = pkgs: [ pkgs.glib ];

# Also expose the udev rules here, so it can be used as:
# services.udev.packages = [ pkgs.chrysalis ];
Expand Down
3 changes: 0 additions & 3 deletions pkgs/by-name/ho/hoppscotch/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ if stdenv.isDarwin then stdenv.mkDerivation
else appimageTools.wrapType2 {
inherit pname version src meta;

extraPkgs = pkgs:
appimageTools.defaultFhsEnvArgs.multiPkgs pkgs;

extraInstallCommands =
let
appimageContents = appimageTools.extractType2 { inherit pname version src; };
Expand Down
1 change: 0 additions & 1 deletion pkgs/by-name/je/jetbrains-toolbox/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ let
appimage = appimageTools.wrapAppImage {
inherit pname version;
src = appimageContents;
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.targetPkgs pkgs);
};
in
stdenv.mkDerivation {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/lm/lmstudio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in
appimageTools.wrapType2 {
inherit pname version src;

extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.ocl-icd ];
extraPkgs = pkgs: [ pkgs.ocl-icd ];

extraInstallCommands = ''
mkdir -p $out/share/applications
Expand Down
Loading

0 comments on commit 3f21cfe

Please sign in to comment.