1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoreconfHook,
6 gettext,
7 pkg-config,
8 intltool,
9 glib,
10 gnome,
11 gtk3,
12 gtk-doc,
13 gnupg,
14 gpgme,
15 dbus-glib,
16 libgnome-keyring,
17}:
18
19stdenv.mkDerivation rec {
20 pname = "libcryptui";
21 version = "3.12.2";
22
23 src = fetchurl {
24 url = "mirror://gnome/sources/libcryptui/${lib.versions.majorMinor version}/libcryptui-${version}.tar.xz";
25 sha256 = "0rh8wa5k2iwbwppyvij2jdxmnlfjbna7kbh2a5n7zw4nnjkx3ski";
26 };
27
28 patches = [
29 # based on https://gitlab.gnome.org/GNOME/libcryptui/-/commit/b05e301d1b264a5d8f07cb96e5edc243d99bff79.patch
30 # https://gitlab.gnome.org/GNOME/libcryptui/-/merge_requests/1
31 ./fix-latest-gnupg.patch
32 ];
33
34 nativeBuildInputs = [
35 pkg-config
36 dbus-glib # dbus-binding-tool
37 gtk3 # AM_GLIB_GNU_GETTEXT
38 gtk-doc
39 intltool
40 autoreconfHook
41 ];
42 buildInputs = [
43 glib
44 gtk3
45 gnupg
46 gpgme
47 dbus-glib
48 libgnome-keyring
49 ];
50 propagatedBuildInputs = [ dbus-glib ];
51
52 env.GNUPG = lib.getExe gnupg;
53 env.GPGME_CONFIG = lib.getExe' (lib.getDev gpgme) "gpgme-config";
54
55 enableParallelBuilding = true;
56
57 preAutoreconf = ''
58 # error: possibly undefined macro: AM_NLS
59 cp ${gettext}/share/gettext/m4/nls.m4 m4
60 '';
61
62 passthru = {
63 updateScript = gnome.updateScript {
64 packageName = "libcryptui";
65 versionPolicy = "odd-unstable";
66 };
67 };
68
69 meta = with lib; {
70 description = "Interface components for OpenPGP";
71 mainProgram = "seahorse-daemon";
72 homepage = "https://gitlab.gnome.org/GNOME/libcryptui";
73 license = licenses.lgpl21Plus;
74 platforms = platforms.unix;
75 # ImportError: lib/gobject-introspection/giscanner/_giscanner.cpython-312-x86_64-linux-gnu.so
76 # cannot open shared object file: No such file or directory
77 broken = stdenv.buildPlatform != stdenv.hostPlatform;
78 };
79}