1 { stdenv, lib, fetchzip, autoconf, automake, cups, glib, libxml2, libusb1, libtool
10 url = "https://gdlp01.c-wss.com/gds/1/0100011381/01/cnijfilter2-source-6.40-1.tar.gz";
11 sha256 = "3RoG83jLOsdTEmvUkkxb7wa8oBrJA4v1mGtxTGwSowU=";
14 nativeBuildInputs = [ automake autoconf ];
16 cups glib libxml2 libusb1 libtool
20 ./patches/get_protocol.patch
23 # lgmon3's --enable-libdir flag is used soley for specifying in which
24 # directory the cnnnet.ini cache file should reside.
25 # NixOS uses /var/cache/cups, and given the name, it seems like a reasonable
26 # place to put the cnnet.ini file, and thus we do so.
28 # Note that the drivers attempt to dlopen
29 # $out/lib/cups/filter/libcnbpcnclapicom2.so
32 cp com/libs_bin_x86_64/* $out/lib
33 mkdir -p $out/lib/cups/filter
34 ln -s $out/lib/libcnbpcnclapicom2.so $out/lib/cups/filter
36 export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib"
37 '' + lib.optionalString withDebug ''
38 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__DEBUG__ -DDEBUG_LOG"
43 substituteInPlace src/Makefile.am \
44 --replace /usr/include/libusb-1.0 \
45 ${libusb1.dev}/include/libusb-1.0
46 ./autogen.sh --prefix=$out --enable-progpath=$out/bin \
47 --datadir=$out/share \
48 --enable-libdir=/var/cache/cups
54 ./autogen.sh --prefix=$out
60 ./autogen.sh --prefix=$out
66 substituteInPlace src/Makefile.am \
67 --replace "/usr/lib/cups/backend" \
68 "$out/lib/cups/backend"
69 ./autogen.sh --prefix=$out --enable-progpath=$out/bin
75 ./autogen.sh --prefix=$out --enable-progpath=$out/bin
81 ./autogen.sh --prefix=$out --enable-progpath=$out/bin
87 ./autogen.sh --prefix=$out --enable-progpath=$out/bin
128 mkdir -p $out/share/cups/model
129 cp ppd/*.ppd $out/share/cups/model
133 description = "Canon InkJet printer drivers for many Pixma series printers";
135 Canon InjKet printer drivers for series E200, E300, E3100, E3300, E4200, E450, E470, E480,
136 G3000, G3010, G4000, G4010, G5000, G5080, G6000, G6050, G6080, G7000, G7050, G7080, GM2000,
137 GM2080, GM4000, GM4080, iB4000, iB4100, iP110, MB2000, MB2100, MB2300, MB2700, MB5000,
138 MB5100, MB5300, MB5400, MG2900, MG3000, MG3600, MG5600, MG5700, MG6600, MG6700, MG6800,
139 MG6900, MG7500, MG7700, MX490, TR4500, TR703, TR7500, TR7530, TR8500, TR8530, TR8580, TR9530,
140 TS200, TS300, TS3100, TS3300, TS5000, TS5100, TS5300, TS5380, TS6000, TS6100, TS6130, TS6180,
141 TS6200, TS6230, TS6280, TS6300, TS6330, TS6380, TS700, TS708, TS7330, TS8000, TS8100, TS8130,
142 TS8180, TS8200, TS8230, TS8280, TS8300, TS8330, TS8380, TS9000, TS9100, TS9180, TS9500,
143 TS9580, XK50, XK60, XK70, XK80.
145 homepage = "https://hk.canon/en/support/0101048401/1";
146 license = licenses.unfree;
147 platforms = [ "i686-linux" "x86_64-linux" ];