nix/pkgs: add intermec-cups-driver
This commit is contained in:
parent
b55a4ee46f
commit
dd27953d33
2 changed files with 65 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
args: {
|
||||
{ pkgs, ... }@args: {
|
||||
bazel-run = import ./bazel-run.nix args;
|
||||
crane = import ./crane.nix args;
|
||||
javaws-env = import ./javaws-env.nix args;
|
||||
|
@ -13,4 +13,5 @@ args: {
|
|||
erbium = import ./erbium args;
|
||||
python-emv = import ./python-emv.nix args;
|
||||
sheepshaver = import ./sheepshaver.nix args;
|
||||
intermec-cups-driver = pkgs.callPackage ./intermec-cups-driver.nix {};
|
||||
} // (import ./heptapod-runner.nix args)
|
||||
|
|
63
nix/pkgs/intermec-cups-driver.nix
Normal file
63
nix/pkgs/intermec-cups-driver.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, makeWrapper
|
||||
, coreutils
|
||||
, gnugrep
|
||||
, ghostscript
|
||||
, poppler_utils
|
||||
, netpbm
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intermec-cups-driver";
|
||||
version = "v1.2-56";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lukegb";
|
||||
repo = "intermec-cupsdriver";
|
||||
rev = version;
|
||||
sha256 = "sha256:1pk3qj05w2y891n5hayaw9a9g5w83fbm2kz5f7v74dsg8kcx365i";
|
||||
|
||||
# Downloaded from
|
||||
# https://support.honeywellaidc.com/s/article/OVERVIEW-The-Honeywell-InterDriver-package-for-CUPS-on-Linux-UNIX
|
||||
# (their SSL serving is broken and can't be used directly with fetchurl, and the URL itself doesn't look stable)
|
||||
|
||||
# sha256sum ./CUPS-driver_v1.2-56.tgz
|
||||
# 70c7305ca791e40c0d8cf458d4cd8fed7a2ad0558039b9e118a3a82b12e55f05 ./CUPS-driver_v1.2-56.tgz
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper autoreconfHook ];
|
||||
|
||||
postInstall = ''
|
||||
for f in $out/share/cups/model/intermec/*.ppd; do
|
||||
substituteInPlace "$f" \
|
||||
--replace /usr/bin/ "$out/bin/"
|
||||
done
|
||||
|
||||
substituteInPlace $out/bin/intermec-dp-drv \
|
||||
--replace pbmtodp "$out/bin/pbmtodp"
|
||||
|
||||
wrapProgram $out/bin/intermec-dp-drv \
|
||||
--prefix PATH ":" ${stdenv.lib.makeBinPath [
|
||||
# cat cp cut head
|
||||
coreutils
|
||||
|
||||
# grep
|
||||
gnugrep
|
||||
|
||||
# ps2pdf
|
||||
ghostscript
|
||||
|
||||
# pdf2ppm
|
||||
poppler_utils
|
||||
|
||||
# pgmtopbm pnmtoplainpnm
|
||||
netpbm
|
||||
]}
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue