about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libwnck
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libwnck')
-rw-r--r--nixpkgs/pkgs/development/libraries/libwnck/3.x.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/libwnck/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libwnck/fix-pc-file.patch24
3 files changed, 136 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libwnck/3.x.nix b/nixpkgs/pkgs/development/libraries/libwnck/3.x.nix
new file mode 100644
index 000000000000..29692c41c930
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwnck/3.x.nix
@@ -0,0 +1,85 @@
+{ stdenv
+, fetchurl
+, fetchpatch
+, meson
+, ninja
+, pkgconfig
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, libX11
+, glib
+, gtk3
+, pango
+, cairo
+, libXres
+, libstartup_notification
+, gettext
+, gobject-introspection
+, gnome3
+}:
+
+stdenv.mkDerivation rec{
+  pname = "libwnck";
+  version = "3.32.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1jp3p1lnwnwi6fxl2rz3166cmwzwy9vqz896anpwc3wdy9f875cm";
+  };
+
+  patches = [
+    # https://gitlab.gnome.org/GNOME/libwnck/issues/139
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/libwnck/commit/0d9ff7db63af568feef8e8c566e249058ccfcb4e.patch;
+      sha256 = "18f78aayq9jma54v2qz3rm2clmz1cfq5bngxw8p4zba7hplyqsl9";
+    })
+    # https://gitlab.gnome.org/GNOME/libwnck/merge_requests/12
+    ./fix-pc-file.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkgconfig
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+  ];
+
+  buildInputs = [
+    libX11
+    libstartup_notification
+    pango
+    cairo
+    libXres
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gtk3
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "${pname}${stdenv.lib.versions.major version}";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "Library to manage X windows and workspaces (via pagers, tasklists, etc.)";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.worldofpeace ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwnck/default.nix b/nixpkgs/pkgs/development/libraries/libwnck/default.nix
new file mode 100644
index 000000000000..2872181a36d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwnck/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, gtk2, intltool, xorg }:
+
+stdenv.mkDerivation rec {
+  pname = "libwnck";
+  version = "2.31.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "17isfjvrzgj5znld2a7zsk9vd39q9wnsysnw5jr8iz410z935xw3";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtk2 intltool xorg.libX11 xorg.libXres ];
+  # ?another optional: startup-notification
+
+  configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK
+
+  meta = {
+    description = "A library for creating task lists and pagers";
+    homepage = "https://gitlab.gnome.org/GNOME/libwnck";
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ johnazoidberg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwnck/fix-pc-file.patch b/nixpkgs/pkgs/development/libraries/libwnck/fix-pc-file.patch
new file mode 100644
index 000000000000..42017a993b51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwnck/fix-pc-file.patch
@@ -0,0 +1,24 @@
+diff --git a/meson.build b/meson.build
+index 28799d8..047e523 100644
+--- a/meson.build
++++ b/meson.build
+@@ -72,11 +72,15 @@
+ pc_conf = configuration_data()
+ pc_conf.set('prefix', get_option('prefix'))
+ pc_conf.set('exec_prefix', '${prefix}')
+-pc_conf.set('libdir', '${exec_prefix}/' + get_option('libdir'))
+-pc_conf.set('includedir', '${prefix}/' + get_option('includedir'))
+-pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
++pc_conf.set('libdir', '${exec_prefix}' / get_option('libdir'))
++pc_conf.set('includedir', '${prefix}' / get_option('includedir'))
++if conf.has('HAVE_' + STARTUP_NOTIFICATION_PACKAGE.to_upper().underscorify())
++  pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
++endif
+ pc_conf.set('X11_PACKAGE', X11_PACKAGE)
+-pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
++if conf.has('HAVE_' + XRES_PACKAGE.to_upper().underscorify())
++  pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
++endif
+ pc_conf.set('VERSION', meson.project_version())
+ 
+ foreach pc: [PACKAGE_NAME, PACKAGE_NAME + '-uninstalled']