diff --git a/pkgs/by-name/cu/cups-idprt-barcode/package.nix b/pkgs/by-name/cu/cups-idprt-barcode/package.nix new file mode 100644 index 0000000000000..1f9bb0b168f91 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-barcode/package.nix @@ -0,0 +1,52 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-barcode"; + version = "1.2.1"; + + src = fetchurl { + name = "idprt_label_printer_linux_driver.zip"; # This is not the original name, but there was debate about whether rec or finalAttrs should be used, so I just renamed it + url = "https://www.idprt.com/prt_v2/files/down_file/id/265/fid/600.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-jp8DDaTmCgNrHCJSSz1K3xDcSB8dQm6i1pICaMrBFaQ="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS drivers for iDPRT barcode printers (iD2P, iD2X, iD4P, iD4S, iE2P, iE2X, iE4P, iE4S, iT4B, iT4E, iT4P, iT4S, iT4X, iX4E, iX4L, iX4P, iX4E, iX6P)"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-mt888/package.nix b/pkgs/by-name/cu/cups-idprt-mt888/package.nix new file mode 100644 index 0000000000000..27441a467b303 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-mt888/package.nix @@ -0,0 +1,52 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-mt888"; + version = "1.2.0"; + + src = fetchurl { + name = "idprt_mt888_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/324/fid/780.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-fmKDRa6NOXMM6IuxRK8sjToGhdPiHO6ZdfUVvR1KKb0="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT MT888"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-mt890/package.nix b/pkgs/by-name/cu/cups-idprt-mt890/package.nix new file mode 100644 index 0000000000000..ca3baacbcfe46 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-mt890/package.nix @@ -0,0 +1,53 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-mt890"; + version = "1.2.0"; + + src = fetchurl { + name = "idprt_mt890_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/320/fid/778.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-8yH+DSPRp4mjKOXw90TiGA4OzxJKHpBUMSLh3L2njw8="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + rm $out/share/cups/model/*.ppd~ + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT MT890"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-sp900/package.nix b/pkgs/by-name/cu/cups-idprt-sp900/package.nix new file mode 100644 index 0000000000000..ed07c4fc36be4 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-sp900/package.nix @@ -0,0 +1,61 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + e2fsprogs, + krb5, + libxcrypt-legacy, + unzip, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "cups-idprt-sp900"; + version = "1.4.0"; + + src = fetchurl { + name = "idprt_sp900_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/176/fid/498.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-+YVQTrqpi16xX+d/ulMtffpA9X7hwtWRiS/mIAw13n8="; + }; + sourceRoot = "idprt_sp900_printer_linux_driver_v${finalAttrs.version}/idprt_sp900_printer_linux_driver_v${finalAttrs.version}"; # >:| + + buildInputs = [ + cups + e2fsprogs + krb5 + libxcrypt-legacy + ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT SP900"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +}) diff --git a/pkgs/by-name/cu/cups-idprt-tspl/package.nix b/pkgs/by-name/cu/cups-idprt-tspl/package.nix new file mode 100644 index 0000000000000..60aa4c8c80d81 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-tspl/package.nix @@ -0,0 +1,61 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + e2fsprogs, + krb5, + libxcrypt-legacy, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-tspl"; + version = "1.4.7"; + + src = fetchurl { + name = "idprt_tspl_printer_linux_driver.zip"; # This is not the original name, but there was debate about whether rec or finalAttrs should be used, so I just renamed it + url = "https://www.idprt.com/prt_v2/files/down_file/id/283/fid/668.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-P3AKSqCh5onOv0itJayEJ6P5pmlkOwOh1OtUjg40BRw="; + }; + + buildInputs = [ + cups + e2fsprogs + krb5 + libxcrypt-legacy + ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + rm $out/share/cups/model/*.ppd~ + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS drivers for TSPL-based iDPRT thermal label printers (SP210, SP310, SP320, SP320E, SP410, SP410BT, SP420, SP450, SP460BT)"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +}