aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/misc/gnome-passwordsafe/default.nix
blob: dc84b312626ef7d468d6d8de5fcd6ce641aa1ebe (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ stdenv
, meson
, ninja
, pkg-config
, gettext
, fetchFromGitLab
, python3
, libhandy_0
, libpwquality
, wrapGAppsHook
, gtk3
, glib
, gdk-pixbuf
, gobject-introspection
, desktop-file-utils
, appstream-glib }:

python3.pkgs.buildPythonApplication rec {
  pname = "gnome-passwordsafe";
  version = "3.99.2";
  format = "other";
  strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "World";
    repo = "PasswordSafe";
    rev = version;
    sha256 = "0pi2l4gwf8paxm858mxrcsk5nr0c0zw5ycax40mghndb6b1qmmhf";
  };

  nativeBuildInputs = [
    meson
    ninja
    gettext
    pkg-config
    wrapGAppsHook
    desktop-file-utils
    appstream-glib
    gobject-introspection
  ];

  buildInputs = [
    gtk3
    glib
    gdk-pixbuf
    libhandy_0
  ];

  propagatedBuildInputs = with python3.pkgs; [
    pygobject3
    construct

    # pykeepass 3.2.1 changed some exception types, and is not backwards compatible.
    # Remove override once the MR is merged upstream.
    # https://gitlab.gnome.org/World/PasswordSafe/-/merge_requests/79
    (pykeepass.overridePythonAttrs (old: rec {
      version = "3.2.0";
      src = fetchPypi {
        pname = "pykeepass";
        inherit version;
        sha256 = "1ysjn92bixq8wkwhlbhrjj9z0h80qnlnj7ks5478ndkzdw5gxvm1";
      };
      propagatedBuildInputs = old.propagatedBuildInputs ++ [ pycryptodome ];
    }))

  ] ++ [
    libpwquality # using the python bindings
  ];

  meta = with stdenv.lib; {
    broken = stdenv.hostPlatform.isStatic; # libpwquality doesn't provide bindings when static
    description = "Password manager for GNOME which makes use of the KeePass v.4 format";
    homepage = "https://gitlab.gnome.org/World/PasswordSafe";
    license = licenses.gpl3Only;
    platforms = platforms.linux;
    maintainers = with maintainers; [ mvnetbiz ];
  };
}