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-10-30 10:46:51 +01:00
|
|
|
let version = "1.4.1"; in
|
2009-05-06 16:05:32 +02:00
|
|
|
|
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";
|
2009-10-30 10:46:51 +01:00
|
|
|
sha256 = "1fnkq993hr8l87x6f7a7wik2spac3f7nn4wksrvwk690r8a6zxng";
|
2005-10-21 15:06:08 +02:00
|
|
|
};
|
2007-04-02 18:22:10 +02:00
|
|
|
|
2009-10-30 10:46:51 +01:00
|
|
|
patches =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = http://www.cups.org/strfiles/3332/0001-Fixed-side_cb-function-declaration-in-usb-unix.c.patch;
|
|
|
|
sha256 = "0h8fhhpzp7xngnc428040jv09yvpz5dxb9hw6sv67lnvb03fncnw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ zlib libjpeg libpng libtiff pam ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ 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
|
|
|
'';
|
2009-10-30 10:46:51 +01:00
|
|
|
|
|
|
|
installFlags =
|
|
|
|
[ # Don't try to write in /var at build time.
|
|
|
|
"CACHEDIR=$(TMPDIR)/dummy"
|
|
|
|
"LOGDIR=$(TMPDIR)/dummy"
|
|
|
|
"REQUESTS=$(TMPDIR)/dummy"
|
|
|
|
"STATEDIR=$(TMPDIR)/dummy"
|
|
|
|
# Work around a Makefile bug.
|
|
|
|
"CUPS_PRIMARY_SYSTEM_GROUP=root"
|
|
|
|
];
|
2008-11-07 14:36:57 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.cups.org/;
|
|
|
|
description = "A standards-based printing system for UNIX";
|
2009-10-30 10:46:51 +01:00
|
|
|
license = "GPLv2"; # actually LGPL for the library and GPL for the rest
|
2008-11-07 14:36:57 +01:00
|
|
|
};
|
2005-10-21 15:06:08 +02:00
|
|
|
}
|