mjpg-streamer: use postFixup instead of dontPatchElf and NIX_LDFLAGS

This commit is contained in:
Bob van der Linden 2015-01-20 10:24:27 +01:00
parent 54c9c0b4a7
commit 7ee3b0023f

View File

@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile "cp plugins\/input_gspcav1\/input_gspcav1.so" "# cp plugins\/input_gspcav1\/input_gspcav1.so"
'';
# Make sure mjpeg-streamer will look in "$out/lib/plugins" for its plugins.
NIX_LDFLAGS = "-rpath $out/lib:$out/lib/plugins";
dontPatchELF = true;
postFixup = ''
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib:$out/lib/plugins" $out/bin/mjpg_streamer
'';
makeFlags = "DESTDIR=$(out)";