1{ stdenv
2, lib
3, fetchurl
4, fetchpatch
5, meson
6, mesonEmulatorHook
7, ninja
8, pkg-config
9, gtk-doc
10, docbook_xsl
11, docbook_xml_dtd_412
12, libX11
13, glib
14, gtk3
15, pango
16, cairo
17, libXres
18, libstartup_notification
19, gettext
20, gobject-introspection
21, gnome
22}:
23
24stdenv.mkDerivation rec {
25 pname = "libwnck";
26 version = "43.0";
27
28 outputs = [ "out" "dev" "devdoc" ];
29 outputBin = "dev";
30
31 src = fetchurl {
32 url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
33 sha256 = "kFvNuFhH1rj4hh5WswzW3GHq5n7O9M2ZSp+SWiaiwf4=";
34 };
35
36 patches = [
37 # bamfdaemon crashes with libwnck3 43.0
38 # https://bugs.launchpad.net/ubuntu/+source/libwnck3/+bug/1990263
39 (fetchpatch {
40 url = "https://gitlab.gnome.org/GNOME/libwnck/-/commit/6ceb684442eb26e3bdb8a38bf52264ad55f96a7b.patch";
41 sha256 = "/1wCnElCrZB7XTDW/l3dxMKZ9czGnukbGu4/aQStoXE=";
42 })
43 ];
44
45 nativeBuildInputs = [
46 meson
47 ninja
48 pkg-config
49 gettext
50 gobject-introspection
51 gtk-doc
52 docbook_xsl
53 docbook_xml_dtd_412
54 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
55 mesonEmulatorHook
56 ];
57
58 buildInputs = [
59 libX11
60 libstartup_notification
61 pango
62 cairo
63 libXres
64 ];
65
66 propagatedBuildInputs = [
67 glib
68 gtk3
69 ];
70
71 mesonFlags = [
72 "-Dgtk_doc=true"
73 ];
74
75 passthru = {
76 updateScript = gnome.updateScript {
77 packageName = pname;
78 };
79 };
80
81 meta = with lib; {
82 description = "Library to manage X windows and workspaces (via pagers, tasklists, etc.)";
83 license = licenses.lgpl21Plus;
84 platforms = platforms.linux;
85 maintainers = with maintainers; [ liff ];
86 };
87}