GNU Hurd: Restructure for easier overriding, and easier avoided rebuilds.

svn path=/nixpkgs/trunk/; revision=33834
This commit is contained in:
Ludovic Courtès 2012-04-18 17:22:10 +00:00
parent f59b9490ec
commit 61bb81195f

View File

@ -40,18 +40,17 @@ stdenv.mkDerivation ({
then [ "--with-parted" ]
else [ "--without-parted" ]);
preConfigure = "autoreconf -vfi";
preConfigure =
'' autoreconf -vfi
patchPhase =
'' echo "removing \`-o root' from makefiles..."
echo "removing \`-o root' from makefiles..."
for mf in {utils,daemons}/Makefile
do
sed -i "$mf" -e's/-o root//g'
done
'';
buildPhase = "make ${buildTarget}";
installPhase = "make ${installTarget}";
crossAttrs.dontPatchShebangs = true;
meta = {
description = "The GNU Hurd, GNU project's replacement for the Unix kernel";
@ -74,6 +73,17 @@ stdenv.mkDerivation ({
//
(if !headersOnly && buildTarget != null
then assert installTarget != null; {
# Use the default `buildPhase' and `installPhase' so that the usual hooks
# can still be used.
buildFlags = buildTarget;
installTargets = installTarget;
}
else {})
//
(if headersOnly
then { buildPhase = ":"; installPhase = "make install-headers"; }
else (if (cross != null)