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" 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