2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
color-profiles = stdenv.mkDerivation {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "splix-color-profiles";
|
|
|
|
version = "unstable-2007-06-25";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://splix.ap2c.org/samsung_cms.tar.bz2";
|
|
|
|
sha256 = "1156flics5m9m7a4hdmcc2nphbdyary6dfmbcrmsp9xb7ivsypdl";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/cups/profiles/samsung
|
|
|
|
cp * $out/share/cups/profiles/samsung/
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "splix-svn";
|
|
|
|
version = "315";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
# We build this from svn, because splix hasn't been in released in several years
|
|
|
|
# although the community has been adding some new printer models.
|
|
|
|
url = "svn://svn.code.sf.net/p/splix/code/splix";
|
2021-08-18 13:19:15 +00:00
|
|
|
rev = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
mv -v *.ppd ppd/
|
|
|
|
substituteInPlace src/pstoqpdl.cpp \
|
|
|
|
--replace "RASTERDIR \"/\" RASTERTOQPDL" "\"$out/lib/cups/filter/rastertoqpdl\"" \
|
|
|
|
--replace "RASTERDIR" "\"${cups-filters}/lib/cups/filter\"" \
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"CUPSFILTER=$(out)/lib/cups/filter"
|
|
|
|
"CUPSPPD=$(out)/share/cups/model"
|
|
|
|
"CUPSPROFILE=${color-profiles}/share/cups/profiles"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ cups zlib jbigkit ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "CUPS drivers for SPL (Samsung Printer Language) printers";
|
|
|
|
homepage = "http://splix.ap2c.org";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2021-10-17 02:12:59 +00:00
|
|
|
maintainers = with maintainers; [ jfrankenau ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|