summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/cups-ptouch
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-06-07 15:46:12 +0200
committerlassulus <lassulus@lassul.us>2022-06-07 15:46:12 +0200
commitb3786c3a74fce6a742649c37ab2ad1255f5864bf (patch)
treea5453da91d868781b2339722a4e7bf588993ac09 /makefu/5pkgs/cups-ptouch
parente6f67aa910f78ecf75f3a47a0794497148c60c2b (diff)
parent53855cd2d0dadb159215c5ed12e6d0be02dca98b (diff)
Merge remote-tracking branch 'gum/22.05'
Diffstat (limited to 'makefu/5pkgs/cups-ptouch')
-rw-r--r--makefu/5pkgs/cups-ptouch/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/makefu/5pkgs/cups-ptouch/default.nix b/makefu/5pkgs/cups-ptouch/default.nix
new file mode 100644
index 000000000..be0dd1663
--- /dev/null
+++ b/makefu/5pkgs/cups-ptouch/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gd
+, libusb1
+, cups
+, libpng
+, perl
+, perlPackages
+, libxml2
+, callPackage
+, foomatic-db-engine ? ( callPackage ../foomatic-db-engine {} )
+}:
+
+stdenv.mkDerivation rec {
+ pname = "printer-driver-ptouch";
+ version = "1.6";
+
+ src = fetchFromGitHub {
+ owner = "philpem";
+ repo = "printer-driver-ptouch";
+ rev = "v${version}";
+ sha256 = "1c4hkncnr4qwkbz5dfvksngvq057j6xnbi1jjvchnlr7zgj7cndk";
+ };
+
+ postPatch = ''
+ patchShebangs foomaticalize
+ '';
+ nativeBuildInputs = [
+ autoreconfHook
+ perl
+ libxml2
+ perlPackages.XMLLibXML
+ foomatic-db-engine
+ ];
+
+ buildInputs = [
+ cups
+ libpng
+ ];
+ postInstall = ''
+ mkdir -p $out/share/cups/model/
+ echo "dummy dummy" > "$out/share/foomatic/db/oldprinterids"
+ FOOMATICDB="$out/share/foomatic" foomatic-compiledb -t ppd -d "$out/share/cups/model/Brother/"
+ rm -r $out/share/foomatic
+ '';
+
+ meta = with lib; {
+ description = "Command line tool to print labels on Brother P-Touch printers on Linux";
+ license = licenses.gpl3Plus;
+ homepage = "https://mockmoon-cybernetics.ch/computer/p-touch2430pc/";
+ maintainers = with maintainers; [ shamilton ];
+ platforms = platforms.linux;
+ };
+}