about summary refs log tree commit diff
path: root/pkgs/by-name/pa/passes/package.nix
blob: e7abf9d95f009e686857db39cff46c554c62d45e (plain) (blame)
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
58
59
60
61
62
63
64
65
66
67
68
{ lib
, stdenv
, fetchFromGitHub
, appstream-glib
, blueprint-compiler
, desktop-file-utils
, gettext
, gtk4
, libadwaita
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook4
, zint
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "passes";
  version = "0.9";

  src = fetchFromGitHub {
    owner = "pablo-s";
    repo = "passes";
    rev = "v${finalAttrs.version}";
    hash = "sha256-RfoqIyqc9zwrWZ5RLhQl+6vTccbCTwtDcMlnWPCDOag=";
  };

  postPatch = ''
    substituteInPlace src/model/meson.build \
      --replace /app/lib ${zint}/lib
    substituteInPlace src/view/window.blp \
      --replace reveal_flap reveal-flap
    substituteInPlace build-aux/meson/postinstall.py \
      --replace gtk-update-icon-cache gtk4-update-icon-cache
    patchShebangs build-aux/meson/postinstall.py
  '';

  strictDeps = true;

  nativeBuildInputs = [
    appstream-glib
    blueprint-compiler
    desktop-file-utils
    gettext
    meson
    ninja
    pkg-config
    (python3.withPackages (pp: [pp.pygobject3]))
    wrapGAppsHook4
  ];

  buildInputs = [
    gtk4
    libadwaita
    zint
  ];

  meta = with lib; {
    description = "A digital pass manager";
    mainProgram = "passes";
    homepage = "https://github.com/pablo-s/passes";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ fgaz ];
    platforms = platforms.all;
    broken = stdenv.isDarwin; # Crashes
  };
})