Merge pull request #151295 from Mic92/cross-compile-fixes

{pipewire,replace}: fix cross compile
This commit is contained in:
Jörg Thalheim 2021-12-27 12:09:05 +00:00 committed by GitHub
commit 750e61beb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 7 deletions

View file

@ -1,5 +1,6 @@
{ stdenv
, lib
, buildPackages
, fetchFromGitLab
, removeReferencesTo
, python3
@ -171,12 +172,17 @@ let
postInstall = ''
mkdir $out/nix-support
${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"

View file

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