2008-11-07 14:36:57 +01:00
|
|
|
{stdenv, fetchurl, zlib, libjpeg, libpng, libtiff, pam, openssl}:
|
2005-10-21 15:06:08 +02:00
|
|
|
|
2009-05-06 16:05:32 +02:00
|
|
|
let version = "1.3.10"; in
|
|
|
|
|
2005-10-21 15:06:08 +02:00
|
|
|
stdenv.mkDerivation {
|
2009-05-06 16:05:32 +02:00
|
|
|
name = "cups-${version}";
|
2007-04-02 18:22:10 +02:00
|
|
|
|
2005-10-21 15:06:08 +02:00
|
|
|
src = fetchurl {
|
2009-05-06 16:05:32 +02:00
|
|
|
url = "http://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2";
|
|
|
|
sha256 = "0rmm1dj8ha8d5c9lpdsfpfyw6l6lnkxl36xlxqdrjnm0lr2sa0cp";
|
2005-10-21 15:06:08 +02:00
|
|
|
};
|
2007-04-02 18:22:10 +02:00
|
|
|
|
2008-11-07 14:36:57 +01:00
|
|
|
buildInputs = [zlib libjpeg libpng libtiff pam openssl];
|
2007-04-02 19:30:11 +02:00
|
|
|
|
2008-11-07 14:36:57 +01:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="--localstatedir=/var"
|
|
|
|
'';
|
2007-04-02 19:30:11 +02:00
|
|
|
|
2008-11-07 14:36:57 +01:00
|
|
|
preBuild = ''
|
2007-04-02 18:22:10 +02:00
|
|
|
makeFlagsArray=(INITDIR=$out/etc/rc.d)
|
2008-11-07 14:36:57 +01:00
|
|
|
'';
|
2007-04-02 19:30:11 +02: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 14:36:57 +01:00
|
|
|
preInstall = ''
|
2007-04-02 19:30:11 +02:00
|
|
|
installFlagsArray=(BUILDROOT=$out/destdir)
|
2008-11-07 14:36:57 +01:00
|
|
|
'';
|
2007-04-02 19:30:11 +02:00
|
|
|
|
2008-11-07 14:36:57 +01:00
|
|
|
postInstall = ''
|
2007-04-02 19:30:11 +02:00
|
|
|
mv $out/destdir/$out/* $out
|
|
|
|
rm -rf $out/destdir
|
2008-11-07 14:36:57 +01:00
|
|
|
''; # */
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.cups.org/;
|
|
|
|
description = "A standards-based printing system for UNIX";
|
|
|
|
};
|
2005-10-21 15:06:08 +02:00
|
|
|
}
|