diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-01-24 00:09:45 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-01-24 00:09:45 +0100 |
commit | 01ee4ea574a426a5d48cd503163233d13bea050d (patch) | |
tree | 8ccca2180720717625a6930efb35c11681968910 /pkgs/development/interpreters/python | |
parent | 58752914f4b22a570ff7cba694df86aef20e255a (diff) | |
parent | f1778cd90eea2c3d5dbca3aa55b6351697dad683 (diff) | |
download | nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar.gz nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar.bz2 nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar.lz nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar.xz nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.tar.zst nixpkgs-01ee4ea574a426a5d48cd503163233d13bea050d.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/development/interpreters/python')
6 files changed, 26 insertions, 26 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 4c0501aebcd..85af394e3f6 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch +{ lib, stdenv, fetchurl, fetchpatch , bzip2 , expat , libffi @@ -36,7 +36,7 @@ assert x11Support -> tcl != null && xlibsWrapper != null && libX11 != null; -with stdenv.lib; +with lib; let buildPackages = pkgsBuildHost; @@ -215,7 +215,7 @@ let }; # Python 2.7 needs this - crossCompileEnv = stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) + crossCompileEnv = lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { _PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config; }; # Build the basic Python interpreter without modules that have @@ -227,7 +227,7 @@ in with passthru; stdenv.mkDerivation ({ inherit src patches buildInputs nativeBuildInputs preConfigure configureFlags; - LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2" @@ -298,9 +298,9 @@ in with passthru; stdenv.mkDerivation ({ hierarchical packages; exception-based error handling; and very high level dynamic data types. ''; - license = stdenv.lib.licenses.psfl; - platforms = stdenv.lib.platforms.all; - maintainers = with stdenv.lib.maintainers; [ fridh ]; + license = lib.licenses.psfl; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ fridh ]; # Higher priority than Python 3.x so that `/bin/python` points to `/bin/python2` # in case both 2 and 3 are installed. priority = -100; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 347245f8a01..7bc6084f61d 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch +{ lib, stdenv, fetchurl, fetchpatch , bzip2 , expat , libffi @@ -54,7 +54,7 @@ assert x11Support -> tcl != null assert bluezSupport -> bluez != null; -with stdenv.lib; +with lib; let buildPackages = pkgsBuildHost; @@ -369,14 +369,14 @@ in with passthru; stdenv.mkDerivation { find $out -type d -name __pycache__ -print0 | xargs -0 -I {} rm -rf "{}" ''; - preFixup = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + preFixup = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' # Ensure patch-shebangs uses shebangs of host interpreter. - export PATH=${stdenv.lib.makeBinPath [ "$out" bash ]}:$PATH + export PATH=${lib.makeBinPath [ "$out" bash ]}:$PATH ''; # Add CPython specific setup-hook that configures distutils.sysconfig to # always load sysconfigdata from host Python. - postFixup = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' cat << "EOF" >> "$out/nix-support/setup-hook" ${sysconfigdataHook} EOF @@ -385,8 +385,8 @@ in with passthru; stdenv.mkDerivation { # Enforce that we don't have references to the OpenSSL -dev package, which we # explicitly specify in our configure flags above. disallowedReferences = - stdenv.lib.optionals (openssl != null && !static) [ openssl.dev ] - ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + lib.optionals (openssl != null && !static) [ openssl.dev ] + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # Ensure we don't have references to build-time packages. # These typically end up in shebangs. pythonForBuild buildPackages.bash diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 9c6457d22aa..cfa1ac71891 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, substituteAll, fetchurl +{ lib, stdenv, substituteAll, fetchurl , zlib ? null, zlibSupport ? true, bzip2, pkg-config, libffi, libunwind, Security , sqlite, openssl, ncurses, python, expat, tcl, tk, tix, xlibsWrapper, libX11 , self, gdbm, db, lzma @@ -14,12 +14,12 @@ , pythonVersion , sha256 , passthruFun -, pythonAttr ? "pypy${stdenv.lib.substring 0 1 pythonVersion}${stdenv.lib.substring 2 3 pythonVersion}" +, pythonAttr ? "pypy${lib.substring 0 1 pythonVersion}${lib.substring 2 3 pythonVersion}" }: assert zlibSupport -> zlib != null; -with stdenv.lib; +with lib; let isPy3k = substring 0 1 pythonVersion == "3"; @@ -144,7 +144,7 @@ in with passthru; stdenv.mkDerivation rec { ln -s $out/${executable}-c/include $out/include/${libPrefix} ln -s $out/${executable}-c/lib-python/${if isPy3k then "3" else pythonVersion} $out/lib/${libPrefix} - ${stdenv.lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.isDarwin '' install_name_tool -change @rpath/libpypy${optionalString isPy3k "3"}-c.dylib $out/lib/libpypy${optionalString isPy3k "3"}-c.dylib $out/bin/${executable} ''} @@ -158,7 +158,7 @@ in with passthru; stdenv.mkDerivation rec { inherit passthru; enableParallelBuilding = true; # almost no parallelization without STM - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://pypy.org/"; description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})"; license = licenses.mit; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt.nix b/pkgs/development/interpreters/python/pypy/prebuilt.nix index 1522047a380..6fd0ee2e925 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -22,7 +22,7 @@ # This version of PyPy is primarily added to speed-up translation of # our PyPy source build when developing that expression. -with stdenv.lib; +with lib; let isPy3k = majorVersion == "3"; @@ -78,7 +78,7 @@ in with passthru; stdenv.mkDerivation { pushd $out find {lib,lib_pypy*} -name "*.so" -exec patchelf --remove-needed libncursesw.so.6 --replace-needed libtinfow.so.6 libncursesw.so.6 {} \; - find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${stdenv.lib.makeLibraryPath deps}:$out/lib {} \; + find {lib,lib_pypy*} -name "*.so" -exec patchelf --set-rpath ${lib.makeLibraryPath deps}:$out/lib {} \; echo "Removing bytecode" find . -name "__pycache__" -type d -depth -exec rm -rf {} \; @@ -115,7 +115,7 @@ in with passthru; stdenv.mkDerivation { inherit passthru; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://pypy.org/"; description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})"; license = licenses.mit; diff --git a/pkgs/development/interpreters/python/tests.nix b/pkgs/development/interpreters/python/tests.nix index a291919b327..61fc497024b 100644 --- a/pkgs/development/interpreters/python/tests.nix +++ b/pkgs/development/interpreters/python/tests.nix @@ -93,4 +93,4 @@ let -in stdenv.lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform ) (environmentTests // integrationTests) +in lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform ) (environmentTests // integrationTests) diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix index dffad6b98f5..61ad4a8a6ad 100644 --- a/pkgs/development/interpreters/python/wrapper.nix +++ b/pkgs/development/interpreters/python/wrapper.nix @@ -1,4 +1,4 @@ -{ stdenv, python, buildEnv, makeWrapper +{ lib, stdenv, python, buildEnv, makeWrapper , extraLibs ? [] , extraOutputsToInstall ? [] , postBuild ? "" @@ -30,14 +30,14 @@ let fi mkdir -p "$out/bin" - for path in ${stdenv.lib.concatStringsSep " " paths}; do + for path in ${lib.concatStringsSep " " paths}; do if [ -d "$path/bin" ]; then cd "$path/bin" for prg in *; do if [ -f "$prg" ]; then rm -f "$out/bin/$prg" if [ -x "$prg" ]; then - makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set NIX_PYTHONPREFIX "$out" --set NIX_PYTHONEXECUTABLE ${pythonExecutable} --set NIX_PYTHONPATH ${pythonPath} ${if permitUserSite then "" else ''--set PYTHONNOUSERSITE "true"''} ${stdenv.lib.concatStringsSep " " makeWrapperArgs} + makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set NIX_PYTHONPREFIX "$out" --set NIX_PYTHONEXECUTABLE ${pythonExecutable} --set NIX_PYTHONPATH ${pythonPath} ${if permitUserSite then "" else ''--set PYTHONNOUSERSITE "true"''} ${lib.concatStringsSep " " makeWrapperArgs} fi fi done |