2009-10-30 12:33:34 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam, openssl, dbus }:
|
2005-10-21 14:06:08 +01:00
|
|
|
|
2009-10-30 09:46:51 +00:00
|
|
|
let version = "1.4.1"; in
|
2009-05-06 15:05:32 +01:00
|
|
|
|
2005-10-21 14:06:08 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-05-06 15:05:32 +01:00
|
|
|
name = "cups-${version}";
|
2009-11-05 13:33:36 +00:00
|
|
|
|
2005-10-21 14:06:08 +01:00
|
|
|
src = fetchurl {
|
2009-05-06 15:05:32 +01:00
|
|
|
url = "http://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2";
|
2009-10-30 09:46:51 +00:00
|
|
|
sha256 = "1fnkq993hr8l87x6f7a7wik2spac3f7nn4wksrvwk690r8a6zxng";
|
2005-10-21 14:06:08 +01:00
|
|
|
};
|
2007-04-02 17:22:10 +01:00
|
|
|
|
2009-10-30 09:46:51 +00:00
|
|
|
patches =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = http://www.cups.org/strfiles/3332/0001-Fixed-side_cb-function-declaration-in-usb-unix.c.patch;
|
|
|
|
sha256 = "0h8fhhpzp7xngnc428040jv09yvpz5dxb9hw6sv67lnvb03fncnw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2009-10-30 12:33:34 +00:00
|
|
|
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff pam dbus ];
|
2009-10-30 09:46:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ openssl ];
|
2007-04-02 18:30:11 +01:00
|
|
|
|
2009-10-30 12:33:34 +00:00
|
|
|
configureFlags = "--localstatedir=/var --enable-dbus"; # --with-dbusdir
|
2007-04-02 18:30:11 +01:00
|
|
|
|
2009-10-30 09:46:51 +00:00
|
|
|
installFlags =
|
|
|
|
[ # Don't try to write in /var at build time.
|
|
|
|
"CACHEDIR=$(TMPDIR)/dummy"
|
|
|
|
"LOGDIR=$(TMPDIR)/dummy"
|
|
|
|
"REQUESTS=$(TMPDIR)/dummy"
|
|
|
|
"STATEDIR=$(TMPDIR)/dummy"
|
2009-10-30 12:33:34 +00:00
|
|
|
# Idem for /etc.
|
|
|
|
"PAMDIR=$(out)/etc/pam.d"
|
|
|
|
"DBUSDIR=$(out)/etc/dbus-1"
|
|
|
|
"INITDIR=$(out)/etc/rc.d"
|
2009-11-05 13:33:36 +00:00
|
|
|
"XINETD=$(out)/etc/xinetd.d"
|
|
|
|
# Idem for /usr.
|
|
|
|
"MENUDIR=$(out)/share/applications"
|
|
|
|
"ICONDIR=$(out)/share/icons"
|
2009-10-30 09:46:51 +00:00
|
|
|
# Work around a Makefile bug.
|
|
|
|
"CUPS_PRIMARY_SYSTEM_GROUP=root"
|
|
|
|
];
|
2008-11-07 13:36:57 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.cups.org/;
|
|
|
|
description = "A standards-based printing system for UNIX";
|
2009-10-30 09:46:51 +00:00
|
|
|
license = "GPLv2"; # actually LGPL for the library and GPL for the rest
|
2008-11-07 13:36:57 +00:00
|
|
|
};
|
2005-10-21 14:06:08 +01:00
|
|
|
}
|