From a59dda942cbe3d40c1ae424d4d8a6db715cac0d5 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Thu, 26 Jan 2023 18:31:02 +0100 Subject: treewide: remove global with lib; statements in pkgs/development --- pkgs/development/libraries/gtk/2.x.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'pkgs/development/libraries/gtk') 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; -- cgit 1.4.1