nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv
2, fetchurl
3, meson
4, ninja
5, pkg-config
6, libxslt
7, docbook-xsl-ns
8, glib
9, gdk-pixbuf
10, gnome
11, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform)
12, gobject-introspection
13}:
14
15stdenv.mkDerivation rec {
16 pname = "libnotify";
17 version = "0.7.12";
18
19 outputs = [ "out" "man" "dev" ];
20
21 src = fetchurl {
22 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
23 sha256 = "dEsrN1CBNfgmG3Vanevm4JrdQhrcdb3pMPbhmLcKtG4=";
24 };
25
26 mesonFlags = [
27 # disable tests as we don't need to depend on GTK (2/3)
28 "-Dtests=false"
29 "-Ddocbook_docs=disabled"
30 "-Dgtk_doc=false"
31 "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
32 ];
33
34 strictDeps = true;
35
36 nativeBuildInputs = [
37 meson
38 ninja
39 pkg-config
40 libxslt
41 docbook-xsl-ns
42 glib # for glib-mkenums needed during the build
43 ] ++ lib.optionals withIntrospection [
44 gobject-introspection
45 ];
46
47 buildInputs = lib.optionals withIntrospection [
48 gobject-introspection
49 ];
50
51 propagatedBuildInputs = [
52 gdk-pixbuf
53 glib
54 ];
55
56 passthru = {
57 updateScript = gnome.updateScript {
58 packageName = pname;
59 versionPolicy = "none";
60 };
61 };
62
63 meta = with lib; {
64 description = "A library that sends desktop notifications to a notification daemon";
65 homepage = "https://gitlab.gnome.org/GNOME/libnotify";
66 license = licenses.lgpl21;
67 maintainers = teams.gnome.members;
68 mainProgram = "notify-send";
69 platforms = platforms.unix;
70 };
71}