about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gtk
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-09 18:28:16 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-12 18:46:15 +0000
commitfd2e737e0678ee7d8081baef05b305146a2c0034 (patch)
treeac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/libraries/gtk
parentcc207d720b6aa836e256c1ee9842bc739e630a8a (diff)
parent9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff)
downloadnixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gtk')
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/2.x.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/3.x.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/4.x.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh15
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/gtk2-clean-immodules-cache.sh12
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/gtk3-clean-immodules-cache.sh11
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh11
7 files changed, 61 insertions, 45 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gtk/2.x.nix b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix
index 4304cb388d1a..8f50c922f514 100644
--- a/nixpkgs/pkgs/development/libraries/gtk/2.x.nix
+++ b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix
@@ -1,4 +1,4 @@
-{ config, lib, stdenv, fetchurl, pkg-config, gettext, glib, atk, pango, cairo, perl, xorg
+{ config, lib, substituteAll, stdenv, fetchurl, pkg-config, gettext, glib, atk, pango, cairo, perl, xorg
 , gdk-pixbuf, xlibsWrapper, gobject-introspection
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups ? null
@@ -12,6 +12,16 @@ assert cupsSupport -> cups != null;
 
 with lib;
 
+let
+
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-2.0";
+    gtk_binary_version = "2.10.0";
+  };
+
+in
+
 stdenv.mkDerivation rec {
   pname = "gtk+";
   version = "2.24.32";
@@ -27,8 +37,8 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   setupHooks =  [
-    ./hooks/gtk2-clean-immodules-cache.sh
     ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
   ];
 
   nativeBuildInputs = setupHooks ++ [ perl pkg-config gettext gobject-introspection ];
diff --git a/nixpkgs/pkgs/development/libraries/gtk/3.x.nix b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix
index 5180df634604..d1e478ded262 100644
--- a/nixpkgs/pkgs/development/libraries/gtk/3.x.nix
+++ b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix
@@ -1,4 +1,6 @@
-{ lib, stdenv
+{ lib
+, stdenv
+, substituteAll
 , fetchurl
 , fetchpatch
 , pkg-config
@@ -48,21 +50,31 @@
 
 assert cupsSupport -> cups != null;
 
+let
+
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-3.0";
+    gtk_binary_version = "3.0.0";
+  };
+
+in
+
 stdenv.mkDerivation rec {
   pname = "gtk+3";
-  version = "3.24.24";
+  version = "3.24.27";
 
   outputs = [ "out" "dev" ] ++ lib.optional withGtkDoc "devdoc";
   outputBin = "dev";
 
   setupHooks = [
-    ./hooks/gtk3-clean-immodules-cache.sh
     ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
   ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtk+/${lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
-    sha256 = "12ipk1d376bai9v820qzhxba93kkh5abi6mhyqr4hwjvqmkl77fc";
+    sha256 = "09ksflq5j257bf5zn8q2nnf2flicg9qqgfy7za79z7rkf1shc77p";
   };
 
   patches = [
@@ -176,6 +188,8 @@ stdenv.mkDerivation rec {
     moveToOutput bin/gtk-update-icon-cache "$out"
     # Launcher
     moveToOutput bin/gtk-launch "$out"
+    # Broadway daemon
+    moveToOutput bin/broadwayd "$out"
 
     # TODO: patch glib directly
     for f in $dev/bin/gtk-encode-symbolic-svg; do
@@ -214,7 +228,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = "https://www.gtk.org/";
     license = licenses.lgpl2Plus;
-    maintainers = with maintainers; [ raskin vcunat lethalman worldofpeace ];
+    maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
     platforms = platforms.all;
     changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${version}/NEWS";
   };
diff --git a/nixpkgs/pkgs/development/libraries/gtk/4.x.nix b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix
index 59b0b080a52a..28247d6c9728 100644
--- a/nixpkgs/pkgs/development/libraries/gtk/4.x.nix
+++ b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix
@@ -1,5 +1,6 @@
 { lib
 , stdenv
+, substituteAll
 , fetchurl
 , pkg-config
 , gettext
@@ -53,21 +54,31 @@
 
 assert cupsSupport -> cups != null;
 
+let
+
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-4.0";
+    gtk_binary_version = "4.0.0";
+  };
+
+in
+
 stdenv.mkDerivation rec {
   pname = "gtk4";
-  version = "4.0.2";
+  version = "4.0.3";
 
   outputs = [ "out" "dev" ] ++ lib.optional withGtkDoc "devdoc";
   outputBin = "dev";
 
   setupHooks = [
-    ./hooks/gtk4-clean-immodules-cache.sh
     ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
   ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz";
-    sha256 = "115w3mzwm1xsi1q85qvwfm2yxpsjs2rcajgddzbnwhjicyn0frv2";
+    sha256 = "18mJNyV5C1C9mjuyeIVtnVQ7RLa5uVHXtg573swTGJA=";
   };
 
   nativeBuildInputs = [
@@ -226,7 +237,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = "https://www.gtk.org/";
     license = licenses.lgpl2Plus;
-    maintainers = with maintainers; [ raskin vcunat lethalman worldofpeace ];
+    maintainers = with maintainers; [ raskin lethalman worldofpeace ];
     platforms = platforms.all;
     changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${version}/NEWS";
   };
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh
new file mode 100644
index 000000000000..0868a4a39101
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh
@@ -0,0 +1,15 @@
+# shellcheck shell=bash
+
+fixupOutputHooks+=(_gtkCleanImmodulesCache)
+
+# Clean comments that link to generator of the file
+_gtkCleanImmodulesCache() {
+    # gtk_module_path is where the modules are installed
+    # https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.24/gtk/gtkmodules.c#L68
+    # gtk_binary_version can be retrived with:
+    # pkg-config --variable=gtk_binary_version gtk+-3.0
+    local f="${prefix:?}/lib/@gtk_module_path@/@gtk_binary_version@/immodules.cache"
+    if [ -f "$f" ]; then
+        sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk2-clean-immodules-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk2-clean-immodules-cache.sh
deleted file mode 100644
index dde991fd27cd..000000000000
--- a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk2-clean-immodules-cache.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-# shellcheck shell=bash
-
-fixupOutputHooks+=(_gtk2CleanComments)
-
-# Clean comments that link to generator of the file
-_gtk2CleanComments() {
-    local f="${prefix:?}/lib/gtk-2.0/2.10.0/immodules.cache"
-    if [ -f "$f" ]; then
-        sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
-    fi
-}
-
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk3-clean-immodules-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk3-clean-immodules-cache.sh
deleted file mode 100644
index d2d5287831a0..000000000000
--- a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk3-clean-immodules-cache.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# shellcheck shell=bash
-
-fixupOutputHooks+=(_gtk3CleanComments)
-
-# Clean comments that link to generator of the file
-_gtk3CleanComments() {
-    local f="${prefix:?}/lib/gtk-3.0/3.0.0/immodules.cache"
-    if [ -f "$f" ]; then
-        sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
-    fi
-}
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh
deleted file mode 100644
index 49f7051aabb6..000000000000
--- a/nixpkgs/pkgs/development/libraries/gtk/hooks/gtk4-clean-immodules-cache.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# shellcheck shell=bash
-
-fixupOutputHooks+=(_gtk4CleanComments)
-
-# Clean comments that link to generator of the file
-_gtk4CleanComments() {
-    local f="${prefix:?}/lib/gtk-4.0/4.0.0/immodules.cache"
-    if [ -f "$f" ]; then
-        sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
-    fi
-}