nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 pkgs,
5 python3,
6 wrapGAppsHook3,
7 gobject-introspection,
8}:
9
10python3.pkgs.buildPythonApplication {
11 pname = "pdf-quench";
12 version = "1.0.5";
13
14 src = fetchFromGitHub {
15 owner = "linuxerwang";
16 repo = "pdf-quench";
17 rev = "b72b3970b371026f9a7ebe6003581e8a63af98f6";
18 sha256 = "1rp9rlwr6rarcsxygv5x2c5psgwl6r69k0lsgribgyyla9cf2m7n";
19 };
20
21 nativeBuildInputs = [
22 wrapGAppsHook3
23 gobject-introspection
24 ];
25 buildInputs = with pkgs; [
26 gtk3
27 goocanvas2
28 poppler_gi
29 ];
30 propagatedBuildInputs = with python3.pkgs; [
31 pygobject3
32 pypdf2
33 ];
34
35 format = "other";
36 doCheck = false;
37
38 installPhase = ''
39 install -D -T -m 755 src/pdf_quench.py $out/bin/pdf-quench
40 '';
41
42 meta = with lib; {
43 homepage = "https://github.com/linuxerwang/pdf-quench";
44 description = "Visual tool for cropping pdf files";
45 mainProgram = "pdf-quench";
46 platforms = platforms.linux;
47 license = licenses.gpl2;
48 maintainers = with maintainers; [ flokli ];
49 };
50}