2008-11-07 13:36:57 +00:00
|
|
|
{stdenv, fetchurl, zlib, libjpeg, libpng, libtiff, pam, openssl}:
|
2005-10-21 14:06:08 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-11-07 13:36:57 +00:00
|
|
|
name = "cups-1.3.9";
|
2007-04-02 17:22:10 +01:00
|
|
|
|
2005-10-21 14:06:08 +01:00
|
|
|
src = fetchurl {
|
2008-11-07 13:36:57 +00:00
|
|
|
url = http://ftp.easysw.com/pub/cups/1.3.9/cups-1.3.9-source.tar.bz2;
|
|
|
|
sha256 = "0svb5alfsj9bfraw0yb9i92g5hc9h36m9xfipvi1pxdwp2s6m19q";
|
2005-10-21 14:06:08 +01:00
|
|
|
};
|
2007-04-02 17:22:10 +01:00
|
|
|
|
2008-11-07 13:36:57 +00:00
|
|
|
buildInputs = [zlib libjpeg libpng libtiff pam openssl];
|
2007-04-02 18:30:11 +01:00
|
|
|
|
2008-11-07 13:36:57 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="--localstatedir=/var"
|
|
|
|
'';
|
2007-04-02 18:30:11 +01:00
|
|
|
|
2008-11-07 13:36:57 +00:00
|
|
|
preBuild = ''
|
2007-04-02 17:22:10 +01:00
|
|
|
makeFlagsArray=(INITDIR=$out/etc/rc.d)
|
2008-11-07 13:36:57 +00:00
|
|
|
'';
|
2007-04-02 18:30:11 +01:00
|
|
|
|
|
|
|
# Awful hack: CUPS' `make install' wants to write in /var, but it
|
|
|
|
# can't. So redirect it with a BUILDROOT (=DESTDIR).
|
2008-11-07 13:36:57 +00:00
|
|
|
preInstall = ''
|
2007-04-02 18:30:11 +01:00
|
|
|
installFlagsArray=(BUILDROOT=$out/destdir)
|
2008-11-07 13:36:57 +00:00
|
|
|
'';
|
2007-04-02 18:30:11 +01:00
|
|
|
|
2008-11-07 13:36:57 +00:00
|
|
|
# !!! Ideally, we wouldn't have Samba as a dependency of CUPS.
|
|
|
|
# Rather, the backend directory should be treated as configuration
|
|
|
|
# data generated in some other Nix expression in NixOS.
|
|
|
|
postInstall = ''
|
2007-04-02 18:30:11 +01:00
|
|
|
mv $out/destdir/$out/* $out
|
|
|
|
rm -rf $out/destdir
|
2008-11-07 13:36:57 +00:00
|
|
|
''; # */
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.cups.org/;
|
|
|
|
description = "A standards-based printing system for UNIX";
|
|
|
|
};
|
2005-10-21 14:06:08 +01:00
|
|
|
}
|