2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, rpmextract }:
|
2016-05-30 10:42:10 +01:00
|
|
|
let
|
|
|
|
version = "20160218";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "postscript-lexmark";
|
|
|
|
inherit version;
|
2016-05-30 10:42:10 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.openprinting.org/download/printdriver/components/lsb3.2/main/RPMS/noarch/openprinting-ppds-postscript-lexmark-${version}-1lsb3.2.noarch.rpm";
|
2016-05-30 10:42:10 +01:00
|
|
|
sha256 = "0wbhvypdr96a5ddg6kj41dn9sbl49n7pfi2vs762ij82hm2gvwcm";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ rpmextract ];
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase"];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
rpmextract $src
|
|
|
|
for ppd in opt/OpenPrinting-Lexmark/ppds/Lexmark/*; do
|
|
|
|
gzip -d $ppd
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/cups/model/postscript-lexmark
|
|
|
|
cp opt/OpenPrinting-Lexmark/ppds/Lexmark/*.ppd $out/share/cups/model/postscript-lexmark/
|
|
|
|
cp -r opt/OpenPrinting-Lexmark/doc $out/doc
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.openprinting.org/driver/Postscript-Lexmark/";
|
2016-05-30 10:42:10 +01:00
|
|
|
description = "Lexmark Postscript Drivers";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|