Fix cross-compilation eval failures (#344499)

This commit is contained in:
Artturin
2024-09-27 21:27:30 +03:00
committed by GitHub
17 changed files with 78 additions and 42 deletions
+2 -1
View File
@@ -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;
@@ -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 = [
@@ -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 = [
@@ -25,7 +25,8 @@ let
};
aarch64-darwin = x86_64-darwin;
}
."${stdenvNoCC.hostPlatform.system}";
."${stdenvNoCC.hostPlatform.system}"
or (throw "appflowy: No source for system: ${stdenvNoCC.hostPlatform.system}");
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "appflowy";
@@ -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
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-barcode: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-mt888: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -25,10 +25,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-mt890: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -34,10 +34,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-sp900: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+7 -4
View File
@@ -33,10 +33,13 @@ stdenvNoCC.mkDerivation {
installPhase =
let
arch = builtins.getAttr stdenvNoCC.hostPlatform.system {
x86_64-linux = "x64";
x86-linux = "x86";
};
arch =
{
x86_64-linux = "x64";
x86-linux = "x86";
}
."${stdenvNoCC.hostPlatform.system}"
or (throw "cups-idprt-tspl: No prebuilt filters for system: ${stdenvNoCC.hostPlatform.system}");
in
''
runHook preInstall
+4 -3
View File
@@ -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 = [
+2 -2
View File
@@ -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
@@ -65,7 +65,7 @@ finalAttrs: prevAttrs: {
# We need to look inside the extracted output to get the files we need.
sourceRoot = "TensorRT-${finalAttrs.version}";
buildInputs = prevAttrs.buildInputs ++ [ finalAttrs.passthru.cudnn.lib ];
buildInputs = prevAttrs.buildInputs ++ [ (finalAttrs.passthru.cudnn.lib or null) ];
preInstall =
(prevAttrs.preInstall or "")
@@ -17,7 +17,7 @@
let
otherArgs = lib.attrsets.removeAttrs args [ "pname" "data" "repo" "releasePrefix" "isMultiArch" ];
inherit (stdenvNoCC.hostPlatform) system;
inherit (if isCrossArch then data else data.${system}) url hash;
inherit (if isCrossArch then data else data.${system} or (throw "gaugePlugins.${pname}: No source for system: ${system}")) url hash;
# Upstream uses a different naming scheme for platforms
systemMap = {
"x86_64-darwin" = "darwin.x86_64";
@@ -9,6 +9,7 @@
, libGLX
, coreutils
, unixtools
, runtimeShell
, targetPackages
, gnugrep
, gawk
@@ -89,7 +90,7 @@ stdenv.mkDerivation rec {
preFixup = ''
substituteInPlace $out/libexec/pgms/multi.sh \
--replace '/bin/sh "$' '${targetPackages.runtimeShell} "$'
--replace '/bin/sh "$' '${runtimeShell} "$'
substituteInPlace $out/bin/ubench \
--subst-var out
+4 -2
View File
@@ -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 ];
+13 -3
View File
@@ -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