about summary refs log tree commit diff
path: root/pkgs/development/libraries/gtk
diff options
context:
space:
mode:
authorShawn8901 <shawn8901@googlemail.com>2023-01-26 18:31:02 +0100
committerShawn8901 <shawn8901@googlemail.com>2023-01-26 18:31:02 +0100
commita59dda942cbe3d40c1ae424d4d8a6db715cac0d5 (patch)
treec4d7e17a260da0a29c9690de071787d3ca62b3d2 /pkgs/development/libraries/gtk
parentaedc95590cdc13e99441684b7aca81cdbfa542ad (diff)
treewide: remove global with lib; statements in pkgs/development
Diffstat (limited to 'pkgs/development/libraries/gtk')
-rw-r--r--pkgs/development/libraries/gtk/2.x.nix18
1 files changed, 8 insertions, 10 deletions
diff --git a/pkgs/development/libraries/gtk/2.x.nix b/pkgs/development/libraries/gtk/2.x.nix
index 3568bbfed4813..23680c9b67571 100644
--- a/pkgs/development/libraries/gtk/2.x.nix
+++ b/pkgs/development/libraries/gtk/2.x.nix
@@ -7,8 +7,6 @@
 , fetchpatch, buildPackages
 }:
 
-with lib;
-
 let
 
   gtkCleanImmodulesCache = substituteAll {
@@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
   patches = [
     ./patches/2.0-immodules.cache.patch
     ./patches/gtk2-theme-paths.patch
-  ] ++ optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.isDarwin [
     (fetchpatch {
       url = "https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776";
       sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
@@ -54,13 +52,13 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = with xorg;
     [ glib cairo pango gdk-pixbuf atk ]
-    ++ optionals (stdenv.isLinux || stdenv.isDarwin) [
+    ++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [
          libXrandr libXrender libXcomposite libXi libXcursor
        ]
-    ++ optionals stdenv.isDarwin [ libXdamage ]
-    ++ optional xineramaSupport libXinerama
-    ++ optionals cupsSupport [ cups ]
-    ++ optionals stdenv.isDarwin [ AppKit Cocoa ];
+    ++ lib.optionals stdenv.isDarwin [ libXdamage ]
+    ++ lib.optional xineramaSupport libXinerama
+    ++ lib.optionals cupsSupport [ cups ]
+    ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa ];
 
   preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
     MACOSX_DEPLOYMENT_TARGET=10.16
@@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-gdktarget=${gdktarget}"
     "--with-xinput=yes"
-  ] ++ optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.isDarwin [
     "--disable-glibtest"
     "--disable-introspection"
     "--disable-visibility"
@@ -94,7 +92,7 @@ stdenv.mkDerivation rec {
     inherit gdktarget;
   };
 
-  meta = {
+  meta = with lib; {
     description = "A multi-platform toolkit for creating graphical user interfaces";
     homepage    = "https://www.gtk.org/";
     license     = licenses.lgpl2Plus;