aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/misc/pdf-quench/default.nix
blob: d364074d4450e5cede33c6020037070437aceeaf (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
{ stdenv, fetchFromGitHub, pkgs, pythonPackages, wrapGAppsHook}:

pythonPackages.buildPythonApplication {
  pname = "pdf-quench";
  version = "1.0.5";

  src = fetchFromGitHub {
    owner = "linuxerwang";
    repo = "pdf-quench";
    rev = "b72b3970b371026f9a7ebe6003581e8a63af98f6";
    sha256 = "1rp9rlwr6rarcsxygv5x2c5psgwl6r69k0lsgribgyyla9cf2m7n";
  };

  nativeBuildInputs = [ wrapGAppsHook ];
  buildInputs = with pkgs; [
    gtk3
    gobject-introspection
    goocanvas2
    poppler_gi
  ];
  propagatedBuildInputs = with pythonPackages; [ pygobject3 pypdf2 ];

  format = "other";
  doCheck = false;

  installPhase = ''
    install -D -T -m 755 src/pdf_quench.py $out/bin/pdf-quench
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/linuxerwang/pdf-quench";
    description = "A visual tool for cropping pdf files";
    platforms = platforms.linux;
    license = licenses.gpl2;
    maintainers = with maintainers; [ flokli ];
  };
}