From a81a917e67fac37c9e5f0587233d9b814009edc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 19 Dec 2021 11:07:17 +0000 Subject: [PATCH 1/2] pipewire: fix cross compiling --- .../development/libraries/pipewire/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 54680152248d..03125f225b85 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, buildPackages , fetchFromGitLab , removeReferencesTo , python3 @@ -171,12 +172,17 @@ let postInstall = '' mkdir $out/nix-support - pushd $lib/share/pipewire - for f in *.conf; do - echo "Generating JSON from $f" - $out/bin/spa-json-dump "$f" > "$out/nix-support/$f.json" - done - popd + ${if (stdenv.hostPlatform == stdenv.buildPlatform) then '' + pushd $lib/share/pipewire + for f in *.conf; do + echo "Generating JSON from $f" + + $out/bin/spa-json-dump "$f" > "$out/nix-support/$f.json" + done + popd + '' else '' + cp ${buildPackages.pipewire}/nix-support/*.json "$out/nix-support" + ''} moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse" moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse" From 5f6a771d30bde115672b75552f0c2f0d1c80b0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 19 Dec 2021 11:07:33 +0000 Subject: [PATCH 2/2] replace: fix cross compilation --- pkgs/tools/text/replace/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/replace/default.nix b/pkgs/tools/text/replace/default.nix index a0873d1c8d2b..058c2ba3daa5 100644 --- a/pkgs/tools/text/replace/default.nix +++ b/pkgs/tools/text/replace/default.nix @@ -11,7 +11,11 @@ stdenv.mkDerivation rec { outputs = [ "out" "man" ]; - makeFlags = [ "TREE=\$(out)" "MANTREE=\$(TREE)/share/man" ]; + makeFlags = [ + "TREE=\$(out)" + "MANTREE=\$(TREE)/share/man" + "CC=${stdenv.cc.targetPrefix}cc" + ]; preBuild = '' sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h