Merge staging into staging-next

This commit is contained in:
Frederik Rietdijk
2021-03-08 19:20:18 +01:00
374 changed files with 3871 additions and 2493 deletions

View File

@@ -8,13 +8,11 @@ let
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "1pp853lbnz383ilp9wbgc3wv1dn7lpx3idz8dmzda94rckl7sd43";
};
buildInputs = [
unzip
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
nativeBuildInputs = [ unzip ];
src = fetchurl {
inherit (s) url sha256;
};

View File

@@ -8,13 +8,11 @@ let
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "sha256-AQ3UXiPnNNRvWJHXDiaGB6EsuasSUD3aQvhC2dt+iFc=";
};
buildInputs = [
unzip
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
nativeBuildInputs = [ unzip ];
src = fetchurl {
inherit (s) url sha256;
};

View File

@@ -149,11 +149,11 @@ stdenv.mkDerivation {
sha256 = "12agi6bacqic2wq6q3l28283badzamspajmajzqm7fbdl2aq1a4p";
};
nativeBuildInputs = [ unzip ];
buildInputs = [
nodejs
clojure
jre
unzip
python
openssl
gnutar

View File

@@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "1xdpjqx7qaq0syw448b32q36g12pgh1hn6knyqi3k5isp0f09qmr";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ unzip ];
nativeBuildInputs = [ makeWrapper unzip ];
installPhase = ''
mkdir -p $out

View File

@@ -22,8 +22,9 @@ stdenv.mkDerivation {
sha256 = "b112d7843f65217e3b5a9d40461698ef8dab7cbbe830af21216dfb924dc88a2f";
};
nativeBuildInputs = [ unzip ];
buildInputs = [
flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper unzip cln yices
flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper cln yices
];
hardeningDisable = [ "stackprotector" ] ++

View File

@@ -20,17 +20,14 @@ in buildEnv {
inherit ignoreCollisions;
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
buildInputs = [ makeWrapper texinfo wrapOctave ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ texinfo wrapOctave ];
# During "build" we must first unlink the /share symlink to octave's /share
# Then, we can re-symlink the all of octave/share, except for /share/octave
# in env/share/octave, re-symlink everything from octave/share/octave and then
# perform the pkg install.
postBuild = ''
. "${makeWrapper}/nix-support/setup-hook"
# The `makeWrapper` used here is the one defined in
# ${makeWrapper}/nix-support/setup-hook
if [ -L "$out/bin" ]; then
unlink $out/bin
mkdir -p "$out/bin"

View File

@@ -0,0 +1,46 @@
diff --git a/hints/darwin.sh b/hints/darwin.sh
index 0a91bc083c0..fdfbdd4a3b9 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
# We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
# capturing its value and adding it to the flags.
case "$MACOSX_DEPLOYMENT_TARGET" in
- 10.*)
+ [1-9][0-9].*)
add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
;;
@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
***
-*** Please either set it to 10.something, or to empty.
+*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty.
EOM
exit 1
@@ -327,7 +327,7 @@ EOM
# "ProductVersion: 10.11" "10.11"
prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
case "$prodvers" in
- 10.*)
+ [1-9][0-9].*)
add_macosx_version_min ccflags $prodvers
add_macosx_version_min ldflags $prodvers
;;
@@ -342,11 +342,10 @@ EOM
exit 1
esac
- # The X in 10.X
- prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
+ darwin_major=$(echo $osvers|awk -F. '{print $1}')
- # macOS (10.12) deprecated syscall().
- if [ "$prodvers_minor" -ge 12 ]; then
+ # macOS 10.12 (darwin 16.0.0) deprecated syscall().
+ if [ "$darwin_major" -ge 16 ]; then
d_syscall='undef'
# If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
case "$MACOSX_DEPLOYMENT_TARGET" in

View File

@@ -41,7 +41,10 @@ let
]
++ optional stdenv.isSunOS ./ld-shared.patch
++ optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]
++ optional crossCompiling ./MakeMaker-cross.patch;
++ optional crossCompiling ./MakeMaker-cross.patch
# Backporting https://github.com/Perl/perl5/pull/17946, can be
# removed if there's ever a 5.30.x release with it included.
++ optional (versionOlder version "5.32.1") ./aarch64-darwin.patch;
# This is not done for native builds because pwd may need to come from
# bootstrap tools when building bootstrap perl.

View File

@@ -17,11 +17,10 @@ let
inherit ignoreCollisions;
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
nativeBuildInputs = [ makeWrapper ];
# we create wrapper for the binaries in the different packages
postBuild = ''
. "${makeWrapper}/nix-support/setup-hook"
if [ -L "$out/bin" ]; then
unlink "$out/bin"
fi

View File

@@ -106,6 +106,12 @@ let
./CVE-2021-3177.patch
# The workaround is for unittests on Win64, which we don't support.
# It does break aarch64-darwin, which we do support. See:
# * https://bugs.python.org/issue35523
# * https://github.com/python/cpython/commit/e6b247c8e524
../3.7/no-win64-workaround.patch
] ++ optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch
] ++ optionals stdenv.isLinux [

View File

@@ -0,0 +1,37 @@
From e6b247c8e524dbe5fc03b3492f628d0d5348bc49 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@redhat.com>
Date: Tue, 18 Dec 2018 14:47:21 +0100
Subject: [PATCH] bpo-35523: Remove ctypes callback workaround (GH-11211)
Remove ctypes callback workaround: no longer create a callback at startup.
Avoid SELinux alert on "import ctypes" and "import uuid".
---
Lib/ctypes/__init__.py | 5 -----
.../next/Library/2018-12-18-13-52-13.bpo-35523.SkoMno.rst | 2 ++
2 files changed, 2 insertions(+), 5 deletions(-)
create mode 100644 Misc/NEWS.d/next/Library/2018-12-18-13-52-13.bpo-35523.SkoMno.rst
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 6146773988648..5f78beda5866e 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -266,11 +266,6 @@ def _reset_cache():
# _SimpleCData.c_char_p_from_param
POINTER(c_char).from_param = c_char_p.from_param
_pointer_type_cache[None] = c_void_p
- # XXX for whatever reasons, creating the first instance of a callback
- # function is needed for the unittests on Win64 to succeed. This MAY
- # be a compiler bug, since the problem occurs only when _ctypes is
- # compiled with the MS SDK compiler. Or an uninitialized variable?
- CFUNCTYPE(c_int)(lambda: None)
def create_unicode_buffer(init, size=None):
"""create_unicode_buffer(aString) -> character array
diff --git a/Misc/NEWS.d/next/Library/2018-12-18-13-52-13.bpo-35523.SkoMno.rst b/Misc/NEWS.d/next/Library/2018-12-18-13-52-13.bpo-35523.SkoMno.rst
new file mode 100644
index 0000000000000..94a9fd257383e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-12-18-13-52-13.bpo-35523.SkoMno.rst
@@ -0,0 +1,2 @@
+Remove :mod:`ctypes` callback workaround: no longer create a callback at
+startup. Avoid SELinux alert on ``import ctypes`` and ``import uuid``.

View File

@@ -185,6 +185,11 @@ in with passthru; stdenv.mkDerivation {
# Backport a fix for discovering `rpmbuild` command when doing `python setup.py bdist_rpm` to 3.5, 3.6, 3.7.
# See: https://bugs.python.org/issue11122
./3.7/fix-hardcoded-path-checking-for-rpmbuild.patch
# The workaround is for unittests on Win64, which we don't support.
# It does break aarch64-darwin, which we do support. See:
# * https://bugs.python.org/issue35523
# * https://github.com/python/cpython/commit/e6b247c8e524
./3.7/no-win64-workaround.patch
] ++ optionals (isPy37 || isPy38 || isPy39) [
# Fix darwin build https://bugs.python.org/issue34027
./3.7/darwin-libutil.patch

View File

@@ -1,10 +1,15 @@
{ lib, stdenv, python, buildEnv, makeWrapper
{ lib, stdenv, buildEnv, makeWrapper
# manually pased
, python
, requiredPythonModules
# extra opts
, extraLibs ? []
, extraOutputsToInstall ? []
, postBuild ? ""
, ignoreCollisions ? false
, permitUserSite ? false
, requiredPythonModules
# Wrap executables with the given argument.
, makeWrapperArgs ? []
, }:
@@ -22,9 +27,9 @@ let
inherit ignoreCollisions;
extraOutputsToInstall = [ "out" ] ++ extraOutputsToInstall;
postBuild = ''
. "${makeWrapper}/nix-support/setup-hook"
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
if [ -L "$out/bin" ]; then
unlink "$out/bin"
fi

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation {
owner = "vrthra";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper unzip ];
preConfigure = ''
cd build;
@@ -25,7 +25,6 @@ stdenv.mkDerivation {
'';
buildInputs = [
unzip
pkg-config
ncurses
];

View File

@@ -27,6 +27,7 @@ let
ver = version;
tag = ver.gitTag;
atLeast27 = lib.versionAtLeast ver.majMin "2.7";
atLeast30 = lib.versionAtLeast ver.majMin "3.0";
baseruby = self.override {
useRailsExpress = false;
docSupport = false;
@@ -109,7 +110,9 @@ let
(import ./patchsets.nix {
inherit patchSet useRailsExpress ops fetchpatch;
patchLevel = ver.patchLevel;
}).${ver.majMinTiny};
}).${ver.majMinTiny}
++ op atLeast27 ./do-not-regenerate-revision.h.patch
++ op (atLeast30 && useRailsExpress) ./do-not-update-gems-baseruby.patch;
postUnpack = opString rubygemsSupport ''
rm -rf $sourceRoot/{lib,test}/rubygems*
@@ -121,17 +124,12 @@ let
sed -i configure.ac -e '/config.guess/d'
cp --remove-destination ${config}/config.guess tool/
cp --remove-destination ${config}/config.sub tool/
'' + opString (!atLeast30) ''
# Make the build reproducible for ruby <= 2.7
# See https://github.com/ruby/io-console/commit/679a941d05d869f5e575730f6581c027203b7b26#diff-d8422f096931c58d4463e2489f62a228b0f24f0492950ba88c8c89a0d741cfe6
sed -i ext/io/console/io-console.gemspec -e '/s\.date/d'
'';
# Force the revision.h generation. Somehow `revision.tmp` is an empty
# file and because we don't add `git` to buildInputs, hence the check is
# always true.
# https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae
buildFlags = lib.optionals atLeast27 [ "REVISION_LATEST=0" ];
configureFlags = ["--enable-shared" "--enable-pthread" "--with-soname=ruby-${version}"]
++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
++ op (!jitSupport) "--disable-jit-support"
@@ -149,6 +147,10 @@ let
preConfigure = opString docSupport ''
configureFlagsArray+=("--with-ridir=$devdoc/share/ri")
# rdoc creates XDG_DATA_DIR (defaulting to $HOME/.local/share) even if
# it's not going to be used.
export HOME=$TMPDIR
'';
# fails with "16993 tests, 2229489 assertions, 105 failures, 14 errors, 89 skips"
@@ -261,4 +263,12 @@ in {
git = "0kbgznf1yprfp9645k31ra5f4757b7fichzi0hdg6nxkj90853s0";
};
};
ruby_3_0 = generic {
version = rubyVersion "3" "0" "0" "";
sha256 = {
src = "0a4fmxafxvkg1m738g2lmkhipwnmd96kzqy1m9kvk3n1l50x2gm1";
git = "0fvnxv97m94nridlc5nvvrlg53pr5g042dkfc5ysd327s7xj4cjp";
};
};
}

View File

@@ -0,0 +1,23 @@
Do not regenerate revision.h
Ruby's makefile compares the shipped version with the git revision to regenerate
revision.h [1], but since we don't include git in buildInputs, this comparison
fails and it can't find $(REVISION_H).
[1] https://github.com/ruby/ruby/commit/97a5af62a318fcd93a4e5e4428d576c0280ddbae
diff -Naur ruby.old/defs/gmake.mk ruby.new/defs/gmake.mk
--- ruby.old/defs/gmake.mk
+++ ruby.new/defs/gmake.mk
@@ -325,11 +325,9 @@
REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h 2>/dev/null)
REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && git log -1 --format=%H 2>/dev/null)
-ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST))
# GNU make treat the target as unmodified when its dependents get
# updated but it is not updated, while others may not.
$(srcdir)/revision.h: $(REVISION_H)
-endif
# Query on the generated rdoc
#

View File

@@ -0,0 +1,14 @@
Do not update gems when building with base ruby
diff -Naur ruby.old/defs/gmake.mk ruby.new/defs/gmake.mk
--- ruby.old/common.mk
+++ ruby.new/common.mk
@@ -1298,7 +1298,7 @@ update-config_files: PHONY
config.guess config.sub
refresh-gems: update-bundled_gems prepare-gems
-prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
+prepare-gems:
update-gems$(gnumake:yes=-nongnumake): PHONY
$(ECHO) Downloading bundled gem files...

View File

@@ -1,11 +1,6 @@
{ patchSet, useRailsExpress, ops, patchLevel, fetchpatch }:
{
"2.5.8" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.5/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.5/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.5/head/railsexpress/03-more-detailed-stacktrace.patch"
];
"2.6.6" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.6/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch"
@@ -16,4 +11,8 @@
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch"
];
"3.0.0" = ops useRailsExpress [
"${patchSet}/patches/ruby/3.0/head/railsexpress/01-improve-gc-stats.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/02-malloc-trim.patch"
];
}

View File

@@ -3,6 +3,6 @@
fetchFromGitHub {
owner = "skaes";
repo = "rvm-patchsets";
rev = "e2f4b82e47aeaf2a3b894da3b46ba6f0ca92cbb6";
sha256 = "059mvf8jcjrfplr8hv2y6ibc41id979k0zwfh6zdnb7dynym4bsg";
rev = "28c6469ce841ff3033c376e78a7043009a3bdc5c";
sha256 = "0kh08hahrwif61sq0qlvgyqiymxi8c8h2dw4s3ln4aq696k4gba9";
}

View File

@@ -1,6 +1,5 @@
{ lib, stdenv
, fetchurl
, fetchpatch
, autoconf213
, pkg-config
, perl
@@ -21,11 +20,11 @@
stdenv.mkDerivation rec {
pname = "spidermonkey";
version = "78.4.0";
version = "78.8.0";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
sha256 = "1z3hj45bnd12z3g6ajv9qrgclca7fymi1sxj9l9nh9q6y6xz0g4f";
sha256 = "0451hhjrj9hb6limxim7sbhvw4gs6dd2gmnfxjjx07z3wbgdzwhw";
};
outputs = [ "out" "dev" ];
@@ -96,9 +95,19 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postPatch = ''
# This patch is a manually applied fix of
# https://bugzilla.mozilla.org/show_bug.cgi?id=1644600
# Once that bug is fixed, this can be removed.
# This is needed in, for example, `zeroad`.
substituteInPlace js/public/StructuredClone.h \
--replace "class SharedArrayRawBufferRefs {" \
"class JS_PUBLIC_API SharedArrayRawBufferRefs {"
'';
meta = with lib; {
description = "Mozilla's JavaScript engine written in C/C++";
homepage = "https://developer.mozilla.org/en/SpiderMonkey";
homepage = "https://spidermonkey.dev/";
license = licenses.gpl2; # TODO: MPL/GPL/LGPL tri-license.
maintainers = with maintainers; [ abbradar lostnet ];
platforms = platforms.linux;

View File

@@ -7,7 +7,8 @@ stdenv.mkDerivation {
url = "http://unicon.org/dist/uni-2-4-2010.zip";
sha256 = "1g9l2dfp99dqih2ir2limqfjgagh3v9aqly6x0l3qavx3qkkwf61";
};
buildInputs = [ libnsl libX11 libXt unzip ];
nativeBuildInputs = [ unzip ];
buildInputs = [ libnsl libX11 libXt ];
hardeningDisable = [ "fortify" ];
@@ -41,4 +42,3 @@ stdenv.mkDerivation {
homepage = "http://unicon.org";
};
}