Merge branch 'master' into staging-next

This commit is contained in:
Jan Tojnar
2021-01-24 00:09:45 +01:00
871 changed files with 3294 additions and 3821 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -93,4 +93,4 @@ let
in stdenv.lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform ) (environmentTests // integrationTests)
in lib.optionalAttrs (stdenv.hostPlatform == stdenv.buildPlatform ) (environmentTests // integrationTests)

View File

@@ -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