From 976e5387d2c2a43430c8214f7e79d466de4d64f0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 26 Sep 2024 03:46:28 +0300 Subject: [PATCH] treewide: Fix `error: makeWrapper/makeShellWrapper must be in nativeBuildInputs` On cross --- pkgs/applications/editors/vscode/generic.nix | 3 ++- .../networking/browsers/brave/make-brave.nix | 6 ++++-- .../signal-desktop/generic.nix | 7 ++++--- .../version-management/gitkraken/default.nix | 6 ++++-- pkgs/by-name/gi/github-desktop/package.nix | 7 ++++--- pkgs/by-name/pa/paper-plane/package.nix | 4 ++-- pkgs/development/tools/nwjs/default.nix | 6 ++++-- pkgs/development/web/cypress/default.nix | 16 +++++++++++++--- 8 files changed, 37 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index defae3cf9617..1c5fe1a56a42 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -167,7 +167,8 @@ in asar copyDesktopItems # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 - (buildPackages.wrapGAppsHook3.override { inherit (buildPackages) makeWrapper; }) + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; dontBuild = true; diff --git a/pkgs/applications/networking/browsers/brave/make-brave.nix b/pkgs/applications/networking/browsers/brave/make-brave.nix index e94e1a93bf72..2ea95693a9ae 100644 --- a/pkgs/applications/networking/browsers/brave/make-brave.nix +++ b/pkgs/applications/networking/browsers/brave/make-brave.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, wrapGAppsHook3, makeWrapper +{ lib, stdenv, fetchurl, buildPackages , alsa-lib , at-spi2-atk , at-spi2-core @@ -112,7 +112,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ dpkg - (wrapGAppsHook3.override { inherit makeWrapper; }) + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; buildInputs = [ diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix index 49df94819656..97abf0e749f6 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix @@ -8,8 +8,7 @@ , asar , rsync , python3 -, wrapGAppsHook3 -, makeWrapper +, buildPackages , nixosTests , gtk3 , atk @@ -127,7 +126,9 @@ stdenv.mkDerivation rec { asar python3 autoPatchelfHook - (wrapGAppsHook3.override { inherit makeWrapper; }) + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; buildInputs = [ diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 3e2206aa633b..7d35f1efbb58 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -37,7 +37,7 @@ makeDesktopItem, openssl, wrapGAppsHook3, - makeShellWrapper, + buildPackages, at-spi2-atk, at-spi2-core, libuuid, @@ -166,7 +166,9 @@ let nativeBuildInputs = [ copyDesktopItems - (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; buildInputs = [ gtk3 diff --git a/pkgs/by-name/gi/github-desktop/package.nix b/pkgs/by-name/gi/github-desktop/package.nix index cbd89cda3c21..88f8b5620b45 100644 --- a/pkgs/by-name/gi/github-desktop/package.nix +++ b/pkgs/by-name/gi/github-desktop/package.nix @@ -2,8 +2,7 @@ , lib , fetchurl , autoPatchelfHook -, wrapGAppsHook3 -, makeWrapper +, buildPackages , gnome-keyring , libsecret , git @@ -44,7 +43,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { nativeBuildInputs = [ autoPatchelfHook - (wrapGAppsHook3.override { inherit makeWrapper; }) + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; buildInputs = [ diff --git a/pkgs/by-name/pa/paper-plane/package.nix b/pkgs/by-name/pa/paper-plane/package.nix index 228c4aa638b0..2028e7a848f2 100644 --- a/pkgs/by-name/pa/paper-plane/package.nix +++ b/pkgs/by-name/pa/paper-plane/package.nix @@ -1,7 +1,6 @@ { lib , fetchFromGitHub , gtk4 -, wrapGAppsHook3 , libadwaita , tdlib , rlottie @@ -18,6 +17,7 @@ , libshumate , gst_all_1 , darwin +, buildPackages }: let @@ -36,7 +36,7 @@ let gtk4-paperplane = gtk4.overrideAttrs (prev: { patches = (prev.patches or []) ++ [ "${src}/build-aux/gtk-reversed-list.patch" ]; }); - wrapPaperPlaneHook = wrapGAppsHook3.override { + wrapPaperPlaneHook = buildPackages.wrapGAppsHook3.override { gtk3 = gtk4-paperplane; }; # libadwaita has gtk4 in propagatedBuildInputs so it must be overrided diff --git a/pkgs/development/tools/nwjs/default.nix b/pkgs/development/tools/nwjs/default.nix index ff1fae302d16..408584de712e 100644 --- a/pkgs/development/tools/nwjs/default.nix +++ b/pkgs/development/tools/nwjs/default.nix @@ -3,6 +3,7 @@ , atk , autoPatchelfHook , buildEnv +, buildPackages , cairo , cups , dbus @@ -32,7 +33,6 @@ , stdenv , systemd , udev -, wrapGAppsHook3 , xorg }: @@ -107,7 +107,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoPatchelfHook - (wrapGAppsHook3.override { inherit makeWrapper; }) + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) ]; buildInputs = [ nwEnv ]; diff --git a/pkgs/development/web/cypress/default.nix b/pkgs/development/web/cypress/default.nix index 856b31af1565..2f3b8cf20808 100644 --- a/pkgs/development/web/cypress/default.nix +++ b/pkgs/development/web/cypress/default.nix @@ -4,13 +4,13 @@ , gtk2 , gtk3 , lib +, buildPackages , makeShellWrapper , mesa , nss , stdenv , udev , unzip -, wrapGAppsHook3 , xorg , darwin }: @@ -46,8 +46,18 @@ in stdenv.mkDerivation rec { # don't remove runtime deps dontPatchELF = true; - nativeBuildInputs = [ unzip makeShellWrapper ] - ++ lib.optionals stdenv.isLinux [ autoPatchelfHook (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) ]; + nativeBuildInputs = + [ + unzip + makeShellWrapper + ] + ++ lib.optionals stdenv.isLinux [ + autoPatchelfHook + # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651 + # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset. + (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; }) + ]; + buildInputs = lib.optionals stdenv.isLinux (with xorg; [ libXScrnSaver