From badf51221db8fae81bf9948c39eaf8342dfd5597 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Fri, 15 Jan 2021 20:21:58 +0700 Subject: treewide: stdenv.lib -> lib --- pkgs/applications/science/misc/boinc/default.nix | 6 +++--- pkgs/applications/science/misc/cytoscape/default.nix | 8 ++++---- pkgs/applications/science/misc/fityk/default.nix | 6 +++--- pkgs/applications/science/misc/foldingathome/client.nix | 8 ++++---- pkgs/applications/science/misc/foldingathome/control.nix | 8 ++++---- pkgs/applications/science/misc/foldingathome/viewer.nix | 8 ++++---- pkgs/applications/science/misc/golly/beta.nix | 8 ++++---- pkgs/applications/science/misc/golly/default.nix | 8 ++++---- pkgs/applications/science/misc/megam/default.nix | 6 +++--- pkgs/applications/science/misc/openmodelica/default.nix | 4 ++-- pkgs/applications/science/misc/openmodelica/fakegit.nix | 10 +++++----- pkgs/applications/science/misc/openmvg/default.nix | 8 ++++---- pkgs/applications/science/misc/root/5.nix | 10 +++++----- pkgs/applications/science/misc/root/default.nix | 6 +++--- pkgs/applications/science/misc/simgrid/default.nix | 4 ++-- pkgs/applications/science/misc/tulip/default.nix | 6 +++--- pkgs/applications/science/misc/vite/default.nix | 8 ++++---- 17 files changed, 61 insertions(+), 61 deletions(-) (limited to 'pkgs/applications/science/misc') diff --git a/pkgs/applications/science/misc/boinc/default.nix b/pkgs/applications/science/misc/boinc/default.nix index 802abae80e1..e549fda1162 100644 --- a/pkgs/applications/science/misc/boinc/default.nix +++ b/pkgs/applications/science/misc/boinc/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, stdenv, autoconf, automake, pkgconfig, m4, curl, +{ fetchFromGitHub, lib, stdenv, autoconf, automake, pkgconfig, m4, curl, libGLU, libGL, libXmu, libXi, freeglut, libjpeg, libtool, wxGTK30, xcbutil, sqlite, gtk2, patchelf, libXScrnSaver, libnotify, libX11, libxcb }: @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { meta = { description = "Free software for distributed and grid computing"; homepage = "https://boinc.berkeley.edu/"; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.linux; # arbitrary choice + license = lib.licenses.lgpl2Plus; + platforms = lib.platforms.linux; # arbitrary choice }; } diff --git a/pkgs/applications/science/misc/cytoscape/default.nix b/pkgs/applications/science/misc/cytoscape/default.nix index 647492bbe31..db98e0db348 100644 --- a/pkgs/applications/science/misc/cytoscape/default.nix +++ b/pkgs/applications/science/misc/cytoscape/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jre, makeWrapper, substituteAll, coreutils }: +{ lib, stdenv, fetchurl, jre, makeWrapper, substituteAll, coreutils }: stdenv.mkDerivation rec { pname = "cytoscape"; @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { meta = { homepage = "http://www.cytoscape.org"; description = "A general platform for complex network analysis and visualization"; - license = stdenv.lib.licenses.lgpl21; - maintainers = [stdenv.lib.maintainers.mimame]; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.lgpl21; + maintainers = [lib.maintainers.mimame]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/applications/science/misc/fityk/default.nix b/pkgs/applications/science/misc/fityk/default.nix index 18def1d24e2..3198b40711d 100644 --- a/pkgs/applications/science/misc/fityk/default.nix +++ b/pkgs/applications/science/misc/fityk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, boost, lua, zlib, bzip2 +{ lib, stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, boost, lua, zlib, bzip2 , xylib, readline, gnuplot, swig3 }: let @@ -21,8 +21,8 @@ stdenv.mkDerivation { meta = { description = "Curve fitting and peak fitting software"; - license = stdenv.lib.licenses.gpl2; + license = lib.licenses.gpl2; homepage = "http://fityk.nieto.pl/"; - platforms = stdenv.lib.platforms.linux; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/applications/science/misc/foldingathome/client.nix b/pkgs/applications/science/misc/foldingathome/client.nix index bf7145113f5..cc3d5445b59 100644 --- a/pkgs/applications/science/misc/foldingathome/client.nix +++ b/pkgs/applications/science/misc/foldingathome/client.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , autoPatchelfHook , buildFHSUserEnv , dpkg @@ -9,7 +9,7 @@ , extraPkgs ? [] }: let - majMin = stdenv.lib.versions.majorMinor version; + majMin = lib.versions.majorMinor version; version = "7.6.13"; fahclient = stdenv.mkDerivation rec { @@ -52,8 +52,8 @@ buildFHSUserEnv { meta = { description = "Folding@home client"; homepage = "https://foldingathome.org/"; - license = stdenv.lib.licenses.unfree; - maintainers = [ stdenv.lib.maintainers.zimbatm ]; + license = lib.licenses.unfree; + maintainers = [ lib.maintainers.zimbatm ]; platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/science/misc/foldingathome/control.nix b/pkgs/applications/science/misc/foldingathome/control.nix index 85be61f6686..832c6311759 100644 --- a/pkgs/applications/science/misc/foldingathome/control.nix +++ b/pkgs/applications/science/misc/foldingathome/control.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , autoPatchelfHook , dpkg , fahviewer @@ -7,7 +7,7 @@ , python2 }: let - majMin = stdenv.lib.versions.majorMinor version; + majMin = lib.versions.majorMinor version; version = "7.6.21"; python = python2.withPackages @@ -53,8 +53,8 @@ stdenv.mkDerivation rec { meta = { description = "Folding@home control"; homepage = "https://foldingathome.org/"; - license = stdenv.lib.licenses.unfree; - maintainers = [ stdenv.lib.maintainers.zimbatm ]; + license = lib.licenses.unfree; + maintainers = [ lib.maintainers.zimbatm ]; platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/science/misc/foldingathome/viewer.nix b/pkgs/applications/science/misc/foldingathome/viewer.nix index a383de621f2..52ca9c9e623 100644 --- a/pkgs/applications/science/misc/foldingathome/viewer.nix +++ b/pkgs/applications/science/misc/foldingathome/viewer.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , autoPatchelfHook , dpkg , fetchurl @@ -10,7 +10,7 @@ , zlib }: let - majMin = stdenv.lib.versions.majorMinor version; + majMin = lib.versions.majorMinor version; version = "7.6.21"; in stdenv.mkDerivation rec { @@ -48,8 +48,8 @@ stdenv.mkDerivation rec { meta = { description = "Folding@home viewer"; homepage = "https://foldingathome.org/"; - license = stdenv.lib.licenses.unfree; - maintainers = [ stdenv.lib.maintainers.zimbatm ]; + license = lib.licenses.unfree; + maintainers = [ lib.maintainers.zimbatm ]; platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/science/misc/golly/beta.nix b/pkgs/applications/science/misc/golly/beta.nix index 36de6a1d4c5..7741f7ba65b 100644 --- a/pkgs/applications/science/misc/golly/beta.nix +++ b/pkgs/applications/science/misc/golly/beta.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit +{lib, stdenv, fetchgit , wxGTK, perl, python2, zlib, libGLU, libGL, libX11 , automake, autoconf }: @@ -43,9 +43,9 @@ stdenv.mkDerivation rec { meta = { inherit version; description = "Cellular automata simulation program"; - 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; downloadPage = "https://sourceforge.net/projects/golly/files/golly"; }; } diff --git a/pkgs/applications/science/misc/golly/default.nix b/pkgs/applications/science/misc/golly/default.nix index 1478bb64318..be61ec86b32 100644 --- a/pkgs/applications/science/misc/golly/default.nix +++ b/pkgs/applications/science/misc/golly/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, wxGTK, perl, python2, zlib, libGLU, libGL, libX11}: +{lib, stdenv, fetchurl, wxGTK, perl, python2, zlib, libGLU, libGL, libX11}: stdenv.mkDerivation rec { pname = "golly"; version = "3.3"; @@ -31,9 +31,9 @@ stdenv.mkDerivation rec { meta = { inherit version; description = "Cellular automata simulation program"; - 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; downloadPage = "https://sourceforge.net/projects/golly/files/golly"; }; } diff --git a/pkgs/applications/science/misc/megam/default.nix b/pkgs/applications/science/misc/megam/default.nix index 8bb64932f20..6c55027d3c6 100644 --- a/pkgs/applications/science/misc/megam/default.nix +++ b/pkgs/applications/science/misc/megam/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, ocaml, makeWrapper, ncurses }: +{ fetchurl, lib, stdenv, ocaml, makeWrapper, ncurses }: let version = "0.92"; in stdenv.mkDerivation { @@ -11,7 +11,7 @@ stdenv.mkDerivation { }; patches = [ ./ocaml-includes.patch ./ocaml-3.12.patch ]; - + buildInputs = [ ocaml ncurses ]; nativeBuildInputs = [ makeWrapper ]; @@ -42,6 +42,6 @@ stdenv.mkDerivation { license = "non-commercial"; maintainers = [ ]; - platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice + platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice }; } diff --git a/pkgs/applications/science/misc/openmodelica/default.nix b/pkgs/applications/science/misc/openmodelica/default.nix index 8b027b52687..a18131993e5 100644 --- a/pkgs/applications/science/misc/openmodelica/default.nix +++ b/pkgs/applications/science/misc/openmodelica/default.nix @@ -5,7 +5,7 @@ doxygen, boost, openscenegraph, gnome2, xorg, git, bash, gtk2, makeWrapper }: let - fakegit = import ./fakegit.nix {inherit stdenv fetchgit fetchsvn bash;} ; + fakegit = import ./fakegit.nix { inherit lib stdenv fetchgit fetchsvn bash; }; in @@ -38,7 +38,7 @@ stdenv.mkDerivation { for e in $(cd $out/bin && ls); do wrapProgram $out/bin/$e \ --prefix PATH : "${gnumake}/bin" \ - --prefix LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ lapack blas ]}" + --prefix LIBRARY_PATH : "${lib.makeLibraryPath [ lapack blas ]}" done ''; diff --git a/pkgs/applications/science/misc/openmodelica/fakegit.nix b/pkgs/applications/science/misc/openmodelica/fakegit.nix index de69626cd3e..47cca7c7491 100644 --- a/pkgs/applications/science/misc/openmodelica/fakegit.nix +++ b/pkgs/applications/science/misc/openmodelica/fakegit.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit, fetchsvn, bash } : +{ lib, stdenv, fetchgit, fetchsvn, bash }: let mkscript = path : text : '' @@ -11,9 +11,9 @@ let sed -i "s@%out@$out@g" ${path} chmod +x ${path} ''; - + hashname = r: let - rpl = stdenv.lib.replaceChars [":" "/"] ["_" "_"]; + rpl = lib.replaceChars [":" "/"] ["_" "_"]; in (rpl r.url) + "-" + (rpl r.rev); @@ -24,7 +24,7 @@ stdenv.mkDerivation { buildCommand = '' mkdir -pv $out/repos - ${stdenv.lib.concatMapStrings + ${lib.concatMapStrings (r : '' cp -r ${fetchgit r} $out/repos/${hashname r} '' @@ -55,7 +55,7 @@ stdenv.mkDerivation { chmod u+w -R $DEST ''} - ${stdenv.lib.concatMapStrings + ${lib.concatMapStrings (r : '' cp -r ${fetchsvn r} $out/repos/${hashname r} '' diff --git a/pkgs/applications/science/misc/openmvg/default.nix b/pkgs/applications/science/misc/openmvg/default.nix index 5db6092fa36..bf21983adcd 100644 --- a/pkgs/applications/science/misc/openmvg/default.nix +++ b/pkgs/applications/science/misc/openmvg/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, cmake +{ lib, stdenv, fetchFromGitHub, pkgconfig, cmake , libjpeg ? null , zlib ? null , libpng ? null @@ -42,8 +42,8 @@ stdenv.mkDerivation rec { meta = { description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community"; homepage = "https://openmvg.readthedocs.io/en/latest/"; - license = stdenv.lib.licenses.mpl20; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ mdaiter ]; + license = lib.licenses.mpl20; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ mdaiter ]; }; } diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix index d8e6ae06a24..144827413b5 100644 --- a/pkgs/applications/science/misc/root/5.nix +++ b/pkgs/applications/science/misc/root/5.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ pcre python2 zlib libxml2 lz4 lzma gsl_1 xxHash ] - ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] - ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] + ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] + ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] ; patches = [ @@ -30,14 +30,14 @@ stdenv.mkDerivation rec { preConfigure = '' patchShebangs build/unix/ - ln -s ${stdenv.lib.getDev stdenv.cc.libc}/include/AvailabilityMacros.h cint/cint/include/ + ln -s ${lib.getDev stdenv.cc.libc}/include/AvailabilityMacros.h cint/cint/include/ '' # Fix CINTSYSDIR for "build" version of rootcint # This is probably a bug that breaks out-of-source builds + '' substituteInPlace cint/cint/src/loadfile.cxx\ --replace 'env = "cint";' 'env = "'`pwd`'/cint";' - '' + stdenv.lib.optionalString noSplash '' + '' + lib.optionalString noSplash '' substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true" ''; @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { "-Dxml=ON" "-Dxrootd=OFF" ] - ++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; + ++ lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; setupHook = ./setup-hook.sh; diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 8bfde114beb..425d3e1e4b9 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { --replace 'set(lcgpackages ' '#set(lcgpackages ' patchShebangs build/unix/ - '' + stdenv.lib.optionalString noSplash '' + '' + lib.optionalString noSplash '' substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true" ''; @@ -70,8 +70,8 @@ stdenv.mkDerivation rec { "-Dxml=ON" "-Dxrootd=OFF" ] - ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include" - ++ stdenv.lib.optionals stdenv.isDarwin [ + ++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include" + ++ lib.optionals stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" "-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE" diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix index 7cc702f2d53..771e79311c9 100644 --- a/pkgs/applications/science/misc/simgrid/default.nix +++ b/pkgs/applications/science/misc/simgrid/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, cmake, perl, python3, boost, valgrind +{ lib, stdenv, fetchFromGitLab, cmake, perl, python3, boost, valgrind # Optional requirements # Lua 5.3 needed and not available now #, luaSupport ? false, lua5 @@ -10,7 +10,7 @@ , moreTests ? false }: -with stdenv.lib; +with lib; let optionOnOff = option: if option then "on" else "off"; diff --git a/pkgs/applications/science/misc/tulip/default.nix b/pkgs/applications/science/misc/tulip/default.nix index f29cd41169d..62d638717f8 100644 --- a/pkgs/applications/science/misc/tulip/default.nix +++ b/pkgs/applications/science/misc/tulip/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, libxml2, freetype, libGLU, libGL, glew, qt4 +{ fetchurl, lib, stdenv, libxml2, freetype, libGLU, libGL, glew, qt4 , cmake, makeWrapper, libjpeg, python }: let version = "5.2.1"; in @@ -31,9 +31,9 @@ stdenv.mkDerivation rec { homepage = "http://tulip.labri.fr/"; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; maintainers = [ ]; - platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice + platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice }; } diff --git a/pkgs/applications/science/misc/vite/default.nix b/pkgs/applications/science/misc/vite/default.nix index 6f7735db82e..ed9d1852875 100644 --- a/pkgs/applications/science/misc/vite/default.nix +++ b/pkgs/applications/science/misc/vite/default.nix @@ -1,4 +1,4 @@ -{ fetchsvn, stdenv, cmake, qt4, libGLU, libGL }: +{ fetchsvn, lib, stdenv, cmake, qt4, libGLU, libGL }: # ViTE 1.1 has several bugs, so use the SVN version. let @@ -38,8 +38,8 @@ stdenv.mkDerivation { ''; homepage = "http://vite.gforge.inria.fr/"; - license = stdenv.lib.licenses.cecill20; - maintainers = with stdenv.lib.maintainers; [ ]; - platforms = stdenv.lib.platforms.linux; + license = lib.licenses.cecill20; + maintainers = with lib.maintainers; [ ]; + platforms = lib.platforms.linux; }; } -- cgit 1.4.1