about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-01-11 08:54:33 +0100
committerProfpatsch <mail@profpatsch.de>2021-01-11 10:38:22 +0100
commit4a7f99d55d299453a9c2397f90b33d1120669775 (patch)
tree9fca8e9c9970d0a00ce56dfe11b63ae76b00cf01 /pkgs/applications/science/math
parente87aef06e00c42b26789321454d7bd609548cc12 (diff)
treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/R/default.nix4
-rw-r--r--pkgs/applications/science/math/almonds/default.nix4
-rw-r--r--pkgs/applications/science/math/bliss/default.nix4
-rw-r--r--pkgs/applications/science/math/caffe/default.nix2
-rw-r--r--pkgs/applications/science/math/calculix/default.nix4
-rw-r--r--pkgs/applications/science/math/cemu/default.nix4
-rw-r--r--pkgs/applications/science/math/clp/default.nix4
-rw-r--r--pkgs/applications/science/math/colpack/default.nix4
-rw-r--r--pkgs/applications/science/math/cplex/default.nix4
-rw-r--r--pkgs/applications/science/math/form/default.nix4
-rw-r--r--pkgs/applications/science/math/geogebra/default.nix4
-rw-r--r--pkgs/applications/science/math/getdp/default.nix4
-rw-r--r--pkgs/applications/science/math/giac/default.nix2
-rw-r--r--pkgs/applications/science/math/ginac/default.nix4
-rw-r--r--pkgs/applications/science/math/gretl/default.nix4
-rw-r--r--pkgs/applications/science/math/gurobi/default.nix2
-rw-r--r--pkgs/applications/science/math/hmetis/default.nix4
-rw-r--r--pkgs/applications/science/math/jags/default.nix4
-rw-r--r--pkgs/applications/science/math/lp_solve/default.nix4
-rw-r--r--pkgs/applications/science/math/lrcalc/default.nix4
-rw-r--r--pkgs/applications/science/math/mathematica/default.nix4
-rw-r--r--pkgs/applications/science/math/mxnet/default.nix2
-rw-r--r--pkgs/applications/science/math/nasc/default.nix4
-rw-r--r--pkgs/applications/science/math/palp/default.nix4
-rw-r--r--pkgs/applications/science/math/pari/default.nix4
-rw-r--r--pkgs/applications/science/math/pari/gp2c.nix4
-rw-r--r--pkgs/applications/science/math/pynac/default.nix4
-rw-r--r--pkgs/applications/science/math/qalculate-gtk/default.nix4
-rw-r--r--pkgs/applications/science/math/ries/default.nix4
-rw-r--r--pkgs/applications/science/math/rofi-calc/default.nix4
-rw-r--r--pkgs/applications/science/math/sage/sage.nix4
-rw-r--r--pkgs/applications/science/math/wxmaxima/default.nix4
-rw-r--r--pkgs/applications/science/math/zegrapher/default.nix4
33 files changed, 62 insertions, 62 deletions
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index e4fbe8a7f2dec..2191511a9c57c 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
+{ lib, stdenv, fetchurl, bzip2, gfortran, libX11, libXmu, libXt, libjpeg, libpng
 , libtiff, ncurses, pango, pcre2, perl, readline, tcl, texLive, tk, xz, zlib
 , less, texinfo, graphviz, icu, pkgconfig, bison, imake, which, jdk, blas, lapack
 , curl, Cocoa, Foundation, libobjc, libcxx, tzdata, fetchpatch
@@ -86,7 +86,7 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://www.r-project.org/";
     description = "Free software environment for statistical computing and graphics";
     license = licenses.gpl2Plus;
diff --git a/pkgs/applications/science/math/almonds/default.nix b/pkgs/applications/science/math/almonds/default.nix
index 9edb0747b31e4..7271b6d8755c2 100644
--- a/pkgs/applications/science/math/almonds/default.nix
+++ b/pkgs/applications/science/math/almonds/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python3, fetchFromGitHub, ncurses }:
+{ lib, stdenv, python3, fetchFromGitHub, ncurses }:
 
 with python3.pkgs; buildPythonApplication rec {
   pname = "almonds";
@@ -17,7 +17,7 @@ with python3.pkgs; buildPythonApplication rec {
 
   checkPhase = "py.test";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Terminal Mandelbrot fractal viewer";
     homepage = "https://github.com/Tenchi2xh/Almonds";
     license = licenses.mit;
diff --git a/pkgs/applications/science/math/bliss/default.nix b/pkgs/applications/science/math/bliss/default.nix
index 9ab90134aad41..fe68d9d245c52 100644
--- a/pkgs/applications/science/math/bliss/default.nix
+++ b/pkgs/applications/science/math/bliss/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, doxygen }:
+{ lib, stdenv, fetchurl, unzip, doxygen }:
 
 stdenv.mkDerivation rec {
   pname = "bliss";
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     mv *.h *.hh $out/include/bliss
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An open source tool for computing automorphism groups and canonical forms of graphs. It has both a command line user interface as well as C++ and C programming language APIs";
     homepage = "http://www.tcs.hut.fi/Software/bliss/";
     license = licenses.lgpl3;
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix
index c99adea9a6402..565c6a17672dc 100644
--- a/pkgs/applications/science/math/caffe/default.nix
+++ b/pkgs/applications/science/math/caffe/default.nix
@@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
       -weights "${test_model_weights}"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Deep learning framework";
     longDescription = ''
       Caffe is a deep learning framework made with expression, speed, and
diff --git a/pkgs/applications/science/math/calculix/default.nix b/pkgs/applications/science/math/calculix/default.nix
index e37e9d0910c3a..e9766b32c2a48 100644
--- a/pkgs/applications/science/math/calculix/default.nix
+++ b/pkgs/applications/science/math/calculix/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gfortran, arpack, spooles, blas, lapack }:
+{ lib, stdenv, fetchurl, gfortran, arpack, spooles, blas, lapack }:
 
 stdenv.mkDerivation rec {
   pname = "calculix";
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     install -Dm0755 ccx_${version} $out/bin/ccx
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://www.calculix.de/";
     description = "Three-dimensional structural finite element program";
     license = licenses.gpl2Plus;
diff --git a/pkgs/applications/science/math/cemu/default.nix b/pkgs/applications/science/math/cemu/default.nix
index b41135229dd79..65dd05d3d62da 100644
--- a/pkgs/applications/science/math/cemu/default.nix
+++ b/pkgs/applications/science/math/cemu/default.nix
@@ -1,5 +1,5 @@
 { fetchFromGitHub
-, stdenv
+, lib, stdenv
 , mkDerivation
 , SDL2
 , libGL
@@ -42,7 +42,7 @@ mkDerivation rec {
     "gui/qt"
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     changelog = "https://github.com/CE-Programming/CEmu/releases/tag/v${version}";
     description = "Third-party TI-84 Plus CE / TI-83 Premium CE emulator, focused on developer features";
     homepage = "https://ce-programming.github.io/CEmu";
diff --git a/pkgs/applications/science/math/clp/default.nix b/pkgs/applications/science/math/clp/default.nix
index 97ef3dd7543f3..26c277c2685f2 100644
--- a/pkgs/applications/science/math/clp/default.nix
+++ b/pkgs/applications/science/math/clp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, zlib }:
+{ lib, stdenv, fetchurl, zlib }:
 
 stdenv.mkDerivation rec {
   version = "1.17.6";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     license = licenses.epl10;
     homepage = "https://github.com/coin-or/Clp";
     description = "An open-source linear programming solver written in C++";
diff --git a/pkgs/applications/science/math/colpack/default.nix b/pkgs/applications/science/math/colpack/default.nix
index 13a75ce4db2d0..f203852c96575 100644
--- a/pkgs/applications/science/math/colpack/default.nix
+++ b/pkgs/applications/science/math/colpack/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext }:
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext }:
 
 stdenv.mkDerivation rec {
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     ./configure --prefix=$out --enable-openmp
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A package comprising of implementations of algorithms for
     vertex coloring and derivative computation";
     homepage = "http://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities";
diff --git a/pkgs/applications/science/math/cplex/default.nix b/pkgs/applications/science/math/cplex/default.nix
index ec13f5252f13c..39213aff09a6e 100644
--- a/pkgs/applications/science/math/cplex/default.nix
+++ b/pkgs/applications/science/math/cplex/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeWrapper, openjdk, gtk2, xorg, glibcLocales, releasePath ? null }:
+{ lib, stdenv, makeWrapper, openjdk, gtk2, xorg, glibcLocales, releasePath ? null }:
 
 # To use this package, you need to download your own cplex installer from IBM
 # and override the releasePath attribute to point to the location of the file.  
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
     libSuffix = "${version}0";
   };
   
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Optimization solver for mathematical programming";
     homepage = "https://www.ibm.com/be-en/marketplace/ibm-ilog-cplex";
     license = licenses.unfree;
diff --git a/pkgs/applications/science/math/form/default.nix b/pkgs/applications/science/math/form/default.nix
index 091372792901c..00f7d7e453656 100644
--- a/pkgs/applications/science/math/form/default.nix
+++ b/pkgs/applications/science/math/form/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gmp, zlib }:
+{ lib, stdenv, fetchurl, gmp, zlib }:
 
 stdenv.mkDerivation {
   version = "4.2.1";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ gmp zlib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "The FORM project for symbolic manipulation of very big expressions";
     homepage = "https://www.nikhef.nl/~form/";
     license = licenses.gpl3;
diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix
index a0548ffb232b3..a20b43c875e2b 100644
--- a/pkgs/applications/science/math/geogebra/default.nix
+++ b/pkgs/applications/science/math/geogebra/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
+{ lib, stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
 let
   pname = "geogebra";
   version = "5-0-609-0";
@@ -19,7 +19,7 @@ let
     mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Dynamic mathematics software with graphics, algebra and spreadsheets";
     longDescription = ''
       Dynamic mathematics software for all levels of education that brings
diff --git a/pkgs/applications/science/math/getdp/default.nix b/pkgs/applications/science/math/getdp/default.nix
index ae93e89f1416d..915c7e1147f1f 100644
--- a/pkgs/applications/science/math/getdp/default.nix
+++ b/pkgs/applications/science/math/getdp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, gfortran, blas, lapack, openmpi, petsc, python3 }:
+{ lib, stdenv, fetchurl, cmake, gfortran, blas, lapack, openmpi, petsc, python3 }:
 
 stdenv.mkDerivation rec {
   name = "getdp-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake gfortran ];
   buildInputs = [ blas lapack openmpi petsc python3 ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A General Environment for the Treatment of Discrete Problems";
     longDescription = ''
       GetDP is a free finite element solver using mixed elements to discretize
diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix
index b090274919bd4..7825fc1d9a2e2 100644
--- a/pkgs/applications/science/math/giac/default.nix
+++ b/pkgs/applications/science/math/giac/default.nix
@@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
     done;
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A free computer algebra system (CAS)";
     homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";
     license = licenses.gpl3Plus;
diff --git a/pkgs/applications/science/math/ginac/default.nix b/pkgs/applications/science/math/ginac/default.nix
index 3c129e8033bdf..e20e15edeff1a 100644
--- a/pkgs/applications/science/math/ginac/default.nix
+++ b/pkgs/applications/science/math/ginac/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cln, pkgconfig, readline, gmp, python }:
+{ lib, stdenv, fetchurl, cln, pkgconfig, readline, gmp, python }:
 
 stdenv.mkDerivation rec {
   name = "ginac-1.8.0";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--disable-rpath" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "GiNaC is Not a CAS";
     homepage    = "http://www.ginac.de/";
     maintainers = with maintainers; [ lovek323 ];
diff --git a/pkgs/applications/science/math/gretl/default.nix b/pkgs/applications/science/math/gretl/default.nix
index 7d77453cbab0c..b68a02e9ebbd0 100644
--- a/pkgs/applications/science/math/gretl/default.nix
+++ b/pkgs/applications/science/math/gretl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, curl, fftw, gmp, gnuplot, gtk3, gtksourceview3, json-glib
+{ lib, stdenv, fetchurl, curl, fftw, gmp, gnuplot, gtk3, gtksourceview3, json-glib
 , lapack, libxml2, mpfr, openblas, pkg-config, readline }:
 
 stdenv.mkDerivation rec {
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A software package for econometric analysis";
     longDescription = ''
       gretl is a cross-platform software package for econometric analysis,
diff --git a/pkgs/applications/science/math/gurobi/default.nix b/pkgs/applications/science/math/gurobi/default.nix
index 1aa7bce07c5dc..f2f406991e304 100644
--- a/pkgs/applications/science/math/gurobi/default.nix
+++ b/pkgs/applications/science/math/gurobi/default.nix
@@ -48,7 +48,7 @@ in stdenv.mkDerivation rec {
 
   passthru.libSuffix = lib.replaceStrings ["."] [""] majorVersion;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Optimization solver for mathematical programming";
     homepage = "https://www.gurobi.com";
     license = licenses.unfree;
diff --git a/pkgs/applications/science/math/hmetis/default.nix b/pkgs/applications/science/math/hmetis/default.nix
index b5e99a8dd75be..f25a0f13c7fb0 100644
--- a/pkgs/applications/science/math/hmetis/default.nix
+++ b/pkgs/applications/science/math/hmetis/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ghostscript }:
+{ lib, stdenv, fetchurl, ghostscript }:
 
 stdenv.mkDerivation rec {
   pname = "hmetis";
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     mv libhmetis.a $out/lib
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "hMETIS is a set of programs for partitioning hypergraphs";
     homepage = "http://glaros.dtc.umn.edu/gkhome/metis/hmetis/overview";
     license = licenses.unfree;
diff --git a/pkgs/applications/science/math/jags/default.nix b/pkgs/applications/science/math/jags/default.nix
index 122c62888476f..2e59866513427 100644
--- a/pkgs/applications/science/math/jags/default.nix
+++ b/pkgs/applications/science/math/jags/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, gfortran, blas, lapack}:
+{lib, stdenv, fetchurl, gfortran, blas, lapack}:
 
 stdenv.mkDerivation rec {
   name = "JAGS-4.3.0";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   buildInputs = [gfortran blas lapack];
   configureFlags = [ "--with-blas=-lblas" "--with-lapack=-llapack" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Just Another Gibbs Sampler";
     license     = licenses.gpl2;
     homepage    = "http://mcmc-jags.sourceforge.net";
diff --git a/pkgs/applications/science/math/lp_solve/default.nix b/pkgs/applications/science/math/lp_solve/default.nix
index 673c28ffa77f1..f944499af401c 100644
--- a/pkgs/applications/science/math/lp_solve/default.nix
+++ b/pkgs/applications/science/math/lp_solve/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
 
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
     )
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A Mixed Integer Linear Programming (MILP) solver";
     homepage    = "http://lpsolve.sourceforge.net";
     license     = licenses.gpl2Plus;
diff --git a/pkgs/applications/science/math/lrcalc/default.nix b/pkgs/applications/science/math/lrcalc/default.nix
index ddd470e621a09..96eb779645169 100644
--- a/pkgs/applications/science/math/lrcalc/default.nix
+++ b/pkgs/applications/science/math/lrcalc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromBitbucket
 , fetchpatch
 , autoreconfHook
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Littlewood-Richardson calculator";
     homepage = "http://math.rutgers.edu/~asbuch/lrcalc/";
     license = licenses.gpl2Plus;
diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix
index ea9a9c1b7554d..e91ad5e5f8c95 100644
--- a/pkgs/applications/science/math/mathematica/default.nix
+++ b/pkgs/applications/science/math/mathematica/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , coreutils
 , patchelf
 , requireFile
@@ -154,7 +154,7 @@ stdenv.mkDerivation rec {
   # we did this in prefixup already
   dontPatchELF = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Wolfram Mathematica computational software system";
     homepage = "http://www.wolfram.com/mathematica/";
     license = licenses.unfree;
diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix
index 68df53aee3934..ab360a9638524 100644
--- a/pkgs/applications/science/math/mxnet/default.nix
+++ b/pkgs/applications/science/math/mxnet/default.nix
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
     rm "$out"/lib/*.a
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler";
     homepage = "https://mxnet.incubator.apache.org/";
     maintainers = with maintainers; [ abbradar ];
diff --git a/pkgs/applications/science/math/nasc/default.nix b/pkgs/applications/science/math/nasc/default.nix
index 9d14df5a79885..40406cc45889a 100644
--- a/pkgs/applications/science/math/nasc/default.nix
+++ b/pkgs/applications/science/math/nasc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , pkgconfig
 , python3
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
     };
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Do maths like a normal person, designed for elementary OS";
     longDescription = ''
       It’s an app where you do maths like a normal person. It lets you
diff --git a/pkgs/applications/science/math/palp/default.nix b/pkgs/applications/science/math/palp/default.nix
index 9ae4fe1ba920c..b5b9577d4930b 100644
--- a/pkgs/applications/science/math/palp/default.nix
+++ b/pkgs/applications/science/math/palp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , dimensions ? 6 # works for <= dimensions dimensions, but is only optimized for that exact value
 , doSymlink ? true # symlink the executables to the default location (without dimension postfix)
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A Package for Analyzing Lattice Polytopes";
     longDescription = ''
       A Package for Analyzing Lattice Polytopes (PALP) is a set of C
diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix
index 7ec42d11ab14d..dd965e17c73c6 100644
--- a/pkgs/applications/science/math/pari/default.nix
+++ b/pkgs/applications/science/math/pari/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , gmp
 , readline
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
 
   makeFlags = [ "all" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Computer algebra system for high-performance number theory computations";
     longDescription = ''
        PARI/GP is a widely used computer algebra system designed for fast
diff --git a/pkgs/applications/science/math/pari/gp2c.nix b/pkgs/applications/science/math/pari/gp2c.nix
index 082ff60c3e8db..23183f83b36b6 100644
--- a/pkgs/applications/science/math/pari/gp2c.nix
+++ b/pkgs/applications/science/math/pari/gp2c.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , pari
 , fetchurl
 , perl }:
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     "--with-paricfg=${pari}/lib/pari/pari.cfg"
     "--with-perl=${perl}/bin/perl" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description =  "A compiler to translate GP scripts to PARI programs";
     homepage = "http://pari.math.u-bordeaux.fr/";
     downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix
index e3474d865e2de..d49285c3e2f04 100644
--- a/pkgs/applications/science/math/pynac/default.nix
+++ b/pkgs/applications/science/math/pynac/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , fetchurl
 , autoreconfHook
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Python is Not a CAS -- modified version of Ginac";
     longDescription = ''
       Pynac -- "Python is Not a CAS" is a modified version of Ginac that
diff --git a/pkgs/applications/science/math/qalculate-gtk/default.nix b/pkgs/applications/science/math/qalculate-gtk/default.nix
index ba7ac5505e4e6..d7d880df04035 100644
--- a/pkgs/applications/science/math/qalculate-gtk/default.nix
+++ b/pkgs/applications/science/math/qalculate-gtk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, intltool, autoreconfHook, pkgconfig, libqalculate, gtk3, wrapGAppsHook }:
+{ lib, stdenv, fetchFromGitHub, intltool, autoreconfHook, pkgconfig, libqalculate, gtk3, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
   pname = "qalculate-gtk";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ libqalculate gtk3 ];
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "The ultimate desktop calculator";
     homepage = "http://qalculate.github.io";
     maintainers = with maintainers; [ gebner ];
diff --git a/pkgs/applications/science/math/ries/default.nix b/pkgs/applications/science/math/ries/default.nix
index 4adf3ef2096e0..e46553d7b09ed 100644
--- a/pkgs/applications/science/math/ries/default.nix
+++ b/pkgs/applications/science/math/ries/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip }:
+{ lib, stdenv, fetchzip }:
 stdenv.mkDerivation {
   name = "ries-2018-04-11";
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
 
   makeFlags = [ "PREFIX=$(out)" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://mrob.com/pub/ries/";
     description = "Tool to produce a list of equations that approximately solve to a given number";
     platforms = platforms.all;
diff --git a/pkgs/applications/science/math/rofi-calc/default.nix b/pkgs/applications/science/math/rofi-calc/default.nix
index ebf2d2f0475d1..e7cf98c726665 100644
--- a/pkgs/applications/science/math/rofi-calc/default.nix
+++ b/pkgs/applications/science/math/rofi-calc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , autoreconfHook
 , pkgconfig
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
     sed "s|qalc_binary = \"qalc\"|qalc_binary = \"${libqalculate}/bin/qalc\"|" -i src/calc.c
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Do live calculations in rofi!";
     homepage = "https://github.com/svenstaro/rofi-calc";
     license = licenses.mit;
diff --git a/pkgs/applications/science/math/sage/sage.nix b/pkgs/applications/science/math/sage/sage.nix
index e2acef7b8eb55..b9256e32f8b13 100644
--- a/pkgs/applications/science/math/sage/sage.nix
+++ b/pkgs/applications/science/math/sage/sage.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , makeWrapper
 , sage-tests
 , sage-with-env
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
     kernelspec = jupyter-kernel-definition;
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab";
     license = licenses.gpl2;
     maintainers = teams.sage.members;
diff --git a/pkgs/applications/science/math/wxmaxima/default.nix b/pkgs/applications/science/math/wxmaxima/default.nix
index 7a81a0d679a3f..89bdc4155481a 100644
--- a/pkgs/applications/science/math/wxmaxima/default.nix
+++ b/pkgs/applications/science/math/wxmaxima/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ lib, stdenv, fetchFromGitHub
 , wrapGAppsHook, cmake, gettext
 , maxima, wxGTK, gnome3 }:
 
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     gappsWrapperArgs+=(--prefix PATH ":" ${maxima}/bin)
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Cross platform GUI for the computer algebra system Maxima";
     license = licenses.gpl2;
     homepage = "https://wxmaxima-developers.github.io/wxmaxima/";
diff --git a/pkgs/applications/science/math/zegrapher/default.nix b/pkgs/applications/science/math/zegrapher/default.nix
index c9eb72cca4331..32633eb8015d6 100644
--- a/pkgs/applications/science/math/zegrapher/default.nix
+++ b/pkgs/applications/science/math/zegrapher/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , qmake
 , wrapQtAppsHook
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     boost
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://zegrapher.com/";
     description = "An open source math plotter";
     longDescription = ''