git.iko.soy/typeable/nixpkgs
on master help sign in
splix: install color profiles and enable JBIG
commitd4f0848cae864edf8e6b3d72fc6e649d990dc800 authorJohannes Frankenau <johannes@frankenau.net> dateThu 16 Aug 2018, 10:39 (8 years ago) parent6e7b11d
1 file changed+40−10
pkgs/misc/cups/drivers/splix/default.nix+40−10
pkgs/misc/cups/drivers/splix/default.nix+40−10
@@ -1,7 +1,27 @@
1−{ stdenv, fetchsvn, cups, zlib }:
2−let rev = "315"; in
3−stdenv.mkDerivation rec {
1+{ stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
2+
3+let
4+ rev = "315";
5+
6+ color-profiles = stdenv.mkDerivation {
7+ name = "splix-color-profiles-20070625";
8+
9+ src = fetchurl {
10+ url = "http://splix.ap2c.org/samsung_cms.tar.bz2";
11+ sha256 = "1156flics5m9m7a4hdmcc2nphbdyary6dfmbcrmsp9xb7ivsypdl";
12+ };
13+
14+ phases = [ "unpackPhase" "installPhase" ];
15+
16+ installPhase = ''
17+ mkdir -p $out/share/cups/profiles/samsung
18+ cp * $out/share/cups/profiles/samsung/
19+ '';
20+ };
21+
22+in stdenv.mkDerivation {
423 name = "splix-svn-${rev}";
24+
525 src = fetchsvn {
626 # We build this from svn, because splix hasn't been in released in several years
727 # although the community has been adding some new printer models.
@@ -10,15 +30,25 @@ stdenv.mkDerivation rec {
1030 sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
1131 };
1232
13− preBuild = ''
14− makeFlags="V=1 DISABLE_JBIG=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model"
33+ postPatch = ''
34+ substituteInPlace src/pstoqpdl.cpp \
35+ --replace "RASTERDIR \"/\" RASTERTOQPDL" "\"$out/lib/cups/filter/rastertoqpdl\"" \
36+ --replace "RASTERDIR" "\"${cups-filters}/lib/cups/filter\"" \
1537 '';
1638
17− buildInputs = [cups zlib];
39+ makeFlags = [
40+ "CUPSFILTER=$(out)/lib/cups/filter"
41+ "CUPSPPD=$(out)/share/cups/model"
42+ "CUPSPROFILE=${color-profiles}/share/cups/profiles"
43+ ];
44+
45+ buildInputs = [ cups zlib jbigkit ];
1846
19− meta = {
20− homepage = http://splix.sourceforge.net;
21− platforms = stdenv.lib.platforms.linux;
22− maintainers = [ stdenv.lib.maintainers.peti ];
47+ meta = with stdenv.lib; {
48+ description = "CUPS drivers for SPL (Samsung Printer Language) printers";
49+ homepage = http://splix.ap2c.org;
50+ license = licenses.gpl2;
51+ platforms = platforms.linux;
52+ maintainers = with maintainers; [ jfrankenau peti ];
2353 };
2454}