summary refs log tree commit diff
path: root/pkgs/applications/science/logic
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-01-15 20:21:58 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-01-16 17:58:11 +0700
commitbadf51221db8fae81bf9948c39eaf8342dfd5597 (patch)
tree34eeb35ca97f0b081da465e9ddd6c120a9d2b7df /pkgs/applications/science/logic
parenta9bb54359eeedf2594fdf191de5b673fd1dd102d (diff)
downloadnixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.gz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.bz2
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.lz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.xz
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.tar.zst
nixpkgs-badf51221db8fae81bf9948c39eaf8342dfd5597.zip
treewide: stdenv.lib -> lib
Diffstat (limited to 'pkgs/applications/science/logic')
-rw-r--r--pkgs/applications/science/logic/abella/default.nix8
-rw-r--r--pkgs/applications/science/logic/aiger/default.nix8
-rw-r--r--pkgs/applications/science/logic/avy/default.nix10
-rw-r--r--pkgs/applications/science/logic/boolector/default.nix4
-rw-r--r--pkgs/applications/science/logic/btor2tools/default.nix2
-rw-r--r--pkgs/applications/science/logic/coq/default.nix2
-rw-r--r--pkgs/applications/science/logic/cryptoverif/default.nix8
-rw-r--r--pkgs/applications/science/logic/ekrhyper/default.nix8
-rw-r--r--pkgs/applications/science/logic/gappa/default.nix8
-rw-r--r--pkgs/applications/science/logic/isabelle/default.nix2
-rw-r--r--pkgs/applications/science/logic/jonprl/default.nix8
-rw-r--r--pkgs/applications/science/logic/lci/default.nix8
-rw-r--r--pkgs/applications/science/logic/lean/default.nix2
-rw-r--r--pkgs/applications/science/logic/leo3/binary.nix8
-rw-r--r--pkgs/applications/science/logic/logisim/default.nix12
-rw-r--r--pkgs/applications/science/logic/ltl2ba/default.nix8
-rw-r--r--pkgs/applications/science/logic/mcy/default.nix8
-rw-r--r--pkgs/applications/science/logic/monosat/default.nix4
-rw-r--r--pkgs/applications/science/logic/ott/default.nix8
-rw-r--r--pkgs/applications/science/logic/otter/default.nix10
-rw-r--r--pkgs/applications/science/logic/petrinizer/default.nix6
-rw-r--r--pkgs/applications/science/logic/petrinizer/sbv-7.13.nix4
-rw-r--r--pkgs/applications/science/logic/petrinizer/z3.nix4
-rw-r--r--pkgs/applications/science/logic/picosat/default.nix10
-rw-r--r--pkgs/applications/science/logic/potassco/clingcon.nix6
-rw-r--r--pkgs/applications/science/logic/potassco/clingo.nix8
-rw-r--r--pkgs/applications/science/logic/prover9/default.nix4
-rw-r--r--pkgs/applications/science/logic/proverif/default.nix8
-rw-r--r--pkgs/applications/science/logic/redprl/default.nix8
-rw-r--r--pkgs/applications/science/logic/sad/default.nix6
-rw-r--r--pkgs/applications/science/logic/satallax/default.nix12
-rw-r--r--pkgs/applications/science/logic/saw-tools/default.nix10
-rw-r--r--pkgs/applications/science/logic/statverif/default.nix8
-rw-r--r--pkgs/applications/science/logic/symbiyosys/default.nix8
-rw-r--r--pkgs/applications/science/logic/tlaplus/default.nix8
-rw-r--r--pkgs/applications/science/logic/tlaplus/tlaps.nix6
-rw-r--r--pkgs/applications/science/logic/tlaplus/toolbox.nix2
-rw-r--r--pkgs/applications/science/logic/twelf/default.nix8
-rw-r--r--pkgs/applications/science/logic/verifast/default.nix8
-rw-r--r--pkgs/applications/science/logic/workcraft/default.nix8
-rw-r--r--pkgs/applications/science/logic/yices/default.nix2
-rw-r--r--pkgs/applications/science/logic/z3/4.4.0.nix8
-rw-r--r--pkgs/applications/science/logic/z3/default.nix10
-rw-r--r--pkgs/applications/science/logic/z3/tptp.nix4
44 files changed, 151 insertions, 151 deletions
diff --git a/pkgs/applications/science/logic/abella/default.nix b/pkgs/applications/science/logic/abella/default.nix
index 3d9a2e9bd67..14ceb53f9bb 100644
--- a/pkgs/applications/science/logic/abella/default.nix
+++ b/pkgs/applications/science/logic/abella/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, rsync, ocamlPackages }:
+{ lib, stdenv, fetchurl, rsync, ocamlPackages }:
 
 stdenv.mkDerivation rec {
   pname = "abella";
@@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
       objects with binding.
     '';
     homepage = "http://abella-prover.org/";
-    license = stdenv.lib.licenses.gpl3;
-    maintainers = with stdenv.lib.maintainers; [ bcdarwin ciil ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ bcdarwin ciil ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/aiger/default.nix b/pkgs/applications/science/logic/aiger/default.nix
index aa5a59ed298..15c45466b13 100644
--- a/pkgs/applications/science/logic/aiger/default.nix
+++ b/pkgs/applications/science/logic/aiger/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, picosat }:
+{ lib, stdenv, fetchurl, picosat }:
 
 stdenv.mkDerivation rec {
   pname = "aiger";
@@ -48,8 +48,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "And-Inverter Graph (AIG) utilities";
     homepage    = "http://fmv.jku.at/aiger/";
-    license     = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
-    platforms   = stdenv.lib.platforms.unix;
+    license     = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ thoughtpolice ];
+    platforms   = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/avy/default.nix b/pkgs/applications/science/logic/avy/default.nix
index 6f8120c7b8e..fe2f30a55a3 100644
--- a/pkgs/applications/science/logic/avy/default.nix
+++ b/pkgs/applications/science/logic/avy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, cmake, zlib, boost }:
+{ lib, stdenv, fetchgit, cmake, zlib, boost }:
 
 stdenv.mkDerivation rec {
   pname = "avy";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ zlib boost.out boost.dev ];
   NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ]
     # Squelch endless stream of warnings on same few things
-    ++ stdenv.lib.optionals stdenv.cc.isClang [
+    ++ lib.optionals stdenv.cc.isClang [
       "-Wno-empty-body"
       "-Wno-tautological-compare"
       "-Wc++11-compat-deprecated-writable-strings"
@@ -40,9 +40,9 @@ stdenv.mkDerivation rec {
   meta = {
     description = "AIGER model checking for Property Directed Reachability";
     homepage    = "https://arieg.bitbucket.io/avy/";
-    license     = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
-    platforms   = stdenv.lib.platforms.linux;
+    license     = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ thoughtpolice ];
+    platforms   = lib.platforms.linux;
     # See pkgs/applications/science/logic/glucose/default.nix
     # (The error is different due to glucose-fenv.patch, but the same)
     badPlatforms = [ "aarch64-linux" ];
diff --git a/pkgs/applications/science/logic/boolector/default.nix b/pkgs/applications/science/logic/boolector/default.nix
index 2898ce4e1f6..6916379bdea 100644
--- a/pkgs/applications/science/logic/boolector/default.nix
+++ b/pkgs/applications/science/logic/boolector/default.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
     in
       # tests modelgen and modelgensmt2 spawn boolector in another processes and
       # macOS strips DYLD_LIBRARY_PATH, hardcode it for testing
-      stdenv.lib.optionalString stdenv.isDarwin ''
+      lib.optionalString stdenv.isDarwin ''
         cp -r bin bin.back
         install_name_tool -change libboolector.dylib $(pwd)/lib/libboolector.dylib bin/boolector
       '' + ''
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
         patchShebangs ..
       '';
 
-  postCheck = stdenv.lib.optionalString stdenv.isDarwin ''
+  postCheck = lib.optionalString stdenv.isDarwin ''
     rm -rf bin
     mv bin.back bin
   '';
diff --git a/pkgs/applications/science/logic/btor2tools/default.nix b/pkgs/applications/science/logic/btor2tools/default.nix
index 355274d1e1c..992d8b1de58 100644
--- a/pkgs/applications/science/logic/btor2tools/default.nix
+++ b/pkgs/applications/science/logic/btor2tools/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0mfqmkgvyw8fa2c09kww107dmk180ch1hp98r5kv41vnc04iqb0s";
   };
 
-  nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+  nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
   installPhase = ''
     mkdir -p $out $dev/include/btor2parser/ $lib/lib
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index fae17a5e09f..54842dd4769 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -49,7 +49,7 @@ let
     args.version;
   version = fetched.version;
   coq-version = args.coq-version or (if version != "dev" then versions.majorMinor version else "dev");
-  versionAtLeast = v: (coq-version == "dev") || (stdenv.lib.versionAtLeast coq-version v);
+  versionAtLeast = v: (coq-version == "dev") || (lib.versionAtLeast coq-version v);
   ideFlags = optionalString (buildIde && !versionAtLeast "8.10")
     "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt";
   csdpPatch = if csdp != null then ''
diff --git a/pkgs/applications/science/logic/cryptoverif/default.nix b/pkgs/applications/science/logic/cryptoverif/default.nix
index 78861786def..4c9ce3e9595 100644
--- a/pkgs/applications/science/logic/cryptoverif/default.nix
+++ b/pkgs/applications/science/logic/cryptoverif/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml }:
+{ lib, stdenv, fetchurl, ocaml }:
 
 stdenv.mkDerivation rec {
   pname = "cryptoverif";
@@ -30,8 +30,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Cryptographic protocol verifier in the computational model";
     homepage    = "https://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/";
-    license     = stdenv.lib.licenses.cecill-b;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.cecill-b;
+    platforms   = lib.platforms.unix;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/ekrhyper/default.nix b/pkgs/applications/science/logic/ekrhyper/default.nix
index e1eb9a2dcc3..38cc0f06088 100644
--- a/pkgs/applications/science/logic/ekrhyper/default.nix
+++ b/pkgs/applications/science/logic/ekrhyper/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, perl}:
+{lib, stdenv, fetchurl, ocaml, perl}:
 let
   s = # Generated upstream information
   rec {
@@ -25,8 +25,8 @@ stdenv.mkDerivation {
   meta = {
     inherit (s) version;
     description = "Automated first-order theorem prover";
-    license = stdenv.lib.licenses.gpl2 ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl2 ;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/science/logic/gappa/default.nix b/pkgs/applications/science/logic/gappa/default.nix
index 2ca1bcd3098..73f34f60fc4 100644
--- a/pkgs/applications/science/logic/gappa/default.nix
+++ b/pkgs/applications/science/logic/gappa/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gmp, mpfr, boost }:
+{ lib, stdenv, fetchurl, gmp, mpfr, boost }:
 
 stdenv.mkDerivation {
   name = "gappa-1.3.5";
@@ -16,8 +16,8 @@ stdenv.mkDerivation {
   meta = {
     homepage = "http://gappa.gforge.inria.fr/";
     description = "Verifying and formally proving properties on numerical programs dealing with floating-point or fixed-point arithmetic";
-    license = with stdenv.lib.licenses; [ cecill20 gpl2 ];
-    maintainers = with stdenv.lib.maintainers; [ vbgl ];
-    platforms = stdenv.lib.platforms.all;
+    license = with lib.licenses; [ cecill20 gpl2 ];
+    maintainers = with lib.maintainers; [ vbgl ];
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix
index 9472d4b9b29..6c22c949483 100644
--- a/pkgs/applications/science/logic/isabelle/default.nix
+++ b/pkgs/applications/science/logic/isabelle/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     };
 
   buildInputs = [ perl polyml z3 ]
-             ++ stdenv.lib.optionals (!stdenv.isDarwin) [ nettools java ];
+             ++ lib.optionals (!stdenv.isDarwin) [ nettools java ];
 
   sourceRoot = dirname;
 
diff --git a/pkgs/applications/science/logic/jonprl/default.nix b/pkgs/applications/science/logic/jonprl/default.nix
index 3ee05a478bc..379a9a48354 100644
--- a/pkgs/applications/science/logic/jonprl/default.nix
+++ b/pkgs/applications/science/logic/jonprl/default.nix
@@ -1,4 +1,4 @@
-{ fetchgit, stdenv, smlnj, which }:
+{ fetchgit, lib, stdenv, smlnj, which }:
 
 stdenv.mkDerivation rec {
   pname = "jonprl";
@@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
       Inspired by Nuprl
     '';
     homepage = "https://github.com/jonsterling/JonPRL";
-    license = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ puffnfresh ];
+    platforms = lib.platforms.linux;
     broken = true;
   };
 }
diff --git a/pkgs/applications/science/logic/lci/default.nix b/pkgs/applications/science/logic/lci/default.nix
index 4775384a3dd..a0897135fbb 100644
--- a/pkgs/applications/science/logic/lci/default.nix
+++ b/pkgs/applications/science/logic/lci/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, readline}: 
+{lib, stdenv, fetchurl, readline}:
 stdenv.mkDerivation rec {
   version = "0.6";
   pname = "lci";
@@ -9,8 +9,8 @@ stdenv.mkDerivation rec {
   buildInputs = [readline];
   meta = {
     description = ''Lambda calculus interpreter'';
-    maintainers = with stdenv.lib.maintainers; [raskin];
-    platforms = with stdenv.lib.platforms; linux;
-    license = stdenv.lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [raskin];
+    platforms = with lib.platforms; linux;
+    license = lib.licenses.gpl3;
   };
 }
diff --git a/pkgs/applications/science/logic/lean/default.nix b/pkgs/applications/science/logic/lean/default.nix
index 5bf33a8a359..53423549a72 100644
--- a/pkgs/applications/science/logic/lean/default.nix
+++ b/pkgs/applications/science/logic/lean/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   postPatch = "patchShebangs .";
 
-  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+  postInstall = lib.optionalString stdenv.isDarwin ''
     substituteInPlace $out/bin/leanpkg \
       --replace "greadlink" "${coreutils}/bin/readlink"
   '';
diff --git a/pkgs/applications/science/logic/leo3/binary.nix b/pkgs/applications/science/logic/leo3/binary.nix
index 29a9adf94c4..dda18c49b72 100644
--- a/pkgs/applications/science/logic/leo3/binary.nix
+++ b/pkgs/applications/science/logic/leo3/binary.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, openjdk, runtimeShell}:
+{lib, stdenv, fetchurl, openjdk, runtimeShell}:
 stdenv.mkDerivation rec {
   pname = "leo3";
   version = "1.2";
@@ -21,9 +21,9 @@ stdenv.mkDerivation rec {
   meta = {
     inherit version;
     description = "An automated theorem prover for classical higher-order logic with choice";
-    license = stdenv.lib.licenses.bsd3;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.bsd3;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
     homepage = "https://page.mi.fu-berlin.de/lex/leo3/";
   };
 }
diff --git a/pkgs/applications/science/logic/logisim/default.nix b/pkgs/applications/science/logic/logisim/default.nix
index ce86b252311..1ca22cf769c 100644
--- a/pkgs/applications/science/logic/logisim/default.nix
+++ b/pkgs/applications/science/logic/logisim/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, jre, makeWrapper }:
+{ lib, stdenv, fetchurl, jre, makeWrapper }:
 
 let version = "2.7.1"; in
 
 stdenv.mkDerivation {
   pname = "logisim";
   inherit version;
-  
+
   src = fetchurl {
     url = "mirror://sourceforge/project/circuit/2.7.x/${version}/logisim-generic-${version}.jar";
     sha256 = "1hkvc9zc7qmvjbl9579p84hw3n8wl3275246xlzj136i5b0phain";
   };
-  
+
   phases = [ "installPhase" ];
 
   nativeBuildInputs = [makeWrapper];
@@ -19,11 +19,11 @@ stdenv.mkDerivation {
     mkdir -pv $out/bin
     makeWrapper ${jre}/bin/java $out/bin/logisim --add-flags "-jar $src"
   '';
-  
+
   meta = {
     homepage = "http://ozark.hendrix.edu/~burch/logisim";
     description = "Educational tool for designing and simulating digital logic circuits";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/ltl2ba/default.nix b/pkgs/applications/science/logic/ltl2ba/default.nix
index b5d13db3b9a..30c13c6036f 100644
--- a/pkgs/applications/science/logic/ltl2ba/default.nix
+++ b/pkgs/applications/science/logic/ltl2ba/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv }:
+{ fetchurl, lib, stdenv }:
 
 stdenv.mkDerivation rec {
   pname = "ltl2ba";
@@ -24,8 +24,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Fast translation from LTL formulae to Buchi automata";
     homepage    = "http://www.lsv.ens-cachan.fr/~gastin/ltl2ba";
-    license     = stdenv.lib.licenses.gpl2Plus;
-    platforms   = stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.gpl2Plus;
+    platforms   = lib.platforms.darwin ++ lib.platforms.linux;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/mcy/default.nix b/pkgs/applications/science/logic/mcy/default.nix
index eba910e07eb..dc1094f3e27 100644
--- a/pkgs/applications/science/logic/mcy/default.nix
+++ b/pkgs/applications/science/logic/mcy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ lib, stdenv, fetchFromGitHub
 , yosys, symbiyosys, python3
 }:
 
@@ -44,8 +44,8 @@ stdenv.mkDerivation {
   meta = {
     description = "Mutation-based coverage testing for hardware designs, with Yosys";
     homepage    = "https://github.com/YosysHQ/mcy";
-    license     = stdenv.lib.licenses.isc;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
-    platforms   = stdenv.lib.platforms.all;
+    license     = lib.licenses.isc;
+    maintainers = with lib.maintainers; [ thoughtpolice ];
+    platforms   = lib.platforms.all;
   };
 }
diff --git a/pkgs/applications/science/logic/monosat/default.nix b/pkgs/applications/science/logic/monosat/default.nix
index 19fba6e2993..259cdcea443 100644
--- a/pkgs/applications/science/logic/monosat/default.nix
+++ b/pkgs/applications/science/logic/monosat/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchpatch, fetchFromGitHub, cmake, zlib, gmp, jdk8,
+{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, zlib, gmp, jdk8,
   # The JDK we use on Darwin currenly makes extensive use of rpaths which are
   # annoying and break the python library, so let's not bother for now
   includeJava ? !stdenv.hostPlatform.isDarwin, includeGplCode ? true }:
 
-with stdenv.lib;
+with lib;
 
 let
   boolToCmake = x: if x then "ON" else "OFF";
diff --git a/pkgs/applications/science/logic/ott/default.nix b/pkgs/applications/science/logic/ott/default.nix
index 15a9fa5ccab..3542dab9382 100644
--- a/pkgs/applications/science/logic/ott/default.nix
+++ b/pkgs/applications/science/logic/ott/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, ocaml, opaline }:
+{ lib, stdenv, fetchFromGitHub, pkgconfig, ocaml, opaline }:
 
 stdenv.mkDerivation rec {
   pname = "ott";
@@ -38,8 +38,8 @@ stdenv.mkDerivation rec {
       target-system terms.
     '';
     homepage = "http://www.cl.cam.ac.uk/~pes20/ott";
-    license = stdenv.lib.licenses.bsd3;
-    maintainers = with stdenv.lib.maintainers; [ jwiegley ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ jwiegley ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/otter/default.nix b/pkgs/applications/science/logic/otter/default.nix
index a7eec20548c..2ad066e53f7 100644
--- a/pkgs/applications/science/logic/otter/default.nix
+++ b/pkgs/applications/science/logic/otter/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, tcsh, libXaw, libXt, libX11}:
+{lib, stdenv, fetchurl, tcsh, libXaw, libXt, libX11}:
 let
   s = # Generated upstream information
   rec {
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
     find . -perm -0100 -type f | xargs sed -i -e "s@/bin/rm@$(type -P rm)@g"
     find . -perm -0100 -type f | xargs sed -i -e "s@/bin/mv@$(type -P mv)@g"
 
-    sed -i -e "s/^XLIBS *=.*/XLIBS=-lXaw -lXt -lX11/" source/formed/Makefile 
+    sed -i -e "s/^XLIBS *=.*/XLIBS=-lXaw -lXt -lX11/" source/formed/Makefile
 
     make all
     make -C examples all
@@ -45,9 +45,9 @@ stdenv.mkDerivation {
   meta = {
     inherit (s) version;
     description = "A reliable first-order theorem prover";
-    license = stdenv.lib.licenses.publicDomain ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.publicDomain ;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
     broken = true;
   };
 }
diff --git a/pkgs/applications/science/logic/petrinizer/default.nix b/pkgs/applications/science/logic/petrinizer/default.nix
index d277e0e1521..5118795978d 100644
--- a/pkgs/applications/science/logic/petrinizer/default.nix
+++ b/pkgs/applications/science/logic/petrinizer/default.nix
@@ -1,6 +1,6 @@
 { mkDerivation, callPackage, buildPackages
 , async, base, bytestring, containers, fetchFromGitLab, mtl
-, parallel-io, parsec, stdenv, stm, transformers
+, parallel-io, parsec, lib, stdenv, stm, transformers
 }:
 let
   z3 = callPackage ./z3.nix { gomp = null; z3 = buildPackages.z3; };
@@ -26,6 +26,6 @@ mkDerivation rec {
     transformers
   ];
   description = "Safety and Liveness Analysis of Petri Nets with SMT solvers";
-  license = stdenv.lib.licenses.gpl3;
-  maintainers = with stdenv.lib.maintainers; [ raskin ];
+  license = lib.licenses.gpl3;
+  maintainers = with lib.maintainers; [ raskin ];
 }
diff --git a/pkgs/applications/science/logic/petrinizer/sbv-7.13.nix b/pkgs/applications/science/logic/petrinizer/sbv-7.13.nix
index ed10e9f3db1..96e216417df 100644
--- a/pkgs/applications/science/logic/petrinizer/sbv-7.13.nix
+++ b/pkgs/applications/science/logic/petrinizer/sbv-7.13.nix
@@ -1,7 +1,7 @@
 { mkDerivation, array, async, base, bytestring, containers
 , crackNum, deepseq, directory, doctest, filepath, generic-deriving
 , ghc, Glob, hlint, mtl, pretty, process, QuickCheck, random
-, stdenv, syb, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
+, lib, stdenv, syb, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
 , template-haskell, time, z3
 }:
 mkDerivation {
@@ -22,5 +22,5 @@ mkDerivation {
   testSystemDepends = [ z3 ];
   homepage = "http://leventerkok.github.com/sbv/";
   description = "SMT Based Verification: Symbolic Haskell theorem prover using SMT solving";
-  license = stdenv.lib.licenses.bsd3;
+  license = lib.licenses.bsd3;
 }
diff --git a/pkgs/applications/science/logic/petrinizer/z3.nix b/pkgs/applications/science/logic/petrinizer/z3.nix
index 4d868054c09..3574954c376 100644
--- a/pkgs/applications/science/logic/petrinizer/z3.nix
+++ b/pkgs/applications/science/logic/petrinizer/z3.nix
@@ -1,5 +1,5 @@
 { mkDerivation, fetchpatch
-, base, containers, gomp, hspec, QuickCheck, stdenv
+, base, containers, gomp, hspec, QuickCheck, lib, stdenv
 , transformers, z3
 }:
 mkDerivation {
@@ -13,7 +13,7 @@ mkDerivation {
   testHaskellDepends = [ base hspec QuickCheck ];
   homepage = "https://github.com/IagoAbal/haskell-z3";
   description = "Bindings for the Z3 Theorem Prover";
-  license = stdenv.lib.licenses.bsd3;
+  license = lib.licenses.bsd3;
   doCheck = false;
   patches = [
     (fetchpatch {
diff --git a/pkgs/applications/science/logic/picosat/default.nix b/pkgs/applications/science/logic/picosat/default.nix
index b13d871580c..48def5fc2e4 100644
--- a/pkgs/applications/science/logic/picosat/default.nix
+++ b/pkgs/applications/science/logic/picosat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
   pname = "picosat";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   configurePhase = "./configure.sh --shared --trace";
 
-  makeFlags = stdenv.lib.optional stdenv.isDarwin
+  makeFlags = lib.optional stdenv.isDarwin
     "SONAME=-Wl,-install_name,$(out)/lib/libpicosat.so";
 
   installPhase = ''
@@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "SAT solver with proof and core support";
     homepage    = "http://fmv.jku.at/picosat/";
-    license     = stdenv.lib.licenses.mit;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ roconnor thoughtpolice ];
+    license     = lib.licenses.mit;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ roconnor thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/potassco/clingcon.nix b/pkgs/applications/science/logic/potassco/clingcon.nix
index b74583ca1a2..4d64a813e62 100644
--- a/pkgs/applications/science/logic/potassco/clingcon.nix
+++ b/pkgs/applications/science/logic/potassco/clingcon.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , cmake
 , bison
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
   meta = {
     inherit version;
     description = "Extension of clingo to handle constraints over integers";
-    license = stdenv.lib.licenses.gpl3; # for now GPL3, next version MIT!
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.gpl3; # for now GPL3, next version MIT!
+    platforms = lib.platforms.unix;
     homepage = "https://potassco.org/";
     downloadPage = "https://github.com/potassco/clingcon/releases/";
     changelog = "https://github.com/potassco/clingcon/releases/tag/v${version}";
diff --git a/pkgs/applications/science/logic/potassco/clingo.nix b/pkgs/applications/science/logic/potassco/clingo.nix
index fd6b2c8d14c..f473c4f5366 100644
--- a/pkgs/applications/science/logic/potassco/clingo.nix
+++ b/pkgs/applications/science/logic/potassco/clingo.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, cmake }:
+{ lib, stdenv, fetchzip, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "clingo";
@@ -16,9 +16,9 @@ stdenv.mkDerivation rec {
   meta = {
     inherit version;
     description = "ASP system to ground and solve logic programs";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.mit;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
     homepage = "https://potassco.org/";
     downloadPage = "https://github.com/potassco/clingo/releases/";
   };
diff --git a/pkgs/applications/science/logic/prover9/default.nix b/pkgs/applications/science/logic/prover9/default.nix
index fcdff855848..7fedca72b69 100644
--- a/pkgs/applications/science/logic/prover9/default.nix
+++ b/pkgs/applications/science/logic/prover9/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{lib, stdenv, fetchurl}:
 
 stdenv.mkDerivation {
   name = "prover9-2009-11a";
@@ -39,7 +39,7 @@ stdenv.mkDerivation {
       for first-order and equational logic. Prover9 is a successor of
       the Otter Prover. This is the LADR command-line version.
     '';
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
     maintainers = [];
   };
 }
diff --git a/pkgs/applications/science/logic/proverif/default.nix b/pkgs/applications/science/logic/proverif/default.nix
index 4242bb0599e..ba46d87581e 100644
--- a/pkgs/applications/science/logic/proverif/default.nix
+++ b/pkgs/applications/science/logic/proverif/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocamlPackages }:
+{ lib, stdenv, fetchurl, ocamlPackages }:
 
 stdenv.mkDerivation rec {
   pname = "proverif";
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Cryptographic protocol verifier in the Dolev-Yao model";
     homepage    = "https://prosecco.gforge.inria.fr/personal/bblanche/proverif/";
-    license     = stdenv.lib.licenses.gpl2;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.gpl2;
+    platforms   = lib.platforms.unix;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/redprl/default.nix b/pkgs/applications/science/logic/redprl/default.nix
index 49245c73f2c..43a2ec7e97e 100644
--- a/pkgs/applications/science/logic/redprl/default.nix
+++ b/pkgs/applications/science/logic/redprl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, mlton }:
+{ lib, stdenv, fetchgit, mlton }:
 stdenv.mkDerivation {
   name = "redprl-2017-03-28";
   src = fetchgit {
@@ -21,8 +21,8 @@ stdenv.mkDerivation {
   meta = {
     description = "A proof assistant for Nominal Computational Type Theory";
     homepage = "http://www.redprl.org/";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.acowley ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.acowley ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/sad/default.nix b/pkgs/applications/science/logic/sad/default.nix
index 77613a13571..8e4d19973ef 100644
--- a/pkgs/applications/science/logic/sad/default.nix
+++ b/pkgs/applications/science/logic/sad/default.nix
@@ -31,10 +31,10 @@ stdenv.mkDerivation {
       The system for automated deduction is intended for automated processing of formal mathematical texts
       written in a special language called ForTheL (FORmal THEory Language) or in a traditional first-order language
       '';
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = [ stdenv.lib.maintainers.schmitthenner ];
+    license = lib.licenses.gpl3Plus;
+    maintainers = [ lib.maintainers.schmitthenner ];
     homepage = "http://nevidal.org/sad.en.html";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
     broken = true;  # ghc-8.4.4 is gone from Nixpkgs
   };
 }
diff --git a/pkgs/applications/science/logic/satallax/default.nix b/pkgs/applications/science/logic/satallax/default.nix
index 6c2b03b5b37..02d9408383a 100644
--- a/pkgs/applications/science/logic/satallax/default.nix
+++ b/pkgs/applications/science/logic/satallax/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
+{lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
 stdenv.mkDerivation rec {
   pname = "satallax";
   version = "2.7";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     mkdir -p "$out/libexec/satallax"
     cp picosat-*/picosat picosat-*/picomus "$out/libexec/satallax"
 
-    ( 
+    (
       cd minisat
       export MROOT=$PWD
       cd core
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
     mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax"
     cp bin/satallax.opt "$out/bin/satallax"
     wrapProgram "$out/bin/satallax" \
-      --suffix PATH : "${stdenv.lib.makeBinPath [ coq eprover ]}:$out/libexec/satallax" \
+      --suffix PATH : "${lib.makeBinPath [ coq eprover ]}:$out/libexec/satallax" \
       --add-flags "-M" --add-flags "$out/lib/satallax/modes"
 
     cp LICENSE README "$out/share/doc/satallax"
@@ -61,9 +61,9 @@ stdenv.mkDerivation rec {
   meta = {
     inherit version;
     description = ''Automated theorem prover for higher-order logic'';
-    license = stdenv.lib.licenses.mit ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.mit ;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
     downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/downloads.php";
     homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/index.php";
     updateWalker = true;
diff --git a/pkgs/applications/science/logic/saw-tools/default.nix b/pkgs/applications/science/logic/saw-tools/default.nix
index 71b26f8023a..1dd6dc1cfc8 100644
--- a/pkgs/applications/science/logic/saw-tools/default.nix
+++ b/pkgs/applications/science/logic/saw-tools/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, gmp4, ncurses, zlib, clang }:
+{ lib, stdenv, fetchurl, gmp4, ncurses, zlib, clang }:
 
 let
-  libPath = stdenv.lib.makeLibraryPath
+  libPath = lib.makeLibraryPath
     [ stdenv.cc.libc
       stdenv.cc.cc
       gmp4
@@ -53,8 +53,8 @@ stdenv.mkDerivation {
   meta = {
     description = "Tools for software verification and analysis";
     homepage    = "https://saw.galois.com";
-    license     = stdenv.lib.licenses.unfreeRedistributable;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.unfreeRedistributable;
+    platforms   = lib.platforms.linux;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/statverif/default.nix b/pkgs/applications/science/logic/statverif/default.nix
index e0efb28819d..07365eef33f 100644
--- a/pkgs/applications/science/logic/statverif/default.nix
+++ b/pkgs/applications/science/logic/statverif/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml }:
+{ lib, stdenv, fetchurl, ocaml }:
 
 stdenv.mkDerivation rec {
   pname = "statverif";
@@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Verification of stateful processes (via Proverif)";
     homepage    = "https://markryan.eu/research/statverif/";
-    license     = stdenv.lib.licenses.gpl2;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.gpl2;
+    platforms   = lib.platforms.unix;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/symbiyosys/default.nix b/pkgs/applications/science/logic/symbiyosys/default.nix
index 9cf8b0845d4..1f2ad4634de 100644
--- a/pkgs/applications/science/logic/symbiyosys/default.nix
+++ b/pkgs/applications/science/logic/symbiyosys/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ lib, stdenv, fetchFromGitHub
 , bash, python3, yosys
 , yices, boolector, z3, aiger
 }:
@@ -51,8 +51,8 @@ stdenv.mkDerivation {
   meta = {
     description = "Tooling for Yosys-based verification flows";
     homepage    = "https://symbiyosys.readthedocs.io/";
-    license     = stdenv.lib.licenses.isc;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice emily ];
-    platforms   = stdenv.lib.platforms.all;
+    license     = lib.licenses.isc;
+    maintainers = with lib.maintainers; [ thoughtpolice emily ];
+    platforms   = lib.platforms.all;
   };
 }
diff --git a/pkgs/applications/science/logic/tlaplus/default.nix b/pkgs/applications/science/logic/tlaplus/default.nix
index 14944f5e19b..c4ba334b85f 100644
--- a/pkgs/applications/science/logic/tlaplus/default.nix
+++ b/pkgs/applications/science/logic/tlaplus/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, makeWrapper
+{ lib, stdenv, fetchFromGitHub, makeWrapper
 , adoptopenjdk-bin, jre, ant
 }:
 
@@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "An algorithm specification language with model checking tools";
     homepage    = "http://lamport.azurewebsites.net/tla/tla.html";
-    license     = stdenv.lib.licenses.mit;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = lib.licenses.mit;
+    platforms   = lib.platforms.unix;
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/tlaplus/tlaps.nix b/pkgs/applications/science/logic/tlaplus/tlaps.nix
index 3872d3a9826..89bdd979fea 100644
--- a/pkgs/applications/science/logic/tlaplus/tlaps.nix
+++ b/pkgs/applications/science/logic/tlaplus/tlaps.nix
@@ -1,5 +1,5 @@
 { fetchurl
-, stdenv
+, lib, stdenv
 , ocaml, isabelle, cvc3, perl, wget, which
 }:
 
@@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
       consistent abstraction over the various “backend” verifiers.
     '';
     homepage    = "https://tla.msr-inria.inria.fr/tlaps/content/Home.html";
-    license     = stdenv.lib.licenses.bsd2;
-    platforms   = stdenv.lib.platforms.unix;
+    license     = lib.licenses.bsd2;
+    platforms   = lib.platforms.unix;
     maintainers = [ ];
   };
 
diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix
index c9e97375b6c..1c33d923289 100644
--- a/pkgs/applications/science/logic/tlaplus/toolbox.nix
+++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix
@@ -75,7 +75,7 @@ in stdenv.mkDerivation {
     '';
     # http://lamport.azurewebsites.net/tla/license.html
     license = with lib.licenses; [ mit ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
     maintainers = [ ];
   };
 }
diff --git a/pkgs/applications/science/logic/twelf/default.nix b/pkgs/applications/science/logic/twelf/default.nix
index 975b989bd94..73fe423673b 100644
--- a/pkgs/applications/science/logic/twelf/default.nix
+++ b/pkgs/applications/science/logic/twelf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, smlnj, rsync }:
+{ lib, stdenv, fetchurl, pkgconfig, smlnj, rsync }:
 
 stdenv.mkDerivation rec {
   pname = "twelf";
@@ -44,8 +44,8 @@ stdenv.mkDerivation rec {
       Standard ML.
     '';
     homepage = "http://twelf.org/wiki/Main_Page";
-    license = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ jwiegley ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jwiegley ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/applications/science/logic/verifast/default.nix b/pkgs/applications/science/logic/verifast/default.nix
index 49618d2586b..2d625a1c1b2 100644
--- a/pkgs/applications/science/logic/verifast/default.nix
+++ b/pkgs/applications/science/logic/verifast/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, gtk2, gdk-pixbuf, atk, pango, glib, cairo, freetype
+{ lib, stdenv, fetchurl, gtk2, gdk-pixbuf, atk, pango, glib, cairo, freetype
 , fontconfig, libxml2, gnome2 }:
 
 let
 
-  libPath = stdenv.lib.makeLibraryPath
+  libPath = lib.makeLibraryPath
     [ stdenv.cc.libc stdenv.cc.cc gtk2 gdk-pixbuf atk pango glib cairo
       freetype fontconfig libxml2 gnome2.gtksourceview
     ] + ":${stdenv.cc.cc.lib}/lib64:$out/libexec";
@@ -43,8 +43,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Verification for C and Java programs via separation logic";
     homepage    = "http://people.cs.kuleuven.be/~bart.jacobs/verifast/";
-    license     = stdenv.lib.licenses.mit;
+    license     = lib.licenses.mit;
     platforms   = [ "x86_64-linux" ];
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    maintainers = [ lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/science/logic/workcraft/default.nix b/pkgs/applications/science/logic/workcraft/default.nix
index 9ce6592d998..cb0d668f536 100644
--- a/pkgs/applications/science/logic/workcraft/default.nix
+++ b/pkgs/applications/science/logic/workcraft/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre, makeWrapper }:
+{ lib, stdenv, fetchurl, jre, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "workcraft";
@@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://workcraft.org/";
     description = "Framework for interpreted graph modeling, verification and synthesis";
-    platforms = stdenv.lib.platforms.linux;
-    license = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ timor ];
+    platforms = lib.platforms.linux;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ timor ];
     inherit version;
   };
 }
diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix
index a01a07b8954..67009657363 100644
--- a/pkgs/applications/science/logic/yices/default.nix
+++ b/pkgs/applications/science/logic/yices/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   # Includes a fix for the embedded soname being libyices.so.2.5, but
   # only installing the libyices.so.2.5.x file.
   installPhase = let
-    ver_XdotY = stdenv.lib.versions.majorMinor version;
+    ver_XdotY = lib.versions.majorMinor version;
   in ''
       make install LDCONFIG=true
       ln -sfr $out/lib/libyices.so.{${version},${ver_XdotY}}
diff --git a/pkgs/applications/science/logic/z3/4.4.0.nix b/pkgs/applications/science/logic/z3/4.4.0.nix
index a5388572db6..9b7dabeb720 100644
--- a/pkgs/applications/science/logic/z3/4.4.0.nix
+++ b/pkgs/applications/science/logic/z3/4.4.0.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python }:
+{ lib, stdenv, fetchFromGitHub, python }:
 
 stdenv.mkDerivation rec {
   name = "z3-${version}";
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A high-performance theorem prover and SMT solver";
     homepage    = "https://github.com/Z3Prover/z3";
-    license     = stdenv.lib.licenses.mit;
-    platforms   = stdenv.lib.platforms.x86_64;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ttuegel ];
+    license     = lib.licenses.mit;
+    platforms   = lib.platforms.x86_64;
+    maintainers = with lib.maintainers; [ thoughtpolice ttuegel ];
   };
 }
diff --git a/pkgs/applications/science/logic/z3/default.nix b/pkgs/applications/science/logic/z3/default.nix
index 48512eff530..cd58740186f 100644
--- a/pkgs/applications/science/logic/z3/default.nix
+++ b/pkgs/applications/science/logic/z3/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python, fixDarwinDylibNames
+{ lib, stdenv, fetchFromGitHub, python, fixDarwinDylibNames
 , javaBindings ? false
 , ocamlBindings ? false
 , pythonBindings ? true
@@ -9,7 +9,7 @@
 assert javaBindings -> jdk != null;
 assert ocamlBindings -> ocaml != null && findlib != null && zarith != null;
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "z3";
@@ -59,8 +59,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A high-performance theorem prover and SMT solver";
     homepage    = "https://github.com/Z3Prover/z3";
-    license     = stdenv.lib.licenses.mit;
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ttuegel ];
+    license     = lib.licenses.mit;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ thoughtpolice ttuegel ];
   };
 }
diff --git a/pkgs/applications/science/logic/z3/tptp.nix b/pkgs/applications/science/logic/z3/tptp.nix
index 34449542abb..c63fad93f07 100644
--- a/pkgs/applications/science/logic/z3/tptp.nix
+++ b/pkgs/applications/science/logic/z3/tptp.nix
@@ -1,4 +1,4 @@
-{stdenv, z3, cmake}:
+{lib, stdenv, z3, cmake}:
 stdenv.mkDerivation rec {
   pname = "z3-tptp";
   version = z3.version;
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
     inherit version;
     inherit (z3.meta) license homepage platforms;
     description = ''TPTP wrapper for Z3 prover'';
-    maintainers = [stdenv.lib.maintainers.raskin];
+    maintainers = [lib.maintainers.raskin];
   };
 }