pkgs/development/interpreters: stdenv.lib -> lib
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user