projectm: fix build on darwin

This commit is contained in:
Ryan Burns 2020-09-27 11:29:04 -07:00
parent 5bcc4b27f9
commit d10d6dfa4a

View file

@ -1,4 +1,5 @@
{ mkDerivation { stdenv
, mkDerivation
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
@ -39,12 +40,13 @@ mkDerivation rec {
"--enable-sdl" "--enable-sdl"
]; ];
fixupPhase = '' fixupPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# NOTE: 2019-10-05: Upstream inserts the src path buring build into ELF rpath, so must delete it out # NOTE: 2019-10-05: Upstream inserts the src path buring build into ELF rpath, so must delete it out
# upstream report: https://github.com/projectM-visualizer/projectm/issues/245 # upstream report: https://github.com/projectM-visualizer/projectm/issues/245
for entry in $out/bin/* ; do for entry in $out/bin/* ; do
patchelf --set-rpath "$(patchelf --print-rpath $entry | tr ':' '\n' | grep -v 'src/libprojectM' | tr '\n' ':')" "$entry" patchelf --set-rpath "$(patchelf --print-rpath $entry | tr ':' '\n' | grep -v 'src/libprojectM' | tr '\n' ':')" "$entry"
done done
'' + ''
wrapQtApp $out/bin/projectM-pulseaudio wrapQtApp $out/bin/projectM-pulseaudio
rm $out/bin/projectM-unittest rm $out/bin/projectM-unittest
''; '';