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