summary refs log tree commit diff
path: root/pkgs/development/libraries/gtk+/3.x.nix
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-06-25 16:05:17 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-07-17 10:45:06 +0200
commita7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d (patch)
treeb6d36d19ad592e88465a3a810c5afc0c60f35829 /pkgs/development/libraries/gtk+/3.x.nix
parentdb0655886d1686c9f60c747fc353ff199d083592 (diff)
downloadnixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar.gz
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar.bz2
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar.lz
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar.xz
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.tar.zst
nixpkgs-a7edafd0d372ea3f9ae7cadfcd098adac8ab1a4d.zip
gtk3: cleanup expression
Diffstat (limited to 'pkgs/development/libraries/gtk+/3.x.nix')
-rw-r--r--pkgs/development/libraries/gtk+/3.x.nix112
1 files changed, 81 insertions, 31 deletions
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index 378f3904d5d..52d792b966b 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -1,33 +1,57 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl, makeWrapper, shared-mime-info, isocodes
-, expat, glib, cairo, pango, gdk_pixbuf, atk, at-spi2-atk, gobject-introspection, fribidi
-, xorg, epoxy, json-glib, libxkbcommon, gmp, gnome3, autoreconfHook, gsettings-desktop-schemas
+{ stdenv
+, fetchurl
+, fetchpatch
+, pkgconfig
+, gettext
+, perl
+, makeWrapper
+, shared-mime-info
+, isocodes
+, expat
+, glib
+, cairo
+, pango
+, gdk_pixbuf
+, atk
+, at-spi2-atk
+, gobject-introspection
+, fribidi
+, xorg
+, epoxy
+, json-glib
+, libxkbcommon
+, gmp
+, gnome3
+, autoreconfHook
+, gsettings-desktop-schemas
 , x11Support ? stdenv.isLinux
-, waylandSupport ? stdenv.isLinux, mesa, wayland, wayland-protocols
+, waylandSupport ? stdenv.isLinux
+, mesa
+, wayland
+, wayland-protocols
 , xineramaSupport ? stdenv.isLinux
-, cupsSupport ? stdenv.isLinux, cups ? null
-, AppKit, Cocoa
+, cupsSupport ? stdenv.isLinux
+, cups ? null
+, AppKit
+, Cocoa
 }:
 
 assert cupsSupport -> cups != null;
 
 with stdenv.lib;
 
-let
-  version = "3.24.8";
-in
 stdenv.mkDerivation rec {
-  name = "gtk+3-${version}";
+  pname = "gtk+3";
+  version = "3.24.8";
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
     sha256 = "16f71bbkhwhndcsrpyhjia3b77cb5ksf5c45lyfgws4pkgg64sb6";
   };
 
-  outputs = [ "out" "dev" ];
-  outputBin = "dev";
-
-  nativeBuildInputs = [ pkgconfig gettext gobject-introspection perl makeWrapper autoreconfHook ];
-
   patches = [
     ./3.0-immodules.cache.patch
     (fetchpatch {
@@ -42,23 +66,53 @@ stdenv.mkDerivation rec {
     ./3.0-darwin-x11.patch
   ];
 
-  buildInputs = [ libxkbcommon epoxy json-glib isocodes ]
-    ++ optional stdenv.isDarwin AppKit;
-  propagatedBuildInputs = with xorg; with stdenv.lib;
-    [ expat glib cairo pango gdk_pixbuf atk at-spi2-atk gsettings-desktop-schemas fribidi
-      libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ]
-    ++ optional stdenv.isDarwin Cocoa  # explicitly propagated, always needed
-    ++ optionals waylandSupport [ mesa wayland wayland-protocols ]
-    ++ optional xineramaSupport libXinerama
-    ++ optional cupsSupport cups;
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    gobject-introspection
+    makeWrapper
+    perl
+    pkgconfig
+  ];
+
+  buildInputs = [
+    libxkbcommon
+    epoxy
+    json-glib
+    isocodes
+  ]
+  ++ optional stdenv.isDarwin AppKit
+  ;
+
+  propagatedBuildInputs = with xorg; [
+    at-spi2-atk
+    atk
+    cairo
+    expat
+    fribidi
+    gdk_pixbuf
+    glib
+    gsettings-desktop-schemas
+    libICE
+    libSM
+    libXcomposite
+    libXcursor
+    libXi
+    libXrandr
+    libXrender
+    pango
+  ]
+  ++ optional stdenv.isDarwin Cocoa  # explicitly propagated, always needed
+  ++ optionals waylandSupport [ mesa wayland wayland-protocols ]
+  ++ optional xineramaSupport libXinerama
+  ++ optional cupsSupport cups
+  ;
   #TODO: colord?
 
   ## (2019-06-12) Demos seem to install fine now. Keeping this around in case it fails again.
   ## (2014-03-27) demos fail to install, no idea where's the problem
   #preConfigure = "sed '/^SRC_SUBDIRS /s/demos//' -i Makefile.in";
 
-  enableParallelBuilding = true;
-
   configureFlags = optional stdenv.isDarwin [
     "--disable-debug"
     "--disable-dependency-tracking"
@@ -94,9 +148,8 @@ stdenv.mkDerivation rec {
     };
   };
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "A multi-platform toolkit for creating graphical user interfaces";
-
     longDescription = ''
       GTK+ is a highly usable, feature rich toolkit for creating
       graphical user interfaces which boasts cross platform
@@ -107,11 +160,8 @@ stdenv.mkDerivation rec {
       proprietary software with GTK+ without any license fees or
       royalties.
     '';
-
     homepage = https://www.gtk.org/;
-
     license = licenses.lgpl2Plus;
-
     maintainers = with maintainers; [ raskin vcunat lethalman ];
     platforms = platforms.all;
   };