Merge staging and PR #35021
It's the last staging commit (mostly) built on Hydra, and a minimal fix for Darwin regression in pysqlite.
This commit is contained in:
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDFLAGS="" CC="$CC" )
|
||||
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' )
|
||||
'' else ''
|
||||
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" )
|
||||
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDFLAGS="-fPIC" CC="$CC" AR="$AR q" RANLIB="$RANLIB" )
|
||||
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.5.1 liblua.so.5.1.5" INSTALL_DATA='cp -d' )
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, hostPlatform, fetchurl
|
||||
{ stdenv, hostPlatform, buildPlatform, buildPackages, fetchurl
|
||||
, bzip2
|
||||
, gdbm
|
||||
, fetchpatch
|
||||
@@ -88,7 +88,6 @@ let
|
||||
# only works for GCC and Apple Clang. This makes distutils to call C++
|
||||
# compiler when needed.
|
||||
./python-2.7-distutils-C++.patch
|
||||
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
@@ -117,6 +116,28 @@ let
|
||||
"ac_cv_func_bind_textdomain_codeset=yes"
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
"--disable-toolbox-glue"
|
||||
] ++ optionals (hostPlatform != buildPlatform) [
|
||||
"PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python"
|
||||
"ac_cv_buggy_getaddrinfo=no"
|
||||
# Assume little-endian IEEE 754 floating point when cross compiling
|
||||
"ac_cv_little_endian_double=yes"
|
||||
"ac_cv_big_endian_double=no"
|
||||
"ac_cv_mixed_endian_double=no"
|
||||
"ac_cv_x87_double_rounding=yes"
|
||||
"ac_cv_tanh_preserves_zero_sign=yes"
|
||||
# Generally assume that things are present and work
|
||||
"ac_cv_posix_semaphores_enabled=yes"
|
||||
"ac_cv_broken_sem_getvalue=no"
|
||||
"ac_cv_wchar_t_signed=yes"
|
||||
"ac_cv_rshift_extends_sign=yes"
|
||||
"ac_cv_broken_nice=no"
|
||||
"ac_cv_broken_poll=no"
|
||||
"ac_cv_working_tzset=yes"
|
||||
"ac_cv_have_long_long_format=yes"
|
||||
"ac_cv_have_size_t_format=yes"
|
||||
"ac_cv_computed_gotos=yes"
|
||||
"ac_cv_file__dev_ptmx=yes"
|
||||
"ac_cv_file__dev_ptc=yes"
|
||||
];
|
||||
|
||||
postConfigure = if hostPlatform.isCygwin then ''
|
||||
@@ -131,6 +152,9 @@ let
|
||||
++ [ db gdbm ncurses sqlite readline ]
|
||||
++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
|
||||
++ optionals stdenv.isDarwin ([ CF ] ++ optional (configd != null) configd);
|
||||
nativeBuildInputs =
|
||||
optionals (hostPlatform != buildPlatform)
|
||||
[ buildPackages.stdenv.cc buildPackages.python ];
|
||||
|
||||
mkPaths = paths: {
|
||||
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
|
||||
@@ -144,7 +168,7 @@ in stdenv.mkDerivation {
|
||||
name = "python-${version}";
|
||||
pythonVersion = majorVersion;
|
||||
|
||||
inherit majorVersion version src patches buildInputs
|
||||
inherit majorVersion version src patches buildInputs nativeBuildInputs
|
||||
preConfigure configureFlags;
|
||||
|
||||
LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
@@ -187,7 +211,8 @@ in stdenv.mkDerivation {
|
||||
# Determinism: Windows installers were not deterministic.
|
||||
# We're also not interested in building Windows installers.
|
||||
find "$out" -name 'wininst*.exe' | xargs -r rm -f
|
||||
|
||||
'' + optionalString (stdenv.hostPlatform == stdenv.buildPlatform)
|
||||
''
|
||||
# Determinism: rebuild all bytecode
|
||||
# We exclude lib2to3 because that's Python 2 code which fails
|
||||
# We rebuild three times, once for each optimization level
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, fetchpatch
|
||||
{ stdenv, fetchurl, fetchpatch, buildPackages
|
||||
, glibc
|
||||
, bzip2
|
||||
, expat
|
||||
@@ -39,12 +39,15 @@ let
|
||||
++ optionals x11Support [ tcl tk libX11 xproto ]
|
||||
++ optionals stdenv.isDarwin [ CF configd ];
|
||||
|
||||
nativeBuildInputs =
|
||||
optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.python3;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "python3-${version}";
|
||||
pythonVersion = majorVersion;
|
||||
inherit majorVersion version;
|
||||
|
||||
inherit buildInputs;
|
||||
inherit buildInputs nativeBuildInputs;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
|
||||
@@ -87,6 +90,27 @@ in stdenv.mkDerivation {
|
||||
"--without-ensurepip"
|
||||
"--with-system-expat"
|
||||
"--with-system-ffi"
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"ac_cv_buggy_getaddrinfo=no"
|
||||
# Assume little-endian IEEE 754 floating point when cross compiling
|
||||
"ac_cv_little_endian_double=yes"
|
||||
"ac_cv_big_endian_double=no"
|
||||
"ac_cv_mixed_endian_double=no"
|
||||
"ac_cv_x87_double_rounding=yes"
|
||||
"ac_cv_tanh_preserves_zero_sign=yes"
|
||||
# Generally assume that things are present and work
|
||||
"ac_cv_posix_semaphores_enabled=yes"
|
||||
"ac_cv_broken_sem_getvalue=no"
|
||||
"ac_cv_wchar_t_signed=yes"
|
||||
"ac_cv_rshift_extends_sign=yes"
|
||||
"ac_cv_broken_nice=no"
|
||||
"ac_cv_broken_poll=no"
|
||||
"ac_cv_working_tzset=yes"
|
||||
"ac_cv_have_long_long_format=yes"
|
||||
"ac_cv_have_size_t_format=yes"
|
||||
"ac_cv_computed_gotos=yes"
|
||||
"ac_cv_file__dev_ptmx=yes"
|
||||
"ac_cv_file__dev_ptc=yes"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
@@ -139,7 +163,7 @@ in stdenv.mkDerivation {
|
||||
for i in $out/lib/python${majorVersion}/_sysconfigdata*.py $out/lib/python${majorVersion}/config-${majorVersion}m*/Makefile; do
|
||||
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
|
||||
done
|
||||
|
||||
'' + optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
# Determinism: rebuild all bytecode
|
||||
# We exclude lib2to3 because that's Python 2 code which fails
|
||||
# We rebuild three times, once for each optimization level
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
|
||||
{ stdenv, buildPackages, lib
|
||||
, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
|
||||
, zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, autoreconfHook, bison
|
||||
, autoconf, darwin ? null
|
||||
, buildEnv, bundler, bundix, Foundation
|
||||
@@ -22,6 +23,12 @@ let
|
||||
# Contains the ruby version heuristics
|
||||
rubyVersion = import ./ruby-version.nix { inherit lib; };
|
||||
|
||||
# Needed during postInstall
|
||||
buildRuby =
|
||||
if stdenv.hostPlatform == stdenv.buildPlatform
|
||||
then "$out/bin/ruby"
|
||||
else "${buildPackages.ruby}/bin/ruby";
|
||||
|
||||
generic = { version, sha256 }: let
|
||||
ver = version;
|
||||
tag = ver.gitTag;
|
||||
@@ -30,7 +37,8 @@ let
|
||||
isRuby25 = ver.majMin == "2.5";
|
||||
baseruby = self.override { useRailsExpress = false; };
|
||||
self = lib.makeOverridable (
|
||||
{ stdenv, lib, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
|
||||
{ stdenv, buildPackages, lib
|
||||
, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
|
||||
, useRailsExpress ? true
|
||||
, zlib, zlibSupport ? true
|
||||
, openssl, opensslSupport ? true
|
||||
@@ -65,9 +73,13 @@ let
|
||||
unpackdir rubySrc;
|
||||
|
||||
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
||||
NROFF = "${groff}/bin/nroff";
|
||||
NROFF = if docSupport then "${groff}/bin/nroff" else null;
|
||||
|
||||
nativeBuildInputs = ops useRailsExpress [ autoreconfHook bison ];
|
||||
nativeBuildInputs =
|
||||
ops useRailsExpress [ autoreconfHook bison ]
|
||||
++ ops (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
buildPackages.ruby
|
||||
];
|
||||
buildInputs =
|
||||
(op fiddleSupport libffi)
|
||||
++ (ops cursesSupport [ ncurses readline ])
|
||||
@@ -120,14 +132,16 @@ let
|
||||
"--with-out-ext=tk"
|
||||
# on yosemite, "generating encdb.h" will hang for a very long time without this flag
|
||||
"--with-setjmp-type=setjmp"
|
||||
];
|
||||
]
|
||||
++ op (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"--with-baseruby=${buildRuby}";
|
||||
|
||||
installFlags = stdenv.lib.optionalString docSupport "install-doc";
|
||||
# Bundler tries to create this directory
|
||||
postInstall = ''
|
||||
# Update rubygems
|
||||
pushd rubygems
|
||||
$out/bin/ruby setup.rb
|
||||
${buildRuby} setup.rb
|
||||
popd
|
||||
|
||||
# Remove unnecessary groff reference from runtime closure, since it's big
|
||||
|
||||
Reference in New Issue
Block a user