diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/libraries/gtk | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gtk')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gtk/2.x.nix | 9 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gtk/3.x.nix | 8 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gtk/4.x.nix | 69 |
3 files changed, 42 insertions, 44 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gtk/2.x.nix b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix index 8f50c922f514..1a7cc57fbeaf 100644 --- a/nixpkgs/pkgs/development/libraries/gtk/2.x.nix +++ b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix @@ -1,15 +1,12 @@ { 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 +, cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups , gdktarget ? if stdenv.isDarwin then "quartz" else "x11" , AppKit, Cocoa , fetchpatch }: -assert xineramaSupport -> xorg.libXinerama != null; -assert cupsSupport -> cups != null; - with lib; let @@ -64,6 +61,10 @@ stdenv.mkDerivation rec { ++ optionals cupsSupport [ cups ] ++ optionals stdenv.isDarwin [ AppKit Cocoa ]; + preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' + MACOSX_DEPLOYMENT_TARGET=10.16 + '' else null; + configureFlags = [ "--with-gdktarget=${gdktarget}" "--with-xinput=yes" diff --git a/nixpkgs/pkgs/development/libraries/gtk/3.x.nix b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix index 0d4bec5f3441..f9b5d5f68b56 100644 --- a/nixpkgs/pkgs/development/libraries/gtk/3.x.nix +++ b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix @@ -29,7 +29,7 @@ , libxkbcommon , libxml2 , gmp -, gnome3 +, gnome , gsettings-desktop-schemas , sassc , trackerSupport ? stdenv.isLinux @@ -42,14 +42,12 @@ , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux , withGtkDoc ? stdenv.isLinux -, cups ? null +, cups , AppKit , Cocoa , broadwaySupport ? true }: -assert cupsSupport -> cups != null; - let gtkCleanImmodulesCache = substituteAll { @@ -208,7 +206,7 @@ stdenv.mkDerivation rec { ''; passthru = { - updateScript = gnome3.updateScript { + updateScript = gnome.updateScript { packageName = "gtk+"; attrPath = "gtk3"; }; diff --git a/nixpkgs/pkgs/development/libraries/gtk/4.x.nix b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix index b64b8bc36fde..8791d24ad361 100644 --- a/nixpkgs/pkgs/development/libraries/gtk/4.x.nix +++ b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix @@ -5,9 +5,7 @@ , pkg-config , gettext , graphene -, docbook-xsl-nons -, docbook_xml_dtd_43 -, gtk-doc +, gi-docgen , meson , ninja , python3 @@ -30,7 +28,7 @@ , libsoup , ffmpeg , gmp -, gnome3 +, gnome , gsettings-desktop-schemas , gst_all_1 , sassc @@ -45,15 +43,12 @@ , wayland-protocols , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux -, withGtkDoc ? stdenv.isLinux -, cups ? null +, cups , AppKit , Cocoa , broadwaySupport ? true }: -assert cupsSupport -> cups != null; - let gtkCleanImmodulesCache = substituteAll { @@ -66,9 +61,9 @@ in stdenv.mkDerivation rec { pname = "gtk4"; - version = "4.0.3"; + version = "4.2.1"; - outputs = [ "out" "dev" ] ++ lib.optional withGtkDoc "devdoc"; + outputs = [ "out" "dev" ] ++ lib.optionals x11Support [ "devdoc" ]; outputBin = "dev"; setupHooks = [ @@ -78,7 +73,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz"; - sha256 = "18mJNyV5C1C9mjuyeIVtnVQ7RLa5uVHXtg573swTGJA="; + sha256 = "AjFpd13kPwof3gZvvBnXhUXqanViwZFavem4rkpzCeY="; }; nativeBuildInputs = [ @@ -90,21 +85,17 @@ stdenv.mkDerivation rec { pkg-config python3 sassc - ] ++ setupHooks ++ lib.optionals withGtkDoc [ - pandoc - docbook_xml_dtd_43 - docbook-xsl-nons - gtk-doc - # For xmllint - libxml2 - ]; + gi-docgen + ] ++ setupHooks; buildInputs = [ libxkbcommon epoxy json-glib isocodes + ] ++ lib.optionals (!stdenv.isDarwin) [ vulkan-headers + ] ++ [ librest libsoup ffmpeg @@ -143,18 +134,27 @@ stdenv.mkDerivation rec { glib graphene pango - vulkan-loader # TODO: Possibly not used on Darwin - + ] ++ lib.optionals (!stdenv.isDarwin) [ + vulkan-loader + ] ++ [ # Required for GSettings schemas at runtime. # Will be picked up by wrapGAppsHook. gsettings-desktop-schemas ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString withGtkDoc}" - "-Dtests=false" - "-Dtracker3=${lib.boolToString trackerSupport}" - "-Dbroadway_backend=${lib.boolToString broadwaySupport}" + # ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found + "-Dgtk_doc=${lib.boolToString x11Support}" + "-Dbuild-tests=false" + "-Dtracker=${if trackerSupport then "enabled" else "disabled"}" + "-Dbroadway-backend=${lib.boolToString broadwaySupport}" + ] ++ lib.optionals (!cupsSupport) [ + "-Dprint-cups=disabled" + ] ++ lib.optionals stdenv.isDarwin [ + "-Dvulkan=disabled" + "-Dmedia-gstreamer=disabled" # requires gstreamer-gl + ] ++ lib.optionals (!x11Support) [ + "-Dx11-backend=false" ]; doCheck = false; # needs X11 @@ -173,20 +173,12 @@ stdenv.mkDerivation rec { gdk/gen-gdk-gresources-xml.py gtk/gen-gtk-gresources-xml.py gtk/gentypefuncs.py - docs/reference/gtk/gtk-markdown-to-docbook ) chmod +x ''${files[@]} patchShebangs ''${files[@]} ''; - postBuild = lib.optionalString withGtkDoc '' - # Meson not building `custom_target`s passed to `custom_files` argument of `gnome.gtkdoc` function - # as part of the `install` target. We have to build the docs manually first. - # https://github.com/mesonbuild/meson/issues/2831 - ninja g{t,d,s}k4-doc - ''; - preInstall = '' OLD_PATH="$PATH" PATH="$PATH:$dev/bin" # so the install script finds gtk4-update-icon-cache @@ -204,6 +196,13 @@ stdenv.mkDerivation rec { for f in $dev/bin/gtk4-encode-symbolic-svg; do wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" done + + '' + lib.optionalString x11Support '' + # So that DevHelp can find this. + # TODO: Remove this with DevHelp 41. + mkdir -p "$devdoc/share/devhelp/books" + mv "$out/share/doc/"* "$devdoc/share/devhelp/books" + rmdir -p --ignore-fail-on-non-empty "$out/share/doc" ''; # Wrap demos @@ -217,7 +216,7 @@ stdenv.mkDerivation rec { ''; passthru = { - updateScript = gnome3.updateScript { + updateScript = gnome.updateScript { packageName = "gtk"; attrPath = "gtk4"; }; @@ -237,7 +236,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://www.gtk.org/"; license = licenses.lgpl2Plus; - maintainers = with maintainers; [ raskin lethalman worldofpeace ]; + maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]); platforms = platforms.all; changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${version}/NEWS"; }; |