gstreamer: Fix multiple outputs split

- Explicitly moving the files breaks them, because the wrappers
  reference the files by absolute path.  Also this automatically
  moves the manpages to $dev as well.
- Need to explicitly set --exec-prefix since the pkgconfig file has
  `toolsdir=${exec_prefix}/bin`, breaking totem:

http://hydra.nixos.org/build/34980617/nixlog/1/raw

````
checking for BACKEND_TEST... yes
checking GStreamer 1.0 inspection tool... no
configure: error:
		Cannot find required GStreamer-1.0 tool 'gst-inspect-1.0'.
		It should be part of gstreamer-1_0-utils. Please install it.

builder for ‘/nix/store/npq2ihlsdniv4j3wbyparq9byjxqdi15-totem-3.18.1.drv’ failed with exit code 1
````

While at it, enable parallel build.
This commit is contained in:
Tuomas Tynkkynen 2016-04-26 21:39:57 +03:00
parent 7f63790f25
commit 584d884bd7

@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
};
outputs = [ "dev" "out" ];
outputBin = "dev";
nativeBuildInputs = [
pkgconfig perl bison flex python gobjectIntrospection makeWrapper
@ -25,6 +26,12 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib ];
enableParallelBuilding = true;
preConfigure = ''
configureFlagsArray+=("--exec-prefix=$dev")
'';
postInstall = ''
for prog in "$out/bin/"*; do
wrapProgram "$prog" --prefix GST_PLUGIN_SYSTEM_PATH : "\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")"
@ -32,7 +39,6 @@ stdenv.mkDerivation rec {
'';
preFixup = ''
moveToOutput "bin" "$dev"
moveToOutput "share/bash-completion" "$dev"
'';