From 3487b8ce24d40cc898f3dba0a9af5e028e1d5844 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 2 Jul 2024 22:28:50 +0200 Subject: [PATCH] cups-ssi-slp-400-600: init at unstable-2021-12-09 --- cups-sii-slp-400-600/default.nix | 46 ++++++++++++++++++++++++++ cups-sii-slp-400-600/fix-includes.diff | 10 ++++++ default.nix | 2 ++ flake.nix | 1 + 4 files changed, 59 insertions(+) create mode 100644 cups-sii-slp-400-600/default.nix create mode 100644 cups-sii-slp-400-600/fix-includes.diff diff --git a/cups-sii-slp-400-600/default.nix b/cups-sii-slp-400-600/default.nix new file mode 100644 index 0000000..5da904c --- /dev/null +++ b/cups-sii-slp-400-600/default.nix @@ -0,0 +1,46 @@ +{ stdenv +, lib +, fetchzip +, fetchpatch +, cups +, perl +}: + +stdenv.mkDerivation { + pname = "cups-sii-slp-400-600"; + version = "unstable-2021-12-09"; # Last-Modified HTTP header of zip file + + src = fetchzip { + url = "https://siibusinessproducts.com/wp-content/uploads/2021/12/SLP-400-600-SeikoSLPLinuxCUPSDriver.zip"; + hash = "sha256-ZBBuZ87zXkeDKS0HP6R0gCHiJHCwGUJZIkWOE9WZxOU="; + }; + + patches = [ + (fetchpatch { + name = "Fix-includes.patch"; + url = "https://github.com/fawkesley/smart-label-printer-slp-linux-driver/commit/292e4b78b664379230c3a630e456bc5a696bf757.patch"; + hash = "sha256-XHjMHCBbIEAtYUQj7o4y5U4OYzGtnyqxuMYlhfMng9g="; + }) + ]; + + patchFlags = [ "-p2" ]; + + nativeBuildInputs = [ + cups.dev + perl # required to patch paths in PPD files + ]; + + makeFlags = [ "ppddir=$(out)/share/cups/model/seiko" "filterdir=$(out)/lib/cups/filter" ]; + + preInstall = '' + mkdir -p $out/{share/cups/model/seiko,lib/cups/filter} + ''; + + meta = with lib; { + description = "CUPS Driver (PPD and filter) for Seiko Instruments Inc (SII) SLP100/410, SLP200/420, SLP240/430, SLP440, SLP450, SLP620, SLP650/SLP650SE"; + homepage = "https://siibusinessproducts.com/support/linux-software-and-drivers/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.unix; + }; +} diff --git a/cups-sii-slp-400-600/fix-includes.diff b/cups-sii-slp-400-600/fix-includes.diff new file mode 100644 index 0000000..b2dd764 --- /dev/null +++ b/cups-sii-slp-400-600/fix-includes.diff @@ -0,0 +1,10 @@ +--- a/RasterToSIISLP.cxx ++++ b/RasterToSIISLP.cxx +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include "SeikoSLPCommands.h" + #include "SeikoInstrumentsVendorID.h" diff --git a/default.nix b/default.nix index accb7c3..7b901cf 100644 --- a/default.nix +++ b/default.nix @@ -23,6 +23,8 @@ rec { colorchord2 = callPackage ./colorchord2 { }; + cups-sii-slp-400-600 = callPackage ./cups-sii-slp-400-600 { }; + fSpy = callPackage ./fSpy { }; face_morpher = callPythonPackage ./face_morpher { }; diff --git a/flake.nix b/flake.nix index ed8d2aa..fcc065c 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,7 @@ afancontrol bandcamp-downloader colorchord2 + cups-sii-slp-400-600 fSpy face_morpher gust_tools