diff options
Diffstat (limited to 'pkgs/development/interpreters')
12 files changed, 71 insertions, 45 deletions
diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index 0529c9f1e28c..bc0b728ecce4 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -59,7 +59,8 @@ in stdenv.mkDerivation ({ debugInfo = enableDebugInfo; - enableParallelBuilding = true; + # On some machines, parallel build reliably crashes on `GEN asn1ct_eval_ext.erl` step + enableParallelBuilding = false; # Clang 4 (rightfully) thinks signed comparisons of pointers with NULL are nonsense prePatch = '' diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index ca0335178373..5e8f5e2d59b6 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -154,11 +154,11 @@ let platforms = platforms.all; }; } // stdenv.lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec { - crossVersion = "ab8d05c9e695d3db4f7dc15c70f23623349c2f49"; # Oct 03, 2018 + crossVersion = "276849e62f472c1b241d9e7b38a28e4cc9f98563"; # Dez 02, 2018 perl-cross-src = fetchurlBoot { url = "https://github.com/arsv/perl-cross/archive/${crossVersion}.tar.gz"; - sha256 = "1g7p7mqmx8x3diqvbh881gr72d106cn6yvm4gx7f0ars3n3b3wj0"; + sha256 = "1fpr1m9lgkwdp1vmdr0s6gvmcpd0m8q6jwn024bkczc2h37bdynd"; }; depsBuildBuild = [ buildPackages.stdenv.cc makeWrapper ]; @@ -174,15 +174,10 @@ let setupHook = ./setup-hook-cross.sh; }); in rec { - perl526 = common { - version = "5.26.2"; - sha256 = "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"; - }; - # the latest Maint version perl528 = common { - version = "5.28.0"; - sha256 = "1a3f822lcl8dr8v0hk80yyhpzqlljg49z9flb48rs3nbsij9z4ky"; + version = "5.28.1"; + sha256 = "0iy3as4hnbjfyws4in3j9d6zhhjxgl5m95i5n9jy2bnzcpz8bgry"; }; # the latest Devel version diff --git a/pkgs/development/interpreters/python/cpython/2.7/boot.nix b/pkgs/development/interpreters/python/cpython/2.7/boot.nix index 976d30819dbe..ccb366903c5c 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/boot.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/boot.nix @@ -77,8 +77,6 @@ stdenv.mkDerivation rec { '' ln -s $out/share/man/man1/{python2.7.1.gz,python.1.gz} - paxmark E $out/bin/python2.7 - rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev ''; diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 63dad3bf42ff..ff1497a24e46 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -229,8 +229,6 @@ in stdenv.mkDerivation ({ ln -s $out/lib/python${majorVersion}/pdb.py $out/bin/pdb${majorVersion} ln -s $out/share/man/man1/{python2.7.1.gz,python.1.gz} - paxmark E $out/bin/python${majorVersion} - # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 92c277aacd4f..19e9f3169c7a 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -143,7 +143,6 @@ in stdenv.mkDerivation { touch $out/lib/python${majorVersion}/test/__init__.py ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" - paxmark E $out/bin/python${majorVersion} # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index cad35cac53a8..a36965a78017 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -158,7 +158,6 @@ in stdenv.mkDerivation { touch $out/lib/python${majorVersion}/test/__init__.py ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" - paxmark E $out/bin/python${majorVersion} # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py diff --git a/pkgs/development/interpreters/python/cpython/3.7/default.nix b/pkgs/development/interpreters/python/cpython/3.7/default.nix index a008be707c2c..1d8b1c0eadf3 100644 --- a/pkgs/development/interpreters/python/cpython/3.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.7/default.nix @@ -14,8 +14,10 @@ , self , CF, configd , python-setup-hook +, nukeReferences # For the Python package set , packageOverrides ? (self: super: {}) +, buildPackages }: assert x11Support -> tcl != null @@ -33,12 +35,15 @@ let sitePackages = "lib/${libPrefix}/site-packages"; buildInputs = filter (p: p != null) [ - zlib bzip2 expat lzma libffi gdbm sqlite readline ncurses openssl ] + zlib bzip2 expat lzma libffi gdbm sqlite readline ncurses openssl nukeReferences ] ++ optionals x11Support [ tcl tk libX11 xproto ] ++ optionals stdenv.isDarwin [ CF configd ]; hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); - + pythonForBuild = if stdenv.hostPlatform == stdenv.buildPlatform then + "$out/bin/python" + else + buildPackages.python37.interpreter; in stdenv.mkDerivation { name = "python3-${version}"; pythonVersion = majorVersion; @@ -46,6 +51,10 @@ in stdenv.mkDerivation { inherit buildInputs; + nativeBuildInputs = + optionals (stdenv.hostPlatform != stdenv.buildPlatform) + [ buildPackages.stdenv.cc buildPackages.python37 ]; + src = fetchurl { url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz"; sha256 = "1fzi9d2gibh0wzwidyckzbywsxcsbckgsl05ryxlifxia77fhgyq"; @@ -95,6 +104,27 @@ in stdenv.mkDerivation { "--with-system-expat" "--with-system-ffi" "--with-openssl=${openssl.dev}" + ] ++ 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 = '' @@ -125,7 +155,6 @@ in stdenv.mkDerivation { touch $out/lib/python${majorVersion}/test/__init__.py ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" - paxmark E $out/bin/python${majorVersion} # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py @@ -145,19 +174,28 @@ in stdenv.mkDerivation { # some $TMPDIR references to improve binary reproducibility. # Note that the .pyc file of _sysconfigdata.py should be regenerated! 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" + sed -i $i -e "s|$TMPDIR|/no-such-path|g" + nuke-refs $i done + # Further get rid of references. https://github.com/NixOS/nixpkgs/issues/51668 + find $out/lib/python*/config-*-* -type f -print -exec nuke-refs '{}' + + find $out/lib -name '_sysconfigdata_m*.py*' -print -exec nuke-refs '{}' + + # Determinism: rebuild all bytecode # We exclude lib2to3 because that's Python 2 code which fails # We rebuild three times, once for each optimization level # Python 3.7 implements PEP 552, introducing support for deterministic bytecode. # This is automatically used when `SOURCE_DATE_EPOCH` is set. - find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i - - find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i - - find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i - + find $out -name "*.py" | ${pythonForBuild} -m compileall -q -f -x "lib2to3" -i - + find $out -name "*.py" | ${pythonForBuild} -O -m compileall -q -f -x "lib2to3" -i - + find $out -name "*.py" | ${pythonForBuild} -OO -m compileall -q -f -x "lib2to3" -i - ''; + # Enforce that we don't have references to the OpenSSL -dev package, which we + # explicitly specify in our configure flags above. + disallowedReferences = [ openssl.dev ]; + passthru = let pythonPackages = callPackage ../../../../../top-level/python-packages.nix { python = self; diff --git a/pkgs/development/interpreters/python/wrap-python.nix b/pkgs/development/interpreters/python/wrap-python.nix index 1efd777bb052..4ff0a62d7fbd 100644 --- a/pkgs/development/interpreters/python/wrap-python.nix +++ b/pkgs/development/interpreters/python/wrap-python.nix @@ -7,7 +7,7 @@ with lib; makeSetupHook { deps = makeWrapper; - substitutions.libPrefix = python.libPrefix; + substitutions.sitePackages = python.sitePackages; substitutions.executable = python.interpreter; substitutions.python = python; substitutions.magicalSedExpression = let diff --git a/pkgs/development/interpreters/python/wrap.sh b/pkgs/development/interpreters/python/wrap.sh index 01b573e6ad5d..6fa8c316a17d 100644 --- a/pkgs/development/interpreters/python/wrap.sh +++ b/pkgs/development/interpreters/python/wrap.sh @@ -92,7 +92,7 @@ _addToPythonPath() { pythonPathsSeen[$dir]=1 # addToSearchPath is defined in stdenv/generic/setup.sh. It will have # the effect of calling `export program_X=$dir/...:$program_X`. - addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages + addToSearchPath program_PYTHONPATH $dir/@sitePackages@ addToSearchPath program_PATH $dir/bin # Inspect the propagated inputs (if they exist) and recur on them. @@ -113,9 +113,9 @@ createBuildInputsPth() { if $(echo -n $x |grep -q python-recursive-pth-loader); then continue fi - if test -d "$x"/lib/@libPrefix@/site-packages; then - echo $x/lib/@libPrefix@/site-packages \ - >> "$out"/lib/@libPrefix@/site-packages/${name}-nix-python-$category.pth + if test -d "$x"/@sitePackages@; then + echo $x/@sitePackages@ \ + >> "$out"/@sitePackages@/${name}-nix-python-$category.pth fi done fi diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 9be8247add11..7365cd522734 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -73,15 +73,12 @@ let # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. NROFF = if docSupport then "${groff}/bin/nroff" else null; - nativeBuildInputs = - ops useRailsExpress [ autoreconfHook bison ] - ++ ops (stdenv.buildPlatform != stdenv.hostPlatform) [ - buildPackages.ruby - ]; + nativeBuildInputs = [ autoreconfHook bison ] + ++ (op docSupport groff) + ++ op (stdenv.buildPlatform != stdenv.hostPlatform) buildPackages.ruby; buildInputs = (op fiddleSupport libffi) ++ (ops cursesSupport [ ncurses readline ]) - ++ (op docSupport groff) ++ (op zlibSupport zlib) ++ (op opensslSupport openssl) ++ (op gdbmSupport gdbm) @@ -149,7 +146,7 @@ let postInstall = '' # Update rubygems pushd rubygems - ${buildRuby} setup.rb + ${buildRuby} setup.rb --destdir $GEM_HOME popd # Remove unnecessary groff reference from runtime closure, since it's big diff --git a/pkgs/development/interpreters/spidermonkey/1.8.5.nix b/pkgs/development/interpreters/spidermonkey/1.8.5.nix index 466371955868..9c81b230ada2 100644 --- a/pkgs/development/interpreters/spidermonkey/1.8.5.nix +++ b/pkgs/development/interpreters/spidermonkey/1.8.5.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { # so the failure of that test does not matter much. configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [ - "--with-cpu-arch=armv5t" + "--with-cpu-arch=armv5t" "--disable-tracejit" ]; # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 @@ -59,9 +59,6 @@ stdenv.mkDerivation rec { preCheck = '' rm jit-test/tests/sunspider/check-date-format-tofte.js # https://bugzil.la/600522 - - paxmark mr shell/js - paxmark mr jsapi-tests/jsapi-tests ''; meta = with stdenv.lib; { diff --git a/pkgs/development/interpreters/tcl/generic.nix b/pkgs/development/interpreters/tcl/generic.nix index a472ccaafbf2..011b3a125ef2 100644 --- a/pkgs/development/interpreters/tcl/generic.nix +++ b/pkgs/development/interpreters/tcl/generic.nix @@ -15,15 +15,19 @@ stdenv.mkDerivation rec { setOutputFlags = false; preConfigure = '' - # Note: using $out instead of $man to prevent a runtime dependency on $man. - configureFlagsArray+=(--mandir=$out/share/man --enable-man-symlinks) - - # Don't install tzdata because NixOS already has a more up-to-date copy. - configureFlagsArray+=(--with-tzdata=no) - cd unix ''; + configureFlags = [ + "--enable-threads" + # Note: using $out instead of $man to prevent a runtime dependency on $man. + "--mandir=${placeholder "out"}/share/man" + "--enable-man-symlinks" + # Don't install tzdata because NixOS already has a more up-to-date copy. + "--with-tzdata=no" + "tcl_cv_strtod_unbroken=ok" + ] ++ stdenv.lib.optional stdenv.is64bit "--enable-64bit"; + enableParallelBuilding = true; postInstall = '' |