1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

cups-idprt-sp900: init at 1.4.0

(cherry picked from commit 5b479c99b3)
This commit is contained in:
Gavin John 2024-08-18 12:13:26 -04:00 committed by github-actions[bot]
parent 12d869ae2c
commit b139e78d68

View file

@ -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 ];
};
})