2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
|
2018-08-16 10:39:37 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
color-profiles = stdenv.mkDerivation {
|
|
|
|
name = "splix-color-profiles-20070625";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://splix.ap2c.org/samsung_cms.tar.bz2";
|
|
|
|
sha256 = "1156flics5m9m7a4hdmcc2nphbdyary6dfmbcrmsp9xb7ivsypdl";
|
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/cups/profiles/samsung
|
|
|
|
cp * $out/share/cups/profiles/samsung/
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-11-07 09:41:55 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2016-03-18 11:30:29 +01:00
|
|
|
name = "splix-svn-${rev}";
|
2018-11-07 09:41:55 +01:00
|
|
|
rev = "315";
|
2018-08-16 10:39:37 +02:00
|
|
|
|
2016-03-18 11:30:29 +01: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";
|
2018-11-07 09:41:55 +01:00
|
|
|
inherit rev;
|
2016-03-18 11:30:29 +01:00
|
|
|
sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
|
2010-04-14 21:27:15 +02:00
|
|
|
};
|
|
|
|
|
2018-08-16 10:39:37 +02:00
|
|
|
postPatch = ''
|
2018-10-27 15:52:26 +02:00
|
|
|
mv -v *.ppd ppd/
|
2018-08-16 10:39:37 +02:00
|
|
|
substituteInPlace src/pstoqpdl.cpp \
|
|
|
|
--replace "RASTERDIR \"/\" RASTERTOQPDL" "\"$out/lib/cups/filter/rastertoqpdl\"" \
|
|
|
|
--replace "RASTERDIR" "\"${cups-filters}/lib/cups/filter\"" \
|
2010-04-14 21:27:15 +02:00
|
|
|
'';
|
|
|
|
|
2018-08-16 10:39:37 +02:00
|
|
|
makeFlags = [
|
|
|
|
"CUPSFILTER=$(out)/lib/cups/filter"
|
|
|
|
"CUPSPPD=$(out)/share/cups/model"
|
|
|
|
"CUPSPROFILE=${color-profiles}/share/cups/profiles"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ cups zlib jbigkit ];
|
2010-04-14 21:27:15 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-08-16 10:39:37 +02:00
|
|
|
description = "CUPS drivers for SPL (Samsung Printer Language) printers";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://splix.ap2c.org";
|
2018-08-16 10:39:37 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ jfrankenau peti ];
|
2010-04-14 21:27:15 +02:00
|
|
|
};
|
2016-02-27 18:33:17 +01:00
|
|
|
}
|