From a3346d7db59018384355ad25e886baa006837101 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sun, 29 Sep 2024 00:51:39 -0400 Subject: [PATCH] pkgs/tmx-cups-ppd: init at 2.0.2.101 --- pkgs/all-packages.nix | 1 + pkgs/tmx-cups-ppd.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tmx-cups-ppd.nix diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index 11fa95f..0e3d63d 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -11,4 +11,5 @@ unbted = pkgs.callPackage ./unbted.nix { }; bytecode-viewer = pkgs.callPackage ./bytecode-viewer.nix { }; unmap = pkgs.callPackage ./unmap.nix { }; + tmx-cups-ppd = pkgs.callPackage ./tmx-cups-ppd.nix { }; } diff --git a/pkgs/tmx-cups-ppd.nix b/pkgs/tmx-cups-ppd.nix new file mode 100644 index 0000000..73c6b9f --- /dev/null +++ b/pkgs/tmx-cups-ppd.nix @@ -0,0 +1,36 @@ +{ stdenv +, fetchurl +, bintools +, cups +, autoPatchelfHook +}: + +stdenv.mkDerivation rec { + name = "tmx-cups-ppd"; + version = "2.0.2.101"; + + src = fetchurl { + url = "https://ftp.epson.com/drivers/pos/tmx-cups-${version}.tar.gz"; + sha256 = "sha256-8WA6Q5z9//UJj20VHOsPA/nCCd50CcaHRVArtmTjeiQ="; + }; + + buildInputs = [ bintools cups autoPatchelfHook ]; + + buildPhase = '' + ar p filter/tmx-cups_*_amd64.deb data.tar.gz \ + | tar zxf - --wildcards './usr/lib/cups/filter/*' + ''; + + installPhase = '' + mkdir -p $out/share/cups/model/ + mkdir -p $out/lib/cups/filter/ + + cp ppd/*.ppd.gz $out/share/cups/model/ + cp usr/lib/cups/filter/* $out/lib/cups/filter/ + ''; + + meta = { + homepage = "https://epson.com/Support/Point-of-Sale/Thermal-Printers/Epson-TM-m30-Series/s/SPT_C31CE95011"; + description = "CUPS PPD files and filters for EPSON tmx thermal printers"; + }; +}