summaryrefslogtreecommitdiff
path: root/pkgs/misc/ptouch-print/default.nix
blob: e8c51514e0a9946d4dd6242d1b1b708adca62d29 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ cmake
, fetchgit
, gd
, gettext
, git
, lib
, libjpeg
, libpng
, libusb1
, pkg-config
, stdenv
, zlib
}:

stdenv.mkDerivation rec {
  pname = "ptouch-print";
  version = "1.5-unstable-2024-02-11";

  src = fetchgit {
    url = "https://git.familie-radermacher.ch/linux/ptouch-print.git";
    rev = "8aaeecd84b619587dc3885dd4fea4b7310c82fd4";
    hash = "sha256-IIq3SmMfsgwSYbgG1w/wrBnFtb6xdFK2lkK27Qqk6mw=";
  };

  nativeBuildInputs = [
    cmake
    git
    pkg-config
  ];

  buildInputs = [
    gd
    gettext
    libjpeg
    libpng
    zlib
    libusb1
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    mv ptouch-print $out/bin

    runHook postInstall
  '';

  meta = with lib; {
    description = "Command line tool to print labels on Brother P-Touch printers on Linux";
    homepage = "https://dominic.familie-radermacher.ch/projekte/ptouch-print/";
    license = licenses.gpl3Plus;
    mainProgram = "ptouch-print";
    maintainers = with maintainers; [ shamilton ];
    platforms = platforms.linux;
  };
}