summary refs log tree commit diff
path: root/pkgs/misc/drivers/foomatic-filters/default.nix
blob: bdba1eb7b817b0160dfc7b4d1782ca48089fbacb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchurl, pkgconfig, perl, cups, dbus, enscript }:

stdenv.mkDerivation rec {
  name = "foomatic-filters-4.0.17";

  src = fetchurl {
    url = "http://www.openprinting.org/download/foomatic/${name}.tar.gz";
    sha256 = "1qrkgbm5jay2r7sh9qbyf0aiyrsl1mdc844hxf7fhw95a0zfbqm2";
  };

  buildInputs = [ pkgconfig perl cups dbus enscript ];

  preConfigure =
    ''
      substituteInPlace foomaticrip.c --replace /bin/bash /bin/sh
    '';

  installTargets = "install-cups";

  installFlags =
    ''
      CUPS_FILTERS=$(out)/lib/cups/filter
      CUPS_BACKENDS=$(out)/lib/cups/backend
    '';

  meta = {
    description = "Foomatic printing filters";
    maintainers = [ stdenv.lib.maintainers.raskin ];
    platforms = stdenv.lib.platforms.linux;
    license = stdenv.lib.licenses.gpl2Plus;
  };
}