about summary refs log tree commit diff
path: root/pkgs/development/tools
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/tools
parentaedc95590cdc13e99441684b7aca81cdbfa542ad (diff)
treewide: remove global with lib; statements in pkgs/development
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/ammonite/default.nix6
-rw-r--r--pkgs/development/tools/butane/default.nix4
-rw-r--r--pkgs/development/tools/eclipse-mat/default.nix9
-rw-r--r--pkgs/development/tools/iaca/2.1.nix7
-rw-r--r--pkgs/development/tools/iaca/3.0.nix5
-rw-r--r--pkgs/development/tools/kind/default.nix6
-rw-r--r--pkgs/development/tools/misc/kibana/7.x.nix5
-rw-r--r--pkgs/development/tools/misc/pkg-config/default.nix14
-rw-r--r--pkgs/development/tools/misc/premake/5.nix8
-rw-r--r--pkgs/development/tools/qtcreator/default.nix16
-rw-r--r--pkgs/development/tools/sauce-connect/default.nix6
-rw-r--r--pkgs/development/tools/selenium/htmlunit-driver/default.nix4
-rw-r--r--pkgs/development/tools/selenium/selendroid/default.nix3
-rw-r--r--pkgs/development/tools/selenium/server/default.nix6
-rw-r--r--pkgs/development/tools/summon/default.nix4
15 files changed, 39 insertions, 64 deletions
diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix
index 7d9dbe6f393db..39f69f402b94c 100644
--- a/pkgs/development/tools/ammonite/default.nix
+++ b/pkgs/development/tools/ammonite/default.nix
@@ -1,8 +1,6 @@
 { lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts, git, nixfmt
 , nix, coreutils, gnused, disableRemoteLogging ? true }:
 
-with lib;
-
 let
   repo = "git@github.com:lihaoyi/Ammonite.git";
 
@@ -22,7 +20,7 @@ let
       installPhase = ''
         install -Dm755 $src $out/bin/amm
         sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
-      '' + optionalString (disableRemoteLogging) ''
+      '' + lib.optionalString (disableRemoteLogging) ''
         sed -i "0,/ammonite.Main/{s|ammonite.Main'|ammonite.Main' --no-remote-logging|}" $out/bin/amm
         sed -i '1i #!/bin/sh' $out/bin/amm
       '';
@@ -66,7 +64,7 @@ let
         runHook postInstallCheck
       '';
 
-      meta = {
+      meta = with lib; {
         description = "Improved Scala REPL";
         longDescription = ''
           The Ammonite-REPL is an improved Scala REPL, re-implemented from first principles.
diff --git a/pkgs/development/tools/butane/default.nix b/pkgs/development/tools/butane/default.nix
index d3d0b4293acf0..22ce9a40f913e 100644
--- a/pkgs/development/tools/butane/default.nix
+++ b/pkgs/development/tools/butane/default.nix
@@ -1,7 +1,5 @@
 { lib, fetchFromGitHub, buildGoModule }:
 
-with lib;
-
 buildGoModule rec {
   pname = "butane";
   version = "0.17.0";
@@ -27,7 +25,7 @@ buildGoModule rec {
     mv $out/bin/{internal,butane}
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Translates human-readable Butane configs into machine-readable Ignition configs";
     license = licenses.asl20;
     homepage = "https://github.com/coreos/butane";
diff --git a/pkgs/development/tools/eclipse-mat/default.nix b/pkgs/development/tools/eclipse-mat/default.nix
index f433c54ad5245..4a8f8bf2ac93d 100644
--- a/pkgs/development/tools/eclipse-mat/default.nix
+++ b/pkgs/development/tools/eclipse-mat/default.nix
@@ -18,13 +18,12 @@
 , zlib
 }:
 
-with lib;
 let
   pVersion = "1.13.0.20220615";
-  pVersionTriple = splitVersion pVersion;
-  majorVersion = elemAt pVersionTriple 0;
-  minorVersion = elemAt pVersionTriple 1;
-  patchVersion = elemAt pVersionTriple 2;
+  pVersionTriple = lib.splitVersion pVersion;
+  majorVersion = lib.elemAt pVersionTriple 0;
+  minorVersion = lib.elemAt pVersionTriple 1;
+  patchVersion = lib.elemAt pVersionTriple 2;
   baseVersion = "${majorVersion}.${minorVersion}.${patchVersion}";
   jdk = jdk11;
 in
diff --git a/pkgs/development/tools/iaca/2.1.nix b/pkgs/development/tools/iaca/2.1.nix
index 6695716aa67f9..584b8856e89fc 100644
--- a/pkgs/development/tools/iaca/2.1.nix
+++ b/pkgs/development/tools/iaca/2.1.nix
@@ -1,5 +1,4 @@
 { lib, stdenv, makeWrapper, requireFile, gcc, unzip }:
-with lib;
 
 # v2.1: last version with NHM/WSM arch support
 stdenv.mkDerivation rec {
@@ -17,17 +16,17 @@ stdenv.mkDerivation rec {
     cp bin/iaca $out/bin/
     cp lib/* $out/lib
   '';
-  preFixup = let libPath = makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
+  preFixup = let libPath = lib.makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
     patchelf \
         --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 \
         --set-rpath $out/lib:"${libPath}" \
         $out/bin/iaca
   '';
   postFixup = "wrapProgram $out/bin/iaca --set LD_LIBRARY_PATH $out/lib";
-  meta = {
+  meta = with lib; {
     description = "Intel Architecture Code Analyzer";
     homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
-    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     license = licenses.unfree;
     platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ kazcw ];
diff --git a/pkgs/development/tools/iaca/3.0.nix b/pkgs/development/tools/iaca/3.0.nix
index b5ad92cc08219..1c0a4f5460fd5 100644
--- a/pkgs/development/tools/iaca/3.0.nix
+++ b/pkgs/development/tools/iaca/3.0.nix
@@ -1,5 +1,4 @@
 { lib, stdenv, requireFile, unzip }:
-with lib;
 
 stdenv.mkDerivation rec {
   pname = "iaca";
@@ -15,10 +14,10 @@ stdenv.mkDerivation rec {
     cp iaca $out/bin
     patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
   '';
-  meta = {
+  meta = with lib; {
     description = "Intel Architecture Code Analyzer";
     homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
-    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     license = licenses.unfree;
     platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ kazcw ];
diff --git a/pkgs/development/tools/kind/default.nix b/pkgs/development/tools/kind/default.nix
index 15cf9c30322d0..8c40281cbde99 100644
--- a/pkgs/development/tools/kind/default.nix
+++ b/pkgs/development/tools/kind/default.nix
@@ -1,7 +1,5 @@
 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
 
-with lib;
-
 buildGoModule rec {
   pname = "kind";
   version = "0.17.0";
@@ -36,11 +34,11 @@ buildGoModule rec {
     done
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Kubernetes IN Docker - local clusters for testing Kubernetes";
     homepage    = "https://github.com/kubernetes-sigs/kind";
     maintainers = with maintainers; [ offline rawkode ];
-    license     = lib.licenses.asl20;
+    license     = licenses.asl20;
     platforms   = platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/misc/kibana/7.x.nix b/pkgs/development/tools/misc/kibana/7.x.nix
index 3798da7af7b2e..fa58d1fbbf423 100644
--- a/pkgs/development/tools/misc/kibana/7.x.nix
+++ b/pkgs/development/tools/misc/kibana/7.x.nix
@@ -9,11 +9,10 @@
 , which
 }:
 
-with lib;
 let
   nodejs = nodejs-16_x;
   inherit (builtins) elemAt;
-  info = splitString "-" stdenv.hostPlatform.system;
+  info = lib.splitString "-" stdenv.hostPlatform.system;
   arch = elemAt info 0;
   plat = elemAt info 1;
   shas =
@@ -50,7 +49,7 @@ in stdenv.mkDerivation rec {
     sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Visualize logs and time-stamped data";
     homepage = "http://www.elasticsearch.org/overview/kibana";
     license = licenses.elastic;
diff --git a/pkgs/development/tools/misc/pkg-config/default.nix b/pkgs/development/tools/misc/pkg-config/default.nix
index f2721ab952c64..9e14815910edd 100644
--- a/pkgs/development/tools/misc/pkg-config/default.nix
+++ b/pkgs/development/tools/misc/pkg-config/default.nix
@@ -1,7 +1,5 @@
 { lib, stdenv, fetchurl, libiconv, vanilla ? false }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "pkg-config";
   version = "0.29.2";
@@ -17,20 +15,20 @@ stdenv.mkDerivation rec {
   # Process Requires.private properly, see
   # http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to
   # https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28
-  patches = optional (!vanilla) ./requires-private.patch
-    ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
+  patches = lib.optional (!vanilla) ./requires-private.patch
+    ++ lib.optional stdenv.isCygwin ./2.36.3-not-win32.patch;
 
   # These three tests fail due to a (desired) behavior change from our ./requires-private.patch
   postPatch = if vanilla then null else ''
     rm -f check/check-requires-private check/check-gtk check/missing
   '';
 
-  buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
+  buildInputs = lib.optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
 
   configureFlags = [ "--with-internal-glib" ]
-    ++ optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
+    ++ lib.optionals (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
        # Can't run these tests while cross-compiling
-    ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)
+    ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
        [ "glib_cv_stack_grows=no"
          "glib_cv_uscore=no"
          "ac_cv_func_posix_getpwuid_r=yes"
@@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
 
   postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
 
-  meta = {
+  meta = with lib; {
     description = "A tool that allows packages to find out information about other packages";
     homepage = "http://pkg-config.freedesktop.org/wiki/";
     platforms = platforms.all;
diff --git a/pkgs/development/tools/misc/premake/5.nix b/pkgs/development/tools/misc/premake/5.nix
index 3c7dc14327eac..8fefb65e79be3 100644
--- a/pkgs/development/tools/misc/premake/5.nix
+++ b/pkgs/development/tools/misc/premake/5.nix
@@ -1,7 +1,5 @@
 { lib, stdenv, fetchFromGitHub, libuuid, cacert, Foundation, readline }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "premake5";
   version = "5.0.0-beta2";
@@ -13,13 +11,13 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-2R5gq4jaQsp8Ny1oGuIYkef0kn2UG9jMf20vq0714oY=";
   };
 
-  buildInputs = [ libuuid ] ++ optionals stdenv.isDarwin [ Foundation readline ];
+  buildInputs = [ libuuid ] ++ lib.optionals stdenv.isDarwin [ Foundation readline ];
 
   patches = [ ./no-curl-ca.patch ];
   patchPhase = ''
     substituteInPlace contrib/curl/premake5.lua \
       --replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'"
-  '' + optionalString stdenv.isDarwin ''
+  '' + lib.optionalString stdenv.isDarwin ''
     substituteInPlace premake5.lua \
       --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5
   '';
@@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
     homepage = "https://premake.github.io";
     description = "A simple build configuration and project generation tool using lua";
     license = lib.licenses.bsd3;
-    platforms = platforms.darwin ++ platforms.linux;
+    platforms = lib.platforms.darwin ++ lib.platforms.linux;
     broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix
index cc1baad2bb0ef..5072bb88f4b6d 100644
--- a/pkgs/development/tools/qtcreator/default.nix
+++ b/pkgs/development/tools/qtcreator/default.nix
@@ -3,8 +3,6 @@
 , withDocumentation ? false, withClangPlugins ? true
 }:
 
-with lib;
-
 let
   # Fetch clang from qt vendor, this contains submodules like this:
   # clang<-clang-tools-extra<-clazy.
@@ -31,7 +29,7 @@ mkDerivation rec {
   };
 
   buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative elfutils.dev ] ++
-    optionals withClangPlugins [ llvmPackages_8.libclang
+    lib.optionals withClangPlugins [ llvmPackages_8.libclang
                                  clang_qt_vendor
                                  llvmPackages_8.llvm ];
 
@@ -47,9 +45,9 @@ mkDerivation rec {
 
   doCheck = true;
 
-  buildFlags = optional withDocumentation "docs";
+  buildFlags = lib.optional withDocumentation "docs";
 
-  installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
+  installFlags = [ "INSTALL_ROOT=$(out)" ] ++ lib.optional withDocumentation "install_docs";
 
   qtWrapperArgs = [ "--set-default PERFPROFILER_PARSER_FILEPATH ${lib.getBin perf}/bin" ];
 
@@ -58,7 +56,7 @@ mkDerivation rec {
       --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
     substituteInPlace src/libs/libs.pro \
       --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
-    '' + optionalString withClangPlugins ''
+    '' + lib.optionalString withClangPlugins ''
     # Fix paths for llvm/clang includes directories.
     substituteInPlace src/shared/clang/clang_defines.pri \
       --replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
@@ -72,8 +70,8 @@ mkDerivation rec {
       --replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," "    LLVM_CXXFLAGS += -fno-rtti"]}'
   '';
 
-  preBuild = optionalString withDocumentation ''
-    ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
+  preBuild = lib.optionalString withDocumentation ''
+    ln -s ${lib.getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
   '';
 
   postInstall = ''
@@ -92,7 +90,7 @@ mkDerivation rec {
     '';
     homepage = "https://wiki.qt.io/Category:Tools::QtCreator";
     license = "LGPL";
-    maintainers = [ maintainers.akaWolf ];
+    maintainers = [ lib.maintainers.akaWolf ];
     platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
   };
 }
diff --git a/pkgs/development/tools/sauce-connect/default.nix b/pkgs/development/tools/sauce-connect/default.nix
index ab75664f5a4b4..69a532ccb5c0b 100644
--- a/pkgs/development/tools/sauce-connect/default.nix
+++ b/pkgs/development/tools/sauce-connect/default.nix
@@ -1,7 +1,5 @@
 { stdenv, lib, fetchurl, zlib, unzip }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "sauce-connect";
   version = "4.5.4";
@@ -24,7 +22,7 @@ stdenv.mkDerivation rec {
   patchPhase = lib.optionalString stdenv.isLinux ''
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "$out/lib:${makeLibraryPath [zlib]}" \
+      --set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \
       bin/sc
   '';
 
@@ -35,7 +33,7 @@ stdenv.mkDerivation rec {
 
   dontStrip = true;
 
-  meta = {
+  meta = with lib; {
     description = "A secure tunneling app for executing tests securely when testing behind firewalls";
     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
     license = licenses.unfree;
diff --git a/pkgs/development/tools/selenium/htmlunit-driver/default.nix b/pkgs/development/tools/selenium/htmlunit-driver/default.nix
index ac684f081f4a8..dcea17d807d92 100644
--- a/pkgs/development/tools/selenium/htmlunit-driver/default.nix
+++ b/pkgs/development/tools/selenium/htmlunit-driver/default.nix
@@ -1,7 +1,5 @@
 { lib, stdenv, fetchurl }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "htmlunit-driver-standalone";
   version = "2.27";
@@ -15,7 +13,7 @@ stdenv.mkDerivation rec {
 
   installPhase = "install -D $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar";
 
-  meta = {
+  meta = with lib; {
     homepage = "https://github.com/SeleniumHQ/htmlunit-driver";
     description = "A WebDriver server for running Selenium tests on the HtmlUnit headless browser";
     maintainers = with maintainers; [ coconnor offline ];
diff --git a/pkgs/development/tools/selenium/selendroid/default.nix b/pkgs/development/tools/selenium/selendroid/default.nix
index d18ca0012d808..66a9b97d0db90 100644
--- a/pkgs/development/tools/selenium/selendroid/default.nix
+++ b/pkgs/development/tools/selenium/selendroid/default.nix
@@ -1,6 +1,5 @@
 { lib, stdenv, fetchurl, makeWrapper, jdk, selenium-server-standalone }:
 
-with lib;
 let
     pname = "selendroid-standalone";
     pluginName = "selendroid-grid-plugin-${version}";
@@ -39,7 +38,7 @@ stdenv.mkDerivation {
       --add-flags "-capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher"
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "http://selendroid.io/";
     description = "Test automation for native or hybrid Android apps and the mobile web";
     maintainers = with maintainers; [ offline ];
diff --git a/pkgs/development/tools/selenium/server/default.nix b/pkgs/development/tools/selenium/server/default.nix
index 56ff4f3ad3e53..b1cc26bec519c 100644
--- a/pkgs/development/tools/selenium/server/default.nix
+++ b/pkgs/development/tools/selenium/server/default.nix
@@ -1,8 +1,6 @@
 { lib, stdenv, fetchurl, makeWrapper, jre
 , htmlunit-driver, chromedriver, chromeSupport ? true }:
 
-with lib;
-
 let
   minorVersion = "3.141";
   patchVersion = "59";
@@ -26,11 +24,11 @@ in stdenv.mkDerivation rec {
     cp $src $out/share/lib/${pname}-${version}/${pname}-${version}.jar
     makeWrapper ${jre}/bin/java $out/bin/selenium-server \
       --add-flags "-cp $out/share/lib/${pname}-${version}/${pname}-${version}.jar:${htmlunit-driver}/share/lib/${htmlunit-driver.name}/${htmlunit-driver.name}.jar" \
-      ${optionalString chromeSupport "--add-flags -Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
+      ${lib.optionalString chromeSupport "--add-flags -Dwebdriver.chrome.driver=${chromedriver}/bin/chromedriver"} \
       --add-flags "org.openqa.grid.selenium.GridLauncherV3"
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "http://www.seleniumhq.org/";
     description = "Selenium Server for remote WebDriver";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
diff --git a/pkgs/development/tools/summon/default.nix b/pkgs/development/tools/summon/default.nix
index 2ed17061c2198..ab618253e7b15 100644
--- a/pkgs/development/tools/summon/default.nix
+++ b/pkgs/development/tools/summon/default.nix
@@ -1,7 +1,5 @@
 { buildGoModule, fetchFromGitHub, lib, patchResolver ? true }:
 
-with lib;
-
 buildGoModule rec {
   pname = "summon";
   version = "0.8.2";
@@ -19,7 +17,7 @@ buildGoModule rec {
 
   # Patches provider resolver to support resolving unqualified names
   # from $PATH, e.g. `summon -p gopass` instead of `summon -p $(which gopass)`
-  patches = optionals patchResolver [ ./resolve-paths.patch ];
+  patches = lib.optionals patchResolver [ ./resolve-paths.patch ];
 
   postInstall = ''
     mv $out/bin/cmd $out/bin/summon