diff options
Diffstat (limited to 'pkgs')
10 files changed, 35 insertions, 49 deletions
diff --git a/pkgs/applications/blockchains/terra-station/default.nix b/pkgs/applications/blockchains/terra-station/default.nix index cf684e062c5c..5c4a7cc8b354 100644 --- a/pkgs/applications/blockchains/terra-station/default.nix +++ b/pkgs/applications/blockchains/terra-station/default.nix @@ -1,6 +1,5 @@ { lib, stdenv , fetchurl -, gcc-unwrapped , dpkg , util-linux , bash @@ -57,8 +56,7 @@ stdenv.mkDerivation rec { postFixup = '' makeWrapper ${electron}/bin/electron $out/bin/${pname} \ - --add-flags $out/share/${pname}/resources/app.asar \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gcc-unwrapped.lib ]}" + --add-flags $out/share/${pname}/resources/app.aasar ''; meta = with lib; { diff --git a/pkgs/applications/editors/standardnotes/default.nix b/pkgs/applications/editors/standardnotes/default.nix index 8d535f6f5534..e61f57c76448 100644 --- a/pkgs/applications/editors/standardnotes/default.nix +++ b/pkgs/applications/editors/standardnotes/default.nix @@ -1,5 +1,12 @@ -{ lib, stdenv, fetchurl, dpkg, makeWrapper, electron, libsecret -, desktop-file-utils , callPackage }: +{ lib +, stdenv +, fetchurl +, dpkg +, makeWrapper +, electron +, desktop-file-utils +, callPackage +}: let @@ -33,8 +40,7 @@ stdenv.mkDerivation rec { cp -R opt/Standard\ Notes/resources/app.asar $out/share/standardnotes/ makeWrapper ${electron}/bin/electron $out/bin/standardnotes \ - --add-flags $out/share/standardnotes/app.asar \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret stdenv.cc.cc.lib ]} + --add-flags $out/share/standardnotes/app.asar ${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \ --set-key Exec --set-value standardnotes usr/share/applications/standard-notes.desktop diff --git a/pkgs/applications/misc/logseq/default.nix b/pkgs/applications/misc/logseq/default.nix index 882481ace1e0..eacd64b06b55 100644 --- a/pkgs/applications/misc/logseq/default.nix +++ b/pkgs/applications/misc/logseq/default.nix @@ -60,8 +60,7 @@ in { makeWrapper ${electron_27}/bin/electron $out/bin/${pname} \ --set "LOCAL_GIT_DIRECTORY" ${git} \ --add-flags $out/share/${pname}/resources/app \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" ''; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix index 3fcbfcbf4649..db8a8be7a871 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix @@ -16,7 +16,6 @@ , AppKit , CoreServices , desktopToDarwinBundle -, libnotify , useKeytar ? true }: @@ -79,11 +78,6 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // { ''; installPhase = - let - libPath = lib.makeLibraryPath [ - libnotify - ]; - in '' runHook preInstall @@ -111,7 +105,6 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // { # LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102 makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \ --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \ - --set LD_LIBRARY_PATH "${libPath}" \ --add-flags "$out/share/element/electron" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" diff --git a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix index 318f7a11c54b..83a3b78e1d4b 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix @@ -10,7 +10,6 @@ , libXtst , zlib , electron -, pipewire }: buildNpmPackage rec { @@ -72,7 +71,6 @@ buildNpmPackage rec { makeWrapper ${lib.getExe electron} $out/bin/jitsi-meet-electron \ --add-flags $out/share/jitsi-meet-electron/resources/app.asar \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pipewire ]} \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ --inherit-argv0 diff --git a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix index 6c976fdd0a43..f59b9c3774bc 100644 --- a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix +++ b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix @@ -9,9 +9,6 @@ , fetchYarnDeps , fixup-yarn-lock , electron -, libnotify -, libpulseaudio -, pipewire , alsa-utils , which , testers @@ -72,11 +69,10 @@ stdenv.mkDerivation (finalAttrs: { done popd - # Linux needs 'aplay' for notification sounds, 'libpulse' for meeting sound, 'libpipewire' for screen sharing and 'libnotify' for notifications + # Linux needs 'aplay' for notification sounds makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ ${lib.optionalString stdenv.isLinux '' --prefix PATH : ${lib.makeBinPath [ alsa-utils which ]} \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire libnotify ]} \ ''} \ --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" diff --git a/pkgs/applications/networking/instant-messengers/webcord/default.nix b/pkgs/applications/networking/instant-messengers/webcord/default.nix index d2796142e8f7..aebe2998bd27 100644 --- a/pkgs/applications/networking/instant-messengers/webcord/default.nix +++ b/pkgs/applications/networking/instant-messengers/webcord/default.nix @@ -3,9 +3,6 @@ , fetchFromGitHub , copyDesktopItems , python3 -, pipewire -, libpulseaudio -, libnotify , xdg-utils , electron_29 , makeDesktopItem @@ -42,11 +39,6 @@ buildNpmPackage rec { # override installPhase so we can copy the only folders that matter installPhase = let - libPath = lib.makeLibraryPath [ - libpulseaudio - pipewire - libnotify - ]; binPath = lib.makeBinPath [ xdg-utils ]; in '' @@ -62,7 +54,6 @@ buildNpmPackage rec { # Add xdg-utils to path via suffix, per PR #181171 makeWrapper '${lib.getExe electron_29}' $out/bin/webcord \ - --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \ --suffix PATH : "${binPath}" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ --add-flags $out/lib/node_modules/webcord/ diff --git a/pkgs/applications/office/super-productivity/default.nix b/pkgs/applications/office/super-productivity/default.nix index 5a5ff9fc959e..9b3296715927 100644 --- a/pkgs/applications/office/super-productivity/default.nix +++ b/pkgs/applications/office/super-productivity/default.nix @@ -38,8 +38,7 @@ stdenv.mkDerivation rec { postFixup = '' makeWrapper ${electron}/bin/electron $out/bin/${pname} \ - --add-flags $out/share/${pname}/resources/app.asar \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}" + --add-flags $out/share/${pname}/resources/app.asar ''; meta = with lib; { diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix index 17fb994f2ba4..980258ed863a 100644 --- a/pkgs/by-name/ve/vesktop/package.nix +++ b/pkgs/by-name/ve/vesktop/package.nix @@ -8,15 +8,11 @@ , copyDesktopItems , vencord , electron -, pipewire -, libpulseaudio , libicns -, libnotify , jq , moreutils , cacert , nodePackages -, speechd , withTTS ? true # Enables the use of vencord from nixpkgs instead of # letting vesktop manage it's own version @@ -116,15 +112,6 @@ stdenv.mkDerivation (finalAttrs: { # this is consistent with other nixpkgs electron packages and upstream, as far as I am aware installPhase = - let - # this is mainly required for venmic - libPath = lib.makeLibraryPath ([ - libpulseaudio - libnotify - pipewire - stdenv.cc.cc.lib - ] ++ lib.optional withTTS speechd); - in '' runHook preInstall @@ -139,7 +126,6 @@ stdenv.mkDerivation (finalAttrs: { done makeWrapper ${electron}/bin/electron $out/bin/vesktop \ - --prefix LD_LIBRARY_PATH : ${libPath} \ --add-flags $out/opt/Vesktop/resources/app.asar \ ${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" diff --git a/pkgs/development/tools/electron/common.nix b/pkgs/development/tools/electron/common.nix index 9aa3b1c932de..fd17d7aa3555 100644 --- a/pkgs/development/tools/electron/common.nix +++ b/pkgs/development/tools/electron/common.nix @@ -13,7 +13,10 @@ , unzip , pkgs , pkgsBuildHost - +, pipewire +, libsecret +, libpulseaudio +, speechd , info }: @@ -190,6 +193,23 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: { runHook postInstall ''; + postFixup = + let + libPath = lib.makeLibraryPath [ + libnotify + pipewire + stdenv.cc.cc.lib + libsecret + libpulseaudio + speechd + ]; + in + base.postFixup + '' + patchelf \ + --add-rpath "${libPath}" \ + $out/libexec/electron/electron + ''; + requiredSystemFeatures = [ "big-parallel" ]; passthru = { |