Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cups-idprt-{tspl, barcode, mt888, mt890, sp900}: init #308317

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions pkgs/by-name/cu/cups-idprt-barcode/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
52 changes: 52 additions & 0 deletions pkgs/by-name/cu/cups-idprt-mt888/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
53 changes: 53 additions & 0 deletions pkgs/by-name/cu/cups-idprt-mt890/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
61 changes: 61 additions & 0 deletions pkgs/by-name/cu/cups-idprt-sp900/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
})
61 changes: 61 additions & 0 deletions pkgs/by-name/cu/cups-idprt-tspl/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}