Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 68 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchsvn, 5 fetchurl, 6 cups, 7 cups-filters, 8 jbigkit, 9 zlib, 10}: 11 12let 13 14 color-profiles = stdenv.mkDerivation { 15 pname = "splix-color-profiles"; 16 version = "unstable-2007-06-25"; 17 18 src = fetchurl { 19 url = "http://splix.ap2c.org/samsung_cms.tar.bz2"; 20 sha256 = "1156flics5m9m7a4hdmcc2nphbdyary6dfmbcrmsp9xb7ivsypdl"; 21 }; 22 23 installPhase = '' 24 mkdir -p $out/share/cups/profiles/samsung 25 cp * $out/share/cups/profiles/samsung/ 26 ''; 27 }; 28 29in 30stdenv.mkDerivation rec { 31 pname = "splix-svn"; 32 version = "315"; 33 34 src = fetchsvn { 35 # We build this from svn, because splix hasn't been in released in several years 36 # although the community has been adding some new printer models. 37 url = "svn://svn.code.sf.net/p/splix/code/splix"; 38 rev = version; 39 sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl"; 40 }; 41 42 postPatch = '' 43 mv -v *.ppd ppd/ 44 substituteInPlace src/pstoqpdl.cpp \ 45 --replace "RASTERDIR \"/\" RASTERTOQPDL" "\"$out/lib/cups/filter/rastertoqpdl\"" \ 46 --replace "RASTERDIR" "\"${cups-filters}/lib/cups/filter\"" \ 47 ''; 48 49 makeFlags = [ 50 "CUPSFILTER=$(out)/lib/cups/filter" 51 "CUPSPPD=$(out)/share/cups/model" 52 "CUPSPROFILE=${color-profiles}/share/cups/profiles" 53 ]; 54 55 buildInputs = [ 56 cups 57 zlib 58 jbigkit 59 ]; 60 61 meta = with lib; { 62 description = "CUPS drivers for SPL (Samsung Printer Language) printers"; 63 homepage = "http://splix.ap2c.org"; 64 license = licenses.gpl2Only; 65 platforms = platforms.linux; 66 maintainers = [ ]; 67 }; 68}