diff options
Diffstat (limited to 'pkgs/applications')
10 files changed, 38 insertions, 26 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index e721457f2df02..ee0abb5828914 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -108,7 +108,7 @@ let hostprog_check_table); in [ - "--argv0" "$0" "--add-flags" (lib.escapeShellArgs flags) + "--inherit-argv0" "--add-flags" (lib.escapeShellArgs flags) ] ++ lib.optionals withRuby [ "--set" "GEM_HOME" "${rubyEnv}/${rubyEnv.ruby.gemPath}" ] ++ lib.optionals (binPath != "") [ diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index e100318005021..b4731b5701c9c 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -72,7 +72,7 @@ let ++ lib.optionals stdenv.isLinux [ autoPatchelfHook nodePackages.asar - (wrapGAppsHook.override { makeBinaryWrapper = makeWrapper; }) + (wrapGAppsHook.override { inherit makeWrapper; }) ]; dontBuild = true; diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index 47852d69e3baa..7788b13b4ecb5 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -175,9 +175,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { done ''; - # Until https://github.com/NixOS/nixpkgs/pull/172617 is applied, - # parallel builds do not always work because of a bug in dlltool. - enableParallelBuilding = false; + enableParallelBuilding = true; # https://bugs.winehq.org/show_bug.cgi?id=43530 # https://github.com/NixOS/nixpkgs/issues/31989 diff --git a/pkgs/applications/networking/browsers/brave/default.nix b/pkgs/applications/networking/browsers/brave/default.nix index a0f15253d6a50..2983ced459f84 100644 --- a/pkgs/applications/networking/browsers/brave/default.nix +++ b/pkgs/applications/networking/browsers/brave/default.nix @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ dpkg - (wrapGAppsHook.override { makeBinaryWrapper = makeWrapper; }) + (wrapGAppsHook.override { inherit makeWrapper; }) ]; buildInputs = [ diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index b2008a201d3dc..217b4e323886e 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -68,6 +68,7 @@ , xorg , zip , zlib +, pkgsBuildBuild # optionals @@ -142,16 +143,21 @@ let # Target the LLVM version that rustc is built with for LTO. llvmPackages0 = rustc.llvmPackages; + llvmPackagesBuildBuild0 = pkgsBuildBuild.rustc.llvmPackages; # Force the use of lld and other llvm tools for LTO llvmPackages = llvmPackages0.override { bootBintoolsNoLibc = null; bootBintools = null; }; + llvmPackagesBuildBuild = llvmPackagesBuildBuild0.override { + bootBintoolsNoLibc = null; + bootBintools = null; + }; # LTO requires LLVM bintools including ld.lld and llvm-ar. buildStdenv = overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override { - inherit (llvmPackages) bintools; + bintools = if ltoSupport then buildPackages.rustc.llvmPackages.bintools else stdenv.cc.bintools; }); # Compile the wasm32 sysroot to build the RLBox Sandbox @@ -217,10 +223,15 @@ buildStdenv.mkDerivation ({ # two patches. patchFlags = [ "-p1" "-l" ]; + # if not explicitly set, wrong cc from buildStdenv would be used + HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc"; + HOST_CXX = "${llvmPackagesBuildBuild.stdenv.cc}/bin/c++"; + nativeBuildInputs = [ autoconf cargo - llvmPackages.llvm # llvm-objdump + gnum4 + llvmPackagesBuildBuild.bintools makeWrapper nodejs perl @@ -302,6 +313,9 @@ buildStdenv.mkDerivation ({ export MOZILLA_OFFICIAL=1 ''; + # firefox has a different definition of configurePlatforms from nixpkgs, see configureFlags + configurePlatforms = [ ]; + configureFlags = [ "--disable-tests" "--disable-updater" @@ -309,7 +323,7 @@ buildStdenv.mkDerivation ({ "--enable-default-toolkit=cairo-gtk3${lib.optionalString waylandSupport "-wayland"}" "--enable-system-pixman" "--with-distribution-id=org.nixos" - "--with-libclang-path=${llvmPackages.libclang.lib}/lib" + "--with-libclang-path=${llvmPackagesBuildBuild.libclang.lib}/lib" "--with-system-ffi" "--with-system-icu" "--with-system-jpeg" @@ -320,6 +334,9 @@ buildStdenv.mkDerivation ({ "--with-system-png" # needs APNG support "--with-system-webp" "--with-system-zlib" + # for firefox, host is buildPlatform, target is hostPlatform + "--host=${buildStdenv.buildPlatform.config}" + "--target=${buildStdenv.hostPlatform.config}" ] # LTO is done using clang and lld on Linux. ++ lib.optionals ltoSupport [ @@ -362,7 +379,6 @@ buildStdenv.mkDerivation ({ fontconfig freetype glib - gnum4 gtk3 icu libffi diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 2efd9422328ee..6d93629e71884 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, makeDesktopItem, makeWrapper, lndir, config +{ stdenv, lib, makeDesktopItem, makeWrapper, makeBinaryWrapper, lndir, config , fetchurl, zip, unzip, jq, xdg-utils, writeText ## various stuff that can be plugged in @@ -231,7 +231,7 @@ let # Symbolic link: wrap the link's target. oldExe="$(readlink -v --canonicalize-existing "$executablePath")" rm "$executablePath" - elif wrapperCmd=$(strings -dw "$executablePath" | sed -n '/^makeCWrapper/,/^$/ p'); [[ $wrapperCmd ]]; then + elif wrapperCmd=$(${makeBinaryWrapper.extractCmd} "$executablePath"); [[ $wrapperCmd ]]; then # If the executable is a binary wrapper, we need to update its target to # point to $out, but we can't just edit the binary in-place because of length # issues. So we extract the command used to create the wrapper and add the @@ -239,10 +239,7 @@ let parseMakeCWrapperCall() { shift # makeCWrapper oldExe=$1; shift - for arg do case $arg in - --inherit-argv0) oldWrapperArgs+=(--argv0 '$0');; # makeWrapper doesn't understand --inherit-argv0 - *) oldWrapperArgs+=("$arg");; - esac done + oldWrapperArgs=("$@") } eval "parseMakeCWrapperCall ''${wrapperCmd//"${browser}"/"$out"}" rm "$executablePath" diff --git a/pkgs/applications/networking/instant-messengers/discord/linux.nix b/pkgs/applications/networking/instant-messengers/discord/linux.nix index f5d984bf3a67d..b960caa64d802 100644 --- a/pkgs/applications/networking/instant-messengers/discord/linux.nix +++ b/pkgs/applications/networking/instant-messengers/discord/linux.nix @@ -1,5 +1,5 @@ { pname, version, src, meta, binaryName, desktopName, autoPatchelfHook -, makeDesktopItem, lib, stdenv, wrapGAppsHook, makeWrapper, alsa-lib, at-spi2-atk +, makeDesktopItem, lib, stdenv, wrapGAppsHook, makeShellWrapper, alsa-lib, at-spi2-atk , at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk-pixbuf , glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid, libX11 , libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes @@ -24,7 +24,8 @@ stdenv.mkDerivation rec { libxshmfence mesa nss - (wrapGAppsHook.override { makeBinaryWrapper = makeWrapper; }) + wrapGAppsHook + makeShellWrapper ]; dontWrapGApps = true; @@ -78,7 +79,7 @@ stdenv.mkDerivation rec { patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \ $out/opt/${binaryName}/${binaryName} - wrapProgram $out/opt/${binaryName}/${binaryName} \ + wrapProgramShell $out/opt/${binaryName}/${binaryName} \ "''${gappsWrapperArgs[@]}" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \ --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index d63c87ee5da55..537f78fbcadb8 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ autoPatchelfHook dpkg - (wrapGAppsHook.override { makeBinaryWrapper = makeWrapper; }) + (wrapGAppsHook.override { inherit makeWrapper; }) ]; buildInputs = [ diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix index d84f0b2abf699..3c53e66c8bd9f 100644 --- a/pkgs/applications/science/logic/tlaplus/toolbox.nix +++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix @@ -1,6 +1,6 @@ { lib , fetchzip -, makeWrapper +, makeShellWrapper , makeDesktopItem , stdenv , gtk3 @@ -35,8 +35,8 @@ stdenv.mkDerivation rec { buildInputs = [ gtk3 ]; nativeBuildInputs = [ - makeWrapper - (wrapGAppsHook.override { makeBinaryWrapper = makeWrapper; }) + makeShellWrapper + wrapGAppsHook ]; dontWrapGApps = true; @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ "$(find "$out/toolbox" -name jspawnhelper)" - makeWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \ + makeShellWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \ --chdir "$out/toolbox" \ --add-flags "-data ~/.tla-toolbox" \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}" \ diff --git a/pkgs/applications/video/mpv/wrapper.nix b/pkgs/applications/video/mpv/wrapper.nix index 28414c3756d99..3dfe83e2449e8 100644 --- a/pkgs/applications/video/mpv/wrapper.nix +++ b/pkgs/applications/video/mpv/wrapper.nix @@ -32,7 +32,7 @@ let # All arguments besides the input and output binaries (${mpv}/bin/mpv and # $out/bin/mpv). These are used by the darwin specific makeWrapper call # used to wrap $out/Applications/mpv.app/Contents/MacOS/mpv as well. - mostMakeWrapperArgs = lib.strings.escapeShellArgs ([ "--argv0" "'$0'" + mostMakeWrapperArgs = lib.strings.escapeShellArgs ([ "--inherit-argv0" # These are always needed (TODO: Explain why) "--prefix" "LUA_CPATH" ";" "${mpv.luaEnv}/lib/lua/${mpv.lua.luaversion}/?.so" "--prefix" "LUA_PATH" ";" "${mpv.luaEnv}/share/lua/${mpv.lua.luaversion}/?.lua" @@ -53,7 +53,7 @@ let )) ++ extraMakeWrapperArgs) ; umpvWrapperArgs = lib.strings.escapeShellArgs ([ - "--argv0" "'$0'" + "--inherit-argv0" "--set" "MPV" "${placeholder "out"}/bin/mpv" ] ++ extraUmpvWrapperArgs) ; |