From 5298c1f4c208c346554277da666e60485c91e623 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 2 Apr 2007 17:30:11 +0000 Subject: [PATCH] * Some disgusting DESTDIR hacking to make sure that state ends up under /var instead of $out/var. svn path=/nixpkgs/trunk/; revision=8533 --- pkgs/misc/cups/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index 373f3ca69522..80650cac346e 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -9,8 +9,23 @@ stdenv.mkDerivation { }; buildInputs = [zlib libjpeg libpng libtiff pam]; - + + preConfigure = " + configureFlags=\"--localstatedir=/var\" + "; + preBuild = " makeFlagsArray=(INITDIR=$out/etc/rc.d) "; + + # Awful hack: CUPS' `make install' wants to write in /var, but it + # can't. So redirect it with a BUILDROOT (=DESTDIR). + preInstall = " + installFlagsArray=(BUILDROOT=$out/destdir) + "; + + postInstall = " + mv $out/destdir/$out/* $out + rm -rf $out/destdir + "; }