Merge pull request #47604 from NixOS/staging-next

Staging next
This commit is contained in:
Frederik Rietdijk 2018-10-02 18:22:18 +02:00 committed by GitHub
commit 4d1abc4419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 1135 additions and 1135 deletions

View File

@ -4,7 +4,6 @@
args @ {config, lib, pkgs}: with args; with pkgs;
let
gitBase = callPackage ./git {
texinfo = texinfo5;
svnSupport = false; # for git-svn support
guiSupport = false; # requires tcl/tk
sendEmailSupport = false; # requires plenty of perl libraries

View File

@ -20,7 +20,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;
let
version = "2.18.0";
version = "2.19.0";
svn = subversionClient.override { perlBindings = perlSupport; };
in
@ -29,7 +29,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b";
sha256 = "1x1y5z3awabmfg7hk6zb331jxngad4nal4507v96bnf0izsyy3qq";
};
outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
@ -283,7 +283,7 @@ EOF
# XXX: I failed to understand why this one fails.
# Could someone try to re-enable it on the next release ?
# Tested to fail: 2.18.0
# Tested to fail: 2.18.0 and 2.19.0
disable_test t1700-split-index "null sha1"
# Tested to fail: 2.18.0
@ -292,6 +292,9 @@ EOF
# Tested to fail: 2.18.0
disable_test t9902-completion "sourcing the completion script clears cached --options"
# As of 2.19.0, t5562 refers to #!/usr/bin/perl
patchShebangs t/t5562/invoke-with-content-length.pl
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
# Test fails (as of 2.17.0, musl 1.1.19)
disable_test t3900-i18n-commit

View File

@ -6,9 +6,10 @@
# compiler and the linker just "work".
{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, bintools ? null, libc ? null
, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, stdenvNoCC
, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? bintools != null && bintools ? man
, extraPackages ? [], extraBuildCommands ? ""
, buildPackages ? {}
, useMacosReexportHack ? false

View File

@ -6,8 +6,10 @@
# compiler and the linker just "work".
{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, stdenvNoCC
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? cc != null && cc ? man
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, buildPackages ? {}

View File

@ -0,0 +1,41 @@
#!/usr/bin/env python
import sys
import toml
def quote(s: str) -> str:
escaped = s.replace('"', r"\"").replace("\n", r"\n").replace("\\", "\\\\")
return '"{}"'.format(escaped)
def main() -> None:
data = toml.load(sys.stdin)
assert list(data.keys()) == ["source"]
# this value is non deterministic
data["source"]["vendored-sources"]["directory"] = "@vendor@"
lines = []
inner = data["source"]
for source, attrs in sorted(inner.items()):
lines.append("[source.{}]".format(quote(source)))
if source == "vendored-sources":
lines.append('"directory" = "@vendor@"\n')
else:
for key, value in sorted(attrs.items()):
attr = "{} = {}".format(quote(key), quote(value))
lines.append(attr)
lines.append("")
result = "\n".join(lines)
real = toml.loads(result)
assert real == data, "output = {} while input = {}".format(real, data)
print(result)
if __name__ == "__main__":
main()

View File

@ -1,7 +1,7 @@
{ stdenv, cacert, git, rust, cargo-vendor }:
{ stdenv, cacert, git, rust, cargo-vendor, python3 }:
let
fetchcargo = import ./fetchcargo.nix {
inherit stdenv cacert git rust cargo-vendor;
inherit stdenv cacert git rust cargo-vendor python3;
};
in
{ name, cargoSha256 ? "unset"
@ -61,14 +61,12 @@ in stdenv.mkDerivation (args // {
${setupVendorDir}
mkdir .cargo
cat >.cargo/config <<-EOF
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'
[source.vendored-sources]
directory = '$(pwd)/$cargoDepsCopy'
EOF
config="$(pwd)/$cargoDepsCopy/.cargo/config";
if [[ ! -e $config ]]; then
config=${./fetchcargo-default-config.toml};
fi;
substitute $config .cargo/config \
--subst-var-by vendor "$(pwd)/$cargoDepsCopy"
unset cargoDepsCopy

View File

@ -0,0 +1,7 @@
[source."crates-io"]
"replace-with" = "vendored-sources"
[source."vendored-sources"]
"directory" = "@vendor@"

View File

@ -1,8 +1,26 @@
{ stdenv, cacert, git, rust, cargo-vendor }:
{ stdenv, cacert, git, rust, cargo-vendor, python3 }:
let cargo-vendor-normalise = stdenv.mkDerivation {
name = "cargo-vendor-normalise";
src = ./cargo-vendor-normalise.py;
nativeBuildInputs = [ python3.pkgs.wrapPython ];
unpackPhase = ":";
installPhase = "install -D $src $out/bin/cargo-vendor-normalise";
pythonPath = [ python3.pkgs.toml ];
postFixup = "wrapPythonPrograms";
doInstallCheck = true;
installCheckPhase = ''
# check that ./fetchcargo-default-config.toml is a fix point
reference=${./fetchcargo-default-config.toml}
< $reference $out/bin/cargo-vendor-normalise > test;
cmp test $reference
'';
preferLocalBuild = true;
};
in
{ name ? "cargo-deps", src, srcs, patches, sourceRoot, sha256, cargoUpdateHook ? "" }:
stdenv.mkDerivation {
name = "${name}-vendor";
nativeBuildInputs = [ cacert cargo-vendor git rust.cargo ];
nativeBuildInputs = [ cacert cargo-vendor git cargo-vendor-normalise rust.cargo ];
inherit src srcs patches sourceRoot;
phases = "unpackPhase patchPhase installPhase";
@ -23,9 +41,16 @@ stdenv.mkDerivation {
${cargoUpdateHook}
cargo vendor
cp -ar vendor $out
mkdir -p $out
cargo vendor $out | cargo-vendor-normalise > config
# fetchcargo used to never keep the config output by cargo vendor
# and instead hardcode the config in ./fetchcargo-default-config.toml.
# This broke on packages needing git dependencies, so now we keep the config.
# But not to break old cargoSha256, if the previous behavior was enough,
# we don't store the config.
if ! cmp config ${./fetchcargo-default-config.toml} > /dev/null; then
install -Dt $out/.cargo config;
fi;
'';
outputHashAlgo = "sha256";

View File

@ -32,7 +32,7 @@ patchShebangs() {
# - options: something starting with a '-'
# - environment variables: foo=bar
if $(echo "$arg0" | grep -q -- "^-.*\|.*=.*"); then
echo "unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
exit 1
fi
newPath="$(command -v "$arg0" || true)"

View File

@ -1,12 +1,11 @@
{ stdenv, fetchzip }:
let
version = "20180711";
version = "20180905";
in fetchzip {
name = "iana-etc-${version}";
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "0vbgk3paix2v4rlh90a8yh1l39s322awng06izqj44zcg704fjbj";
sha256 = "1vl3by24xddl267cjq9bcwb7yvfd7gqalwgd5sgx8i7kz9bk40q2";
postFetch = ''
tar -xzvf $downloadedFile --strip-components=1

View File

@ -201,9 +201,7 @@ stdenv.mkDerivation ({
''
else null;
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -210,9 +210,7 @@ stdenv.mkDerivation ({
''
else null;
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -216,9 +216,7 @@ stdenv.mkDerivation ({
)
else null;
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -217,9 +217,7 @@ stdenv.mkDerivation ({
)
else null;
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -190,9 +190,7 @@ stdenv.mkDerivation ({
)
else "");
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];
@ -220,9 +218,7 @@ stdenv.mkDerivation ({
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
# TODO: Use optionalString with next rebuild.
${if (stdenv.cc.isClang && langFortran) then "NIX_CFLAGS_COMPILE" else null} = "-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''

View File

@ -185,9 +185,7 @@ stdenv.mkDerivation ({
)
else "");
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -131,7 +131,7 @@ if test "$noSysDirs" = "1"; then
)
fi
if test -n "${targetConfig-}" -a "$crossStageStatic" == 1; then
if test "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stagae
makeFlagsArray+=(

View File

@ -154,9 +154,7 @@ stdenv.mkDerivation ({
''
else null;
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];

View File

@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';
# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"

View File

@ -119,12 +119,14 @@ in stdenv.mkDerivation (rec {
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
moveToOutput "lib/libLTO${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" \
--replace "\''${_IMPORT_PREFIX}/lib/libLTO.dylib" "$lib/lib/libLTO.dylib"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
'';

View File

@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';
# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"

View File

@ -3,16 +3,16 @@
let
# Note: the version MUST be one version prior to the version we're
# building
version = "1.26.2";
version = "1.28.0";
# fetch hashes by running `print-hashes.sh 1.24.1`
hashes = {
i686-unknown-linux-gnu = "e22286190a074bfb6d47c9fde236d712a53675af1563ba85ea33e0d40165f755";
x86_64-unknown-linux-gnu = "d2b4fb0c544874a73c463993bde122f031c34897bb1eeb653d2ba2b336db83e6";
armv7-unknown-linux-gnueabihf = "1140387a61083e3ef10e7a097269200fc7e9db6f6cc9f270e04319b3b429c655";
aarch64-unknown-linux-gnu = "3dfad0dc9c795f7ee54c2099c9b7edf06b942adbbf02e9ed9e5d4b5e3f1f3759";
i686-apple-darwin = "3a5de30f3e334a66bd320ec0e954961d348434da39a826284e00d55ea60f8370";
x86_64-apple-darwin = "f193705d4c0572a358670dbacbf0ffadcd04b3989728b442f4680fa1e065fa72";
i686-unknown-linux-gnu = "de7cdb4e665e897ea9b10bf6fd545f900683296456d6a11d8510397bb330455f";
x86_64-unknown-linux-gnu = "2a1390340db1d24a9498036884e6b2748e9b4b057fc5219694e298bdaa37b810";
armv7-unknown-linux-gnueabihf = "346558d14050853b87049e5e1fbfae0bf0360a2f7c57433c6985b1a879c349a2";
aarch64-unknown-linux-gnu = "9b6fbcee73070332c811c0ddff399fa31965bec62ef258656c0c90354f6231c1";
i686-apple-darwin = "752e2c9182e057c4a54152d1e0b3949482c225d02bb69d9d9a4127dc2a65fb68";
x86_64-apple-darwin = "5d7a70ed4701fe9410041c1eea025c95cad97e5b3d8acc46426f9ac4f9f02393";
};
platform =

View File

@ -28,6 +28,9 @@ rustPlatform.buildRustPackage rec {
LIBGIT2_SYS_USE_PKG_CONFIG=1;
# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
RUSTC_BOOTSTRAP=1;
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# CFURLSetResourcePropertyForKey is defined in the headers but there's no
# corresponding implementation in the sources from opensource.apple.com.

View File

@ -6,11 +6,11 @@
let
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
version = "1.27.0";
cargoVersion = "1.27.0";
version = "1.29.0";
cargoVersion = "1.29.0";
src = fetchurl {
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
sha256 = "089d7rhw55zpvnw71dj8vil6qrylvl4xjr4m8bywjj83d4zq1f9c";
sha256 = "1sb15znckj8pc8q3g7cq03pijnida6cg64yqmgiayxkzskzk9sx4";
};
in rec {
rustc = callPackage ./rustc.nix {

View File

@ -105,6 +105,11 @@ stdenv.mkDerivation {
# On Hydra: `TcpListener::bind(&addr)`: Address already in use (os error 98)'
sed '/^ *fn fast_rebind()/i#[ignore]' -i src/libstd/net/tcp.rs
# https://github.com/rust-lang/rust/issues/39522
echo removing gdb-version-sensitive tests...
find src/test/debuginfo -type f -execdir grep -q ignore-gdb-version '{}' \; -print -delete
rm src/test/debuginfo/{borrowed-c-style-enum.rs,c-style-enum-in-composite.rs,gdb-pretty-struct-and-enums-pre-gdb-7-7.rs,generic-enum-with-different-disr-sizes.rs}
# Useful debugging parameter
# export VERBOSE=1
'' + optionalString stdenv.isDarwin ''

View File

@ -45,20 +45,20 @@ let
in rec {
vala_0_34 = generic {
major = "0.34";
minor = "17";
sha256 = "0wd2zxww4z1ys4iqz218lvzjqjjqwsaad4x2by8pcyy43sbr7qp2";
minor = "18";
sha256 = "1lhw3ghns059y5d6pdldy5p4yjwlhcls84k892i6qmbhxg34945q";
};
vala_0_36 = generic {
major = "0.36";
minor = "13";
sha256 = "0gxz7yisd9vh5d2889p60knaifz5zndgj98zkdfkkaykdfdq4m9k";
minor = "15";
sha256 = "11lnwjbhiz2l7g6y1f0jb0s81ymgssinlil3alibzcwmzpk175ix";
};
vala_0_38 = generic {
major = "0.38";
minor = "9";
sha256 = "1dh1qacfsc1nr6hxwhn9lqmhnq39rv8gxbapdmj1v65zs96j3fn3";
minor = "10";
sha256 = "1rdwwqs973qv225v8b5izcgwvqn56jxgr4pa3wxxbliar3aww5sw";
extraNativeBuildInputs = [ autoconf ] ++ lib.optional stdenv.isDarwin libtool;
};

View File

@ -37,6 +37,8 @@ let
stdenv.lib.optional crossCompiling "dev";
setOutputFlags = false;
disallowedReferences = [ stdenv.cc ];
patches =
[ ]
# Do not look in /usr etc. for dependencies.
@ -119,6 +121,7 @@ let
--replace "${
if stdenv.cc.cc or null != null then stdenv.cc.cc else "/no-such-path"
}" /no-such-path \
--replace "${stdenv.cc}" /no-such-path \
--replace "$man" /no-such-path
'' + stdenv.lib.optionalString crossCompiling
''

View File

@ -43,6 +43,15 @@ stdenv.mkDerivation rec {
./deterministic-build.patch
];
# Hack hack hack to stop shit from failing from a missing _scproxy on Darwin. Since
# we only use this python for bootstrappy things, it doesn't really matter if it
# doesn't have perfect proxy support in urllib :) this just makes it fall back on env
# vars instead of attempting to read the proxy configuration automatically, so not a
# huge loss even if for whatever reason we did want proxy support.
postPatch = ''
substituteInPlace Lib/urllib.py --replace "if sys.platform == 'darwin'" "if False"
'';
DETERMINISTIC_BUILD = 1;
preConfigure = ''

View File

@ -4,14 +4,14 @@
stdenv.mkDerivation rec {
name = "boehm-gc-${version}";
version = "7.6.6";
version = "7.6.8";
src = fetchurl {
urls = [
"http://www.hboehm.info/gc/gc_source/gc-${version}.tar.gz"
"https://github.com/ivmai/bdwgc/releases/download/v${version}/gc-${version}.tar.gz"
];
sha256 = "1p1r015a7jbpvkkbgzv1y8nxrbbp6dg0mq3ksi6ji0qdz3wfss79";
sha256 = "0n720a0i584ghcwmdsjiq6bl9ig0p9mrja29rp4cgsqvpz6wa2h4";
};
buildInputs = [ libatomic_ops ];

View File

@ -36,15 +36,15 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-openssl=${openssl.dev}"
"--with-plugindir=${placeholder "out"}/lib/sasl2"
"--with-saslauthd=/run/saslauthd"
"--enable-login"
"--enable-shared"
] ++ lib.optional enableLdap "--with-ldap=${openldap.dev}";
# Set this variable at build-time to make sure $out can be evaluated.
preConfigure = ''
configureFlagsArray=( --with-plugindir=$out/lib/sasl2
--with-saslauthd=/run/saslauthd
--enable-login
)
'';
# Avoid triggering regenerating using broken autoconf/libtool bits.
# (many distributions carry patches to remove/replace, but this works for now)
dontUpdateAutotoolsGnuConfigScripts = if stdenv.hostPlatform.isMusl then true else null;
installFlags = lib.optional stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ];
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
'';
meta = {
homepage = http://cyrusimap.web.cmu.edu/;
homepage = https://www.cyrusimap.org/sasl;
description = "Library for adding authentication support to connection-based protocols";
platforms = platforms.unix;
license = licenses.bsdOriginal;

View File

@ -6,13 +6,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "epoxy-${version}";
version = "1.5.1";
version = "1.5.2";
src = fetchFromGitHub {
owner = "anholt";
repo = "libepoxy";
rev = "${version}";
sha256 = "1811agxr7g9wd832np8sw152j468kg3qydmfkc564v54ncfcgaci";
sha256 = "0frs42s7d3ff2wlw0jns6vb3myx2bhz9m5nkzbnfyn436s2qqls3";
};
outputs = [ "out" "dev" ];

View File

@ -1,20 +1,11 @@
From 4046e0ac8ed93354c01de5f3b5cae790cce70404 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Thu, 29 Mar 2018 07:21:02 -0500
Subject: [PATCH] Explicitly search LIBGL_PATH as fallback, if defined.
---
src/dispatch_common.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index bc2fb94..776237b 100644
index b3e4f5f..303e8f5 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -306,6 +306,18 @@ get_dlopen_handle(void **handle, const char *lib_name, bool exit_on_fail)
pthread_mutex_lock(&api.mutex);
if (!*handle) {
*handle = dlopen(lib_name, RTLD_LAZY | RTLD_LOCAL);
@@ -310,6 +310,19 @@ get_dlopen_handle(void **handle, const char *lib_name, bool exit_on_fail, bool l
flags |= RTLD_NOLOAD;
*handle = dlopen(lib_name, flags);
+#ifdef LIBGL_PATH
+ if (!*handle) {
+ char pathbuf[sizeof(LIBGL_PATH) + 1 + 1024 + 1];
@ -24,12 +15,10 @@ index bc2fb94..776237b 100644
+ fprintf(stderr, "Error prefixing library pathname\n");
+ exit(1);
+ }
+ *handle = dlopen(pathbuf, RTLD_LAZY | RTLD_LOCAL);
+ *handle = dlopen(pathbuf, flags);
+ }
+#endif
+
if (!*handle) {
if (exit_on_fail) {
fprintf(stderr, "Couldn't open %s: %s\n", lib_name, dlerror());
--
2.16.3

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
, alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
, x264, x265, xvidcore, zlib, libopus
, libssh, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
, x264, x265, xvidcore, zlib, libopus, speex
, openglSupport ? false, libGLU_combined ? null
# Build options
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
@ -128,6 +128,7 @@ stdenv.mkDerivation rec {
"--enable-libmp3lame"
(ifMinVer "1.2" "--enable-iconv")
"--enable-libtheora"
(ifMinVer "2.1" "--enable-libssh")
(ifMinVer "0.6" (enableFeature vaapiSupport "vaapi"))
"--enable-vdpau"
"--enable-libvorbis"
@ -141,6 +142,7 @@ stdenv.mkDerivation rec {
"--enable-libxvid"
"--enable-zlib"
(ifMinVer "2.8" "--enable-libopus")
"--enable-libspeex"
(ifMinVer "2.8" "--enable-libx265")
# Developer flags
(enableFeature debugDeveloper "debug")
@ -157,8 +159,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ perl pkgconfig texinfo yasm ];
buildInputs = [
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora
libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex
] ++ optional openglSupport libGLU_combined
++ optional vpxSupport libvpx
++ optionals (!isDarwin && !isAarch32) [ libpulseaudio ] # Need to be fixed on Darwin and ARM

View File

@ -1,13 +1,13 @@
{ stdenv, lib, fetchurl }:
stdenv.mkDerivation rec {
name = "gdbm-1.17";
# FIXME: remove on update to > 1.17
name = "gdbm-1.18";
# FIXME: remove on update to > 1.18
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-Wno-error=return-type" else null;
src = fetchurl {
url = "mirror://gnu/gdbm/${name}.tar.gz";
sha256 = "0zcp2iv5dbab18859a5fvacg8lkp8k4pr9af13kfvami6lpcrn3w";
sha256 = "1kimnv12bzjjhaqk4c8w2j6chdj9c6bg21lchaf7abcyfss2r0mq";
};
doCheck = true; # not cross;

View File

@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl;
enableParallelBuilding = true;
enableParallelChecking = false; # fails sometimes
meta = with lib; {
description = "Well integrated set of translation tools and documentation";

View File

@ -2,7 +2,7 @@
, file, which
, autoreconfHook
, git
, texinfo5
, texinfo
, qtbase ? null
, withPython ? false, swig2 ? null, python ? null
}:
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
[ libgpgerror glib libassuan pth ]
++ lib.optional (qtbase != null) qtbase;
nativeBuildInputs = [ file pkgconfig gnupg autoreconfHook git texinfo5 ]
nativeBuildInputs = [ file pkgconfig gnupg autoreconfHook git texinfo ]
++ lib.optionals withPython [ python swig2 which ];
postPatch =''

View File

@ -2,14 +2,14 @@
stdenv.mkDerivation rec {
name = "libatomic_ops-${version}";
version = "7.6.4";
version = "7.6.6";
src = fetchurl {
urls = [
"http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${version}.tar.gz"
"https://github.com/ivmai/libatomic_ops/releases/download/v${version}/libatomic_ops-${version}.tar.gz"
];
sha256 = "0knxncsjhbknlyy6lx7ycxhpzfk3sykhvicgxyp0rmsxd1d3v0jv";
sha256 = "0x7071z707msvyrv9dmgahd1sghbkw8fpbagvcag6xs8yp2spzlr";
};
outputs = [ "out" "dev" "doc" ];

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl}:
stdenv.mkDerivation (rec {
stdenv.mkDerivation rec {
name = "libdaemon-0.14";
src = fetchurl {
@ -8,6 +8,8 @@ stdenv.mkDerivation (rec {
sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx";
};
patches = [ ./fix-includes.patch ];
configureFlags = [ "--disable-lynx" ]
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
[ # Can't run this test while cross-compiling
@ -16,16 +18,8 @@ stdenv.mkDerivation (rec {
meta = {
description = "Lightweight C library that eases the writing of UNIX daemons";
homepage = http://0pointer.de/lennart/projects/libdaemon/;
license = stdenv.lib.licenses.lgpl2Plus;
platforms = stdenv.lib.platforms.unix;
maintainers = [ ];
};
} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl {
# This patch should be applied unconditionally, but doing so will cause mass rebuild.
patches = ./fix-includes.patch;
})
}

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind-light }:
stdenv.mkDerivation rec {
name = "libdrm-2.4.93";
name = "libdrm-2.4.94";
src = fetchurl {
url = "https://dri.freedesktop.org/libdrm/${name}.tar.bz2";
sha256 = "0g6d9wsnb7lx8r1m4kq8js0wsc5jl20cz1csnlh6z9s8jpfd313f";
sha256 = "1ghn3l1dv1rsp9z6jpmy4ryna1s8rm4xx0ds532041bnlfq5jg5p";
};
outputs = [ "out" "dev" "bin" ];

View File

@ -2,11 +2,11 @@
, python, perl, gdk_pixbuf, libiconv, libintl }:
stdenv.mkDerivation rec {
name = "libgsf-1.14.42";
name = "libgsf-1.14.44";
src = fetchurl {
url = "mirror://gnome/sources/libgsf/1.14/${name}.tar.xz";
sha256 = "1hhdz0ymda26q6bl5ygickkgrh998lxqq4z9i8dzpcvqna3zpzr9";
sha256 = "1ppzfk3zmmgrg9jh8vc4dacddbfngjslq2wpj94pcr3i0c8dxgk8";
};
nativeBuildInputs = [ pkgconfig intltool libintl ];

View File

@ -16,11 +16,11 @@ in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "libinput-${version}";
version = "1.11.3";
version = "1.12.0";
src = fetchurl {
url = "https://www.freedesktop.org/software/libinput/${name}.tar.xz";
sha256 = "01nb1shnl871d939wgfd7nc9svclcnfjfhlq64b4yns2dvcr24gk";
sha256 = "1901wxh9k8kz3krfmvacf8xa8r4idfyisw8d80a2ql0bxiw2pb0m";
};
outputs = [ "bin" "out" "dev" ];
@ -46,12 +46,6 @@ stdenv.mkDerivation rec {
patches = [ ./udev-absolute-path.patch ];
preBuild = ''
# meson setup-hook changes the directory so the files are located one level up
patchShebangs ../udev/parse_hwdb.py
patchShebangs ../test/symbols-leak-test.in
'';
doCheck = testsSupport;
meta = {

View File

@ -5,7 +5,7 @@
udev_rules_config = configuration_data()
-udev_rules_config.set('UDEV_TEST_PATH', '')
+udev_rules_config.set('UDEV_TEST_PATH', udev_dir + '/')
+udev_rules_config.set('UDEV_TEST_PATH', dir_udev + '/')
configure_file(input : 'udev/80-libinput-device-groups.rules.in',
output : '80-libinput-device-groups.rules',
install : true,

View File

@ -36,6 +36,11 @@ stdenv.mkDerivation rec {
url = "https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788.patch";
sha256 = "0kc7vp22qsxidhvmlc6nfamw7k92n0hcfpmwhb3gaksjamwhb2df";
})
(fetchurl {
name = "CVE-2018-13139.patch";
url = "https://github.com/erikd/libsndfile/commit/aaea680337267bfb6d2544da878890ee7f1c5077.patch";
sha256 = "01q3m7pa3xqkh05ijmfgv064v8flkg4p24bgy9wxnc6wfcdifggx";
})
];
nativeBuildInputs = [ pkgconfig ];

View File

@ -19,7 +19,19 @@ stdenv.mkDerivation rec {
doCheck = true;
enableParallelBuilding = true;
/* This seems to cause several random failures like these, which I assume
is because of bad or missing target dependencies in their build system:
./unistdio/test-u16-vasnprintf2.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
FAIL unistdio/test-u16-vasnprintf2.sh (exit status: 1)
FAIL: unistdio/test-u16-vasnprintf3.sh
======================================
./unistdio/test-u16-vasnprintf3.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
FAIL unistdio/test-u16-vasnprintf3.sh (exit status: 1)
*/
enableParallelBuilding = false;
meta = {
homepage = http://www.gnu.org/software/libunistring/;

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
"tcp_open" "tcp_write_queue_order" "tcp_try_write" "tcp_writealot"
"multiple_listen" "delayed_accept"
"shutdown_close_tcp" "shutdown_eof" "shutdown_twice" "callback_stack"
"tty_pty"
"tty_pty" "condvar_5"
] ++ stdenv.lib.optionals stdenv.isAarch32 [
# I observe this test failing with some regularity on ARMv7:
# https://github.com/libuv/libuv/issues/1871

View File

@ -1,73 +0,0 @@
{ stdenv, fetchurl, pkgconfig, intltool, flex, bison
, python, libxml2Python, expat, makedepend, xorg, llvm, libffi, libvdpau
, OpenGL, apple_sdk, Xplugin
}:
let
version = "8.0.5";
self = stdenv.mkDerivation rec {
name = "mesa-${version}";
src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/${version}/MesaLib-${version}.tar.bz2";
sha256 = "0pjs8x51c0i6mawgd4w03lxpyx5fnx7rc8plr8jfsscf9yiqs6si";
};
nativeBuildInputs = [ pkgconfig python makedepend flex bison ];
buildInputs = with xorg; [
glproto dri2proto libXfixes libXi libXmu
intltool expat libxml2Python llvm
presentproto
libX11 libXext libxcb libXt libxshmfence
libffi libvdpau
] ++ stdenv.lib.optionals stdenv.isDarwin [ OpenGL apple_sdk.sdk Xplugin ];
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ OpenGL ];
postUnpack = ''
ln -s darwin $sourceRoot/configs/current
'';
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace bin/mklib --replace g++ clang++
'';
patches = [
./patches/0003-mesa-fix-per-level-max-texture-size-error-checking.patch
./patches/0008-glsl-initialise-const-force-glsl-extension-warning-i.patch
./patches/0009-mesa-test-for-GL_EXT_framebuffer_sRGB-in-glPopAttrib.patch
./patches/0011-Apple-glFlush-is-not-needed-with-CGLFlushDrawable.patch
./patches/0012-glapi-Avoid-heap-corruption-in-_glapi_table.patch
./patches/0013-darwin-Fix-test-for-kCGLPFAOpenGLProfile-support-at-.patch
./patches/1001-appleglx-Improve-error-reporting-if-CGLChoosePixelFo.patch
./patches/1002-darwin-Write-errors-in-choosing-the-pixel-format-to-.patch
./patches/1003-darwin-Guard-Core-Profile-usage-behind-a-testing-env.patch
./patches/patch-src-mapi-vgapi-Makefile.diff
];
postPatch = "patchShebangs .";
configurePhase = ":";
configureFlags = [
# NOTE: Patents expired on June 17 2018.
# For details see: https://www.phoronix.com/scan.php?page=news_item&px=OpenGL-Texture-Float-Freed
"texture-float"
];
makeFlags = "INSTALL_DIR=\${out} CC=cc CXX=c++";
enableParallelBuilding = true;
passthru = { inherit version; };
meta = {
description = "An open source implementation of OpenGL";
homepage = http://www.mesa3d.org/;
license = "bsd";
platforms = stdenv.lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ cstrahan ];
};
};
in self // { driverLink = self; }

View File

@ -1,147 +0,0 @@
From 9cf1afbf8ae87ddbb29b24a0f9f2724e9e2935c1 Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Tue, 4 Sep 2012 20:17:15 -0600
Subject: [PATCH 03/13] mesa: fix per-level max texture size error checking
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is a long-standing omission in Mesa's texture image size checking.
We need to take the mipmap level into consideration when checking if the
width, height and depth are too large.
Fixes the new piglit max-texture-size-level test.
Thanks to Stéphane Marchesin for finding this problem.
Note: This is a candidate for the stable branches.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 771e7b6d884bb4294a89f276a904d90b28efb90a)
---
src/mesa/main/teximage.c | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 3aecc0f..ed22fa9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1251,11 +1251,12 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
switch (target) {
case GL_PROXY_TEXTURE_1D:
- maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
- if (width < 2 * border || width > 2 * border + maxSize)
- return GL_FALSE;
if (level >= ctx->Const.MaxTextureLevels)
return GL_FALSE;
+ maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); /* level zero size */
+ maxSize >>= level; /* level size */
+ if (width < 2 * border || width > 2 * border + maxSize)
+ return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
@@ -1263,13 +1264,14 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
case GL_PROXY_TEXTURE_2D:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
- if (level >= ctx->Const.MaxTextureLevels)
- return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
@@ -1279,15 +1281,16 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
case GL_PROXY_TEXTURE_3D:
+ if (level >= ctx->Const.Max3DTextureLevels)
+ return GL_FALSE;
maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
+ maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
if (depth < 2 * border || depth > 2 * border + maxSize)
return GL_FALSE;
- if (level >= ctx->Const.Max3DTextureLevels)
- return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
@@ -1299,23 +1302,24 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ if (level != 0)
+ return GL_FALSE;
maxSize = ctx->Const.MaxTextureRectSize;
if (width < 0 || width > maxSize)
return GL_FALSE;
if (height < 0 || height > maxSize)
return GL_FALSE;
- if (level != 0)
- return GL_FALSE;
return GL_TRUE;
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ if (level >= ctx->Const.MaxCubeTextureLevels)
+ return GL_FALSE;
maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1);
+ maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
- if (level >= ctx->Const.MaxCubeTextureLevels)
- return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
@@ -1325,13 +1329,14 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 1 || height > ctx->Const.MaxArrayTextureLayers)
return GL_FALSE;
- if (level >= ctx->Const.MaxTextureLevels)
- return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
@@ -1339,15 +1344,16 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
return GL_TRUE;
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ maxSize >>= level;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers)
return GL_FALSE;
- if (level >= ctx->Const.MaxTextureLevels)
- return GL_FALSE;
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
--
1.9.2

View File

@ -1,33 +0,0 @@
From db8cb2250335a93cad6e877e634116e5cd6b42fc Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 13 Mar 2012 14:53:25 +0000
Subject: [PATCH 08/13] glsl: initialise const force glsl extension warning in
fake ctx
valgrind complained about an uninitialised value being used in
glsl_parser_extras.cpp, and this was the one it was giving out about.
Just initialise the value in the fakectx.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48057
(cherry picked from commit b78a77f979b21a84aecb6fa4f19a2ed51a48c306)
---
src/glsl/builtins/tools/generate_builtins.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 72d12bb..bd15c4d 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -156,6 +156,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
fakeCtx.API = API_OPENGL;
fakeCtx.Const.GLSLVersion = 130;
fakeCtx.Extensions.ARB_ES2_compatibility = true;
+ fakeCtx.Const.ForceGLSLExtensionsWarn = false;
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
--
1.9.2

View File

@ -1,28 +0,0 @@
From 2286bd68a832a4d4908d50e1a4496853e1f3305a Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Mon, 27 Aug 2012 21:52:07 -0600
Subject: [PATCH 09/13] mesa: test for GL_EXT_framebuffer_sRGB in glPopAttrib()
To avoid spurious GL_INVALID_ENUM errors if the extension isn't supported.
(cherry picked from commit 1aee8803f83f7ae24d9c2150c70afff2b1ee4c2f)
---
src/mesa/main/attrib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 225ac89..cc384c7 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -993,7 +993,8 @@ _mesa_PopAttrib(void)
_mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
/* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
- _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB, color->sRGBEnabled);
+ if (ctx->Extensions.EXT_framebuffer_sRGB)
+ _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB, color->sRGBEnabled);
}
break;
case GL_CURRENT_BIT:
--
1.9.2

View File

@ -1,29 +0,0 @@
From 9c50093adff0c7531ab32a7ec9ce3b91712b4d20 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 20 Jul 2013 10:25:28 -0700
Subject: [PATCH 11/13] Apple: glFlush() is not needed with CGLFlushDrawable()
<rdar://problem/14496373>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit fa5ed99d8e809fb86e486a40273a4a6971055398)
---
src/glx/apple/apple_glx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
index 56cff64..4e2aa33 100644
--- a/src/glx/apple/apple_glx.c
+++ b/src/glx/apple/apple_glx.c
@@ -132,8 +132,6 @@ apple_glx_swap_buffers(void *ptr)
{
struct apple_glx_context *ac = ptr;
- /* This may not be needed with CGLFlushDrawable: */
- glFlush();
apple_cgl.flush_drawable(ac->context_obj);
}
--
1.9.2

View File

@ -1,28 +0,0 @@
From 629600450b3845a768c0edc92ea3f444d03a2738 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Tue, 20 May 2014 01:37:58 -0700
Subject: [PATCH 12/13] glapi: Avoid heap corruption in _glapi_table
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Chia-I Wu <olv@lunarg.com>
(cherry picked from commit ff5456d1acf6f627a6837be3f3f37c6a268c9e8e)
---
src/mapi/glapi/gen/gl_gentable.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index 5657e32..0d0a02d 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -111,7 +111,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
struct _glapi_table *
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
- struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
+ struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc));
char symboln[512];
if(!disp)
--
1.9.2

View File

@ -1,40 +0,0 @@
From ba59a779ed41e08fa16805c1c60da39885546d0e Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Tue, 20 May 2014 10:53:00 -0700
Subject: [PATCH 13/13] darwin: Fix test for kCGLPFAOpenGLProfile support at
runtime
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 7a109268ab5b3544e7f7b99e84ef1fdf54023fb4)
---
src/glx/apple/apple_visual.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
index 282934f..238c248 100644
--- a/src/glx/apple/apple_visual.c
+++ b/src/glx/apple/apple_visual.c
@@ -73,11 +73,15 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
GLint vsref = 0;
CGLError error = 0;
- /* Request an OpenGL 3.2 profile if one is available */
- if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
- attr[numattr++] = kCGLPFAOpenGLProfile;
- attr[numattr++] = kCGLOGLPVersion_3_2_Core;
- }
+ /* Request an OpenGL 3.2 profile if one is available and supported */
+ attr[numattr++] = kCGLPFAOpenGLProfile;
+ attr[numattr++] = kCGLOGLPVersion_3_2_Core;
+
+ /* Test for kCGLPFAOpenGLProfile support at runtime and roll it out if not supported */
+ attr[numattr] = 0;
+ error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
+ if (error == kCGLBadAttribute)
+ numattr -= 2;
if (offscreen) {
apple_glx_diagnostic
--
1.9.2

View File

@ -1,30 +0,0 @@
From f0702d6e631bb912a230c081463bb51a0dde1bff Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Mon, 12 May 2014 15:38:26 +0100
Subject: [PATCH 1001/1003] appleglx: Improve error reporting if
CGLChoosePixelFormat() didn't find any matching pixel formats.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 002a3a74273b81dfb226e1c3f0a8c18525ed0af4)
---
src/glx/apple/apple_visual.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
index 238c248..c6ede51 100644
--- a/src/glx/apple/apple_visual.c
+++ b/src/glx/apple/apple_visual.c
@@ -167,4 +167,9 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
fprintf(stderr, "error: %s\n", apple_cgl.error_string(error));
abort();
}
+
+ if (!*pfobj) {
+ fprintf(stderr, "No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
+ abort();
+ }
}
--
1.9.2 (Apple Git-49)

View File

@ -1,55 +0,0 @@
From 1b2f877c8ef052b183c1f20ece6c6e4a7bfd237c Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 24 May 2014 14:13:33 -0700
Subject: [PATCH 1002/1003] darwin: Write errors in choosing the pixel format
to the crash log
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 9eb1d36c978a9b15ae2e999c630492dfffd7f165)
---
src/glx/apple/apple_visual.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
index c6ede51..951b213 100644
--- a/src/glx/apple/apple_visual.c
+++ b/src/glx/apple/apple_visual.c
@@ -63,6 +63,16 @@ enum
MAX_ATTR = 60
};
+static char __crashreporter_info_buff__[4096] = { 0 };
+static const char *__crashreporter_info__ __attribute__((__used__)) =
+ &__crashreporter_info_buff__[0];
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+// This is actually a toolchain requirement, but I'm not sure the correct check,
+// but it should be fine to just only include it for Leopard and later. This line
+// just tells the linker to never strip this symbol (such as for space optimization)
+__asm__ (".desc ___crashreporter_info__, 0x10");
+#endif
+
void
apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * mode,
bool * double_buffered, bool * uses_stereo,
@@ -164,12 +174,16 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
if (error) {
- fprintf(stderr, "error: %s\n", apple_cgl.error_string(error));
+ snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
+ "CGLChoosePixelFormat error: %s\n", apple_cgl.error_string(error));
+ fprintf(stderr, "%s", __crashreporter_info_buff__);
abort();
}
if (!*pfobj) {
- fprintf(stderr, "No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
+ snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
+ "No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
+ fprintf(stderr, "%s", __crashreporter_info_buff__);
abort();
}
}
--
1.9.2 (Apple Git-49)

View File

@ -1,69 +0,0 @@
From 9d6e12eb6b06202519e48a7321f32944d7a34b0f Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 24 May 2014 14:08:16 -0700
Subject: [PATCH 1003/1003] darwin: Guard Core Profile usage behind a testing
envvar
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 04ce3be4010305902cc5ae81e8e0c8550d043a1e)
---
src/glx/apple/apple_visual.c | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
index 951b213..046581b 100644
--- a/src/glx/apple/apple_visual.c
+++ b/src/glx/apple/apple_visual.c
@@ -82,16 +82,7 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
int numattr = 0;
GLint vsref = 0;
CGLError error = 0;
-
- /* Request an OpenGL 3.2 profile if one is available and supported */
- attr[numattr++] = kCGLPFAOpenGLProfile;
- attr[numattr++] = kCGLOGLPVersion_3_2_Core;
-
- /* Test for kCGLPFAOpenGLProfile support at runtime and roll it out if not supported */
- attr[numattr] = 0;
- error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
- if (error == kCGLBadAttribute)
- numattr -= 2;
+ bool use_core_profile = getenv("LIBGL_PROFILE_CORE");
if (offscreen) {
apple_glx_diagnostic
@@ -167,12 +158,31 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
attr[numattr++] = mode->samples;
}
+ /* Debugging support for Core profiles to support newer versions of OpenGL */
+ if (use_core_profile) {
+ attr[numattr++] = kCGLPFAOpenGLProfile;
+ attr[numattr++] = kCGLOGLPVersion_3_2_Core;
+ }
+
attr[numattr++] = 0;
assert(numattr < MAX_ATTR);
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
+ if ((error == kCGLBadAttribute || vsref == 0) && use_core_profile) {
+ apple_glx_diagnostic
+ ("Trying again without CoreProfile: error=%s, vsref=%d\n", apple_cgl.error_string(error), vsref);
+
+ if (!error)
+ apple_cgl.destroy_pixel_format(*pfobj);
+
+ numattr -= 3;
+ attr[numattr++] = 0;
+
+ error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
+ }
+
if (error) {
snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
"CGLChoosePixelFormat error: %s\n", apple_cgl.error_string(error));
--
1.9.2 (Apple Git-49)

View File

@ -1,11 +0,0 @@
--- a/src/mapi/vgapi/Makefile 2012-11-30 12:06:24.000000000 -0500
+++ b/src/mapi/vgapi/Makefile 2012-11-30 12:06:52.000000000 -0500
@@ -75,6 +75,8 @@
install-headers:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/VG
$(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_INC_DIR)/VG
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/KHR
+ $(INSTALL) -m 644 $(TOP)/include/KHR/*.h $(DESTDIR)$(INSTALL_INC_DIR)/KHR
install: default install-headers install-pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)

View File

@ -0,0 +1,76 @@
diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
index 45cb6075e6..62937311b9 100644
--- a/include/c11/threads_posix.h
+++ b/include/c11/threads_posix.h
@@ -36,6 +36,11 @@
#include <sched.h>
#include <stdint.h> /* for intptr_t */
+#ifdef __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+#endif
+
/*
Configuration macro:
@@ -383,12 +388,25 @@ tss_set(tss_t key, void *val)
/*-------------------- 7.25.7 Time functions --------------------*/
// 7.25.6.1
#ifndef HAVE_TIMESPEC_GET
+
static inline int
timespec_get(struct timespec *ts, int base)
{
if (!ts) return 0;
if (base == TIME_UTC) {
+#ifdef __MACH__
+ if (ts != NULL) {
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
+ clock_get_time(cclock, &mts);
+ mach_port_deallocate(mach_task_self(), cclock);
+ ts->tv_sec = mts.tv_sec;
+ ts->tv_nsec = mts.tv_nsec;
+ }
+#else
clock_gettime(CLOCK_REALTIME, ts);
+#endif
return base;
}
return 0;
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 1208ebb315..e1378fb1f0 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -65,6 +65,11 @@
#include "util/u_vector.h"
#include "mapi/glapi/glapi.h"
+#ifdef __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+#endif
+
#define NUM_ATTRIBS 12
static void
@@ -3092,7 +3097,17 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
/* We override the clock to monotonic when creating the condition
* variable. */
+#ifdef __MACH__
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
+ clock_get_time(cclock, &mts);
+ mach_port_deallocate(mach_task_self(), cclock);
+ current.tv_sec = mts.tv_sec;
+ current.tv_nsec = mts.tv_nsec;
+#else
clock_gettime(CLOCK_MONOTONIC, &current);
+#endif
/* calculating when to expire */
expire.tv_nsec = timeout % 1000000000L;

View File

@ -8,6 +8,8 @@
, galliumDrivers ? null
, driDrivers ? null
, vulkanDrivers ? null
, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ]
, OpenGL, Xplugin
}:
/** Packaging design:
@ -29,19 +31,21 @@ else
let
defaultGalliumDrivers =
if stdenv.isAarch32
optionals (builtins.elem "drm" eglPlatforms)
(if stdenv.isAarch32
then ["virgl" "nouveau" "freedreno" "vc4" "etnaviv" "imx"]
else if stdenv.isAarch64
then ["virgl" "nouveau" "vc4" ]
else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"];
else ["virgl" "svga" "i915" "r300" "r600" "radeonsi" "nouveau"]);
defaultDriDrivers =
if (stdenv.isAarch32 || stdenv.isAarch64)
optionals (builtins.elem "drm" eglPlatforms)
(if (stdenv.isAarch32 || stdenv.isAarch64)
then ["nouveau"]
else ["i915" "i965" "nouveau" "radeon" "r200"];
else ["i915" "i965" "nouveau" "radeon" "r200"]);
defaultVulkanDrivers =
if (stdenv.isAarch32 || stdenv.isAarch64)
optionals stdenv.isLinux (if (stdenv.isAarch32 || stdenv.isAarch64)
then []
else ["intel"] ++ lib.optional enableRadv "radeon";
else ["intel"] ++ lib.optional enableRadv "radeon");
in
let gallium_ = galliumDrivers; dri_ = driDrivers; vulkan_ = vulkanDrivers; in
@ -51,11 +55,11 @@ let
(if gallium_ == null
then defaultGalliumDrivers
else gallium_)
++ ["swrast" "virgl"];
++ lib.optional stdenv.isLinux "swrast";
driDrivers =
(if dri_ == null
then defaultDriDrivers
else dri_) ++ ["swrast"];
then optionals (elem "drm" eglPlatforms) defaultDriDrivers
else dri_) ++ lib.optional stdenv.isLinux "swrast";
vulkanDrivers =
if vulkan_ == null
then defaultVulkanDrivers
@ -63,7 +67,7 @@ let
in
let
version = "18.1.7";
version = "18.2.1";
branch = head (splitString "." version);
in
@ -77,7 +81,7 @@ let self = stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
"https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
];
sha256 = "655e3b32ce3bdddd5e6e8768596e5d4bdef82d0dd37067c324cc4b2daa207306";
sha256 = "0mhhr1id11s1fbdxbvr4a81xjh1nsznpra9dl36bv2hq7mpxqdln";
};
prePatch = "patchShebangs .";
@ -89,9 +93,10 @@ let self = stdenv.mkDerivation {
./symlink-drivers.patch
./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
./disk_cache-include-dri-driver-path-in-cache-key.patch
];
] ++ lib.optional stdenv.isDarwin ./darwin-clock-gettime.patch;
outputs = [ "out" "dev" "drivers" "osmesa" ];
outputs = [ "out" "dev" "drivers" ]
++ lib.optional (elem "swrast" galliumDrivers) "osmesa";
# TODO: Figure out how to enable opencl without having a runtime dependency on clang
configureFlags = [
@ -99,19 +104,11 @@ let self = stdenv.mkDerivation {
"--localstatedir=/var"
"--with-dri-driverdir=$(drivers)/lib/dri"
"--with-dri-searchpath=${libglvnd.driverLink}/lib/dri"
"--with-platforms=x11,wayland,drm"
"--with-platforms=${concatStringsSep "," eglPlatforms}"
"--with-gallium-drivers=${concatStringsSep "," galliumDrivers}"
"--with-dri-drivers=${concatStringsSep "," driDrivers}"
"--with-vulkan-drivers=${concatStringsSep "," vulkanDrivers}"
"--enable-texture-float"
]
++ (optional (galliumDrivers != [])
("--with-gallium-drivers=" +
builtins.concatStringsSep "," galliumDrivers))
++ (optional (driDrivers != [])
("--with-dri-drivers=" +
builtins.concatStringsSep "," driDrivers))
++ (optional (vulkanDrivers != [])
("--with-vulkan-drivers=" +
builtins.concatStringsSep "," vulkanDrivers))
++ [
(enableFeature stdenv.isLinux "dri3")
(enableFeature stdenv.isLinux "nine") # Direct3D in Wine
"--enable-libglvnd"
@ -122,17 +119,18 @@ let self = stdenv.mkDerivation {
"--enable-glx"
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
(enableFeature (!stdenv.hostPlatform.isMusl) "glx-tls")
"--enable-gallium-osmesa" # used by wine
# used by wine
(enableFeature (elem "swrast" galliumDrivers) "gallium-osmesa")
"--enable-llvm"
"--enable-egl"
"--enable-xa" # used in vmware driver
"--enable-gbm"
(enableFeature stdenv.isLinux "egl")
(enableFeature stdenv.isLinux "xa") # used in vmware driver
(enableFeature stdenv.isLinux "gbm")
"--enable-xvmc"
"--enable-vdpau"
"--enable-shared-glapi"
"--enable-llvm-shared-libs"
"--enable-omx-bellagio"
"--enable-va"
(enableFeature stdenv.isLinux "omx-bellagio")
(enableFeature stdenv.isLinux "va")
"--disable-opencl"
];
@ -140,16 +138,18 @@ let self = stdenv.mkDerivation {
propagatedBuildInputs = with xorg;
[ libXdamage libXxf86vm ]
++ optional stdenv.isLinux libdrm;
++ optional stdenv.isLinux libdrm
++ optionals stdenv.isDarwin [ OpenGL Xplugin ];
buildInputs = with xorg; [
expat llvmPackages.llvm libglvnd
glproto dri2proto dri3proto presentproto
libX11 libXext libxcb libXt libXfixes libxshmfence
libffi wayland wayland-protocols libvdpau libelf libXvMC
libomxil-bellagio libva-minimal libpthreadstubs openssl/*or another sha1 provider*/
libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
libffi libvdpau libelf libXvMC
libpthreadstubs openssl/*or another sha1 provider*/
valgrind-light python2 python2.pkgs.Mako
];
] ++ lib.optionals stdenv.isLinux [ wayland wayland-protocols
libomxil-bellagio libva-minimal ];
enableParallelBuilding = true;
doCheck = false;
@ -161,7 +161,7 @@ let self = stdenv.mkDerivation {
];
# TODO: probably not all .la files are completely fixed, but it shouldn't matter;
postInstall = ''
postInstall = optionalString (galliumDrivers != []) ''
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
mv -t "$drivers/lib/" \
$out/lib/libXvMC* \
@ -215,7 +215,7 @@ let self = stdenv.mkDerivation {
# TODO:
# check $out doesn't depend on llvm: builder failures are ignored
# for some reason grep -qv '${llvmPackages.llvm}' -R "$out";
postFixup = ''
postFixup = optionalString (galliumDrivers != []) ''
# add RPATH so the drivers can find the moved libgallium and libdricore9
# moved here to avoid problems with stripping patchelfed files
for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
@ -235,7 +235,9 @@ let self = stdenv.mkDerivation {
# Use stub libraries from libglvnd and headers from Mesa.
buildCommand = ''
ln -s ${libglvnd.out} $out
mkdir -p $out/nix-support
ln -s ${libglvnd.out}/lib $out/lib
mkdir -p $dev/{,lib/pkgconfig,nix-support}
echo "$out" > $dev/nix-support/propagated-build-inputs
ln -s ${self.dev}/include $dev/include
@ -257,6 +259,8 @@ let self = stdenv.mkDerivation {
genPkgConfig egl EGL
genPkgConfig glesv1_cm GLESv1_CM
genPkgConfig glesv2 GLESv2
'' + lib.optionalString stdenv.isDarwin ''
echo ${OpenGL} > $out/nix-support/propagated-build-inputs
'';
};
};
@ -265,7 +269,7 @@ let self = stdenv.mkDerivation {
description = "An open source implementation of OpenGL";
homepage = https://www.mesa3d.org/;
license = licenses.mit; # X11 variant, in most files
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ vcunat ];
};
};

View File

@ -32,16 +32,6 @@
#include <unistd.h>
#include <fcntl.h>
#else
--- ./src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ ./src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -37,6 +37,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include <time.h>
#include "util/u_atomic.h"
#include "util/list.h"
--- ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+++ ./src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
@@ -28,6 +28,8 @@

View File

@ -22,10 +22,9 @@ stdenv.mkDerivation rec {
unset CPP
'';
# Use `lib.optionalString` next mass rebuild.
makeFlags = if stdenv.buildPlatform == stdenv.hostPlatform
then null
else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
makeFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
meta = with stdenv.lib; {
homepage = https://fedorahosted.org/newt/;

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl
, CoreServices ? null }:
let version = "4.19"; in
let version = "4.20"; in
stdenv.mkDerivation {
name = "nspr-${version}";
src = fetchurl {
url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
sha256 = "0agpv3f17h8kmzi0ifibaaxc1k3xc0q61wqw3l6r2xr2z8bmkn9f";
sha256 = "0vjms4j75zvv5b2siyafg7hh924ysx2cwjad8spzp7x87n8n929c";
};
outputs = [ "out" "dev" ];

View File

@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
./parallel-configure.patch
./clang-5-darwin.patch
./qt-4.8.7-unixmake-darwin.patch
./kill-legacy-darwin-apis.patch
(substituteAll {
src = ./dlopen-absolute-paths.diff;
cups = if cups != null then lib.getLib cups else null;

View File

@ -0,0 +1,330 @@
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 4a9049b..c0ac9db 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -242,9 +242,8 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
#else
char *ret = 0;
# if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
- // When using -mmacosx-version-min=10.4, we get the legacy realpath implementation,
- // which does not work properly with the realpath(X,0) form. See QTBUG-28282.
- if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
+ // In Nix-on-Darwin, we don't support ancient macOS anyway, and the deleted branch relies on
+ // a symbol that's been deprecated for years and that our CF doesn't have
ret = (char*)malloc(PATH_MAX + 1);
if (ret && realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {
const int savedErrno = errno; // errno is checked below, and free() might change it
@@ -252,19 +251,6 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
errno = savedErrno;
ret = 0;
}
- } else {
- // on 10.5 we can use FSRef to resolve the file path.
- QString path = QDir::cleanPath(entry.filePath());
- FSRef fsref;
- if (FSPathMakeRef((const UInt8 *)path.toUtf8().data(), &fsref, 0) == noErr) {
- CFURLRef urlref = CFURLCreateFromFSRef(NULL, &fsref);
- CFStringRef canonicalPath = CFURLCopyFileSystemPath(urlref, kCFURLPOSIXPathStyle);
- QString ret = QCFString::toQString(canonicalPath);
- CFRelease(canonicalPath);
- CFRelease(urlref);
- return QFileSystemEntry(ret);
- }
- }
# else
# if _POSIX_VERSION >= 200801L
ret = realpath(entry.nativeFilePath().constData(), (char*)0);
diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.h b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
index 3bf7342..b6bcfc0 100644
--- a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
+++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
@@ -43,7 +43,6 @@ BOOL stringIsCaseInsensitiveEqualToString(NSString *first, NSString *second);
BOOL hasCaseInsensitiveSuffix(NSString *string, NSString *suffix);
BOOL hasCaseInsensitiveSubstring(NSString *string, NSString *substring);
NSString *filenameByFixingIllegalCharacters(NSString *string);
-CFStringEncoding stringEncodingForResource(Handle resource);
#ifdef __cplusplus
}
diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
index d6c3f0c..c88ca76 100644
--- a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
+++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
@@ -68,45 +68,4 @@ BOOL hasCaseInsensitiveSubstring(NSString *string, NSString *substring)
return filename;
}
-CFStringEncoding stringEncodingForResource(Handle resource)
-{
- short resRef = HomeResFile(resource);
- if (ResError() != noErr)
- return NSMacOSRomanStringEncoding;
-
- // Get the FSRef for the current resource file
- FSRef fref;
- OSStatus error = FSGetForkCBInfo(resRef, 0, NULL, NULL, NULL, &fref, NULL);
- if (error != noErr)
- return NSMacOSRomanStringEncoding;
-
- RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateFromFSRef(NULL, &fref));
- if (!url)
- return NSMacOSRomanStringEncoding;
-
- NSString *path = [(NSURL *)url.get() path];
-
- // Get the lproj directory name
- path = [path stringByDeletingLastPathComponent];
- if (!stringIsCaseInsensitiveEqualToString([path pathExtension], @"lproj"))
- return NSMacOSRomanStringEncoding;
-
- NSString *directoryName = [[path stringByDeletingPathExtension] lastPathComponent];
- RetainPtr<CFStringRef> locale(AdoptCF, CFLocaleCreateCanonicalLocaleIdentifierFromString(NULL, (CFStringRef)directoryName));
- if (!locale)
- return NSMacOSRomanStringEncoding;
-
- LangCode lang;
- RegionCode region;
- error = LocaleStringToLangAndRegionCodes([(NSString *)locale.get() UTF8String], &lang, &region);
- if (error != noErr)
- return NSMacOSRomanStringEncoding;
-
- TextEncoding encoding;
- error = UpgradeScriptInfoToTextEncoding(kTextScriptDontCare, lang, region, NULL, &encoding);
- if (error != noErr)
- return NSMacOSRomanStringEncoding;
-
- return encoding;
-}
diff --git a/src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginPackageMac.cpp b/src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginPackageMac.cpp
index 865ea32..20bda8d 100644
--- a/src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginPackageMac.cpp
+++ b/src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginPackageMac.cpp
@@ -101,33 +101,6 @@ static WTF::RetainPtr<CFDictionaryRef> readPListFile(CFStringRef fileName, bool
return map;
}
-static Vector<String> stringListFromResourceId(SInt16 id)
-{
- Vector<String> list;
-
- Handle handle = Get1Resource('STR#', id);
- if (!handle)
- return list;
-
- CFStringEncoding encoding = stringEncodingForResource(handle);
-
- unsigned char* p = (unsigned char*)*handle;
- if (!p)
- return list;
-
- SInt16 count = *(SInt16*)p;
- p += sizeof(SInt16);
-
- for (SInt16 i = 0; i < count; ++i) {
- unsigned char length = *p;
- WTF::RetainPtr<CFStringRef> str = CFStringCreateWithPascalString(0, p, encoding);
- list.append(str.get());
- p += 1 + length;
- }
-
- return list;
-}
-
bool PluginPackage::fetchInfo()
{
if (!load())
@@ -202,36 +175,8 @@ bool PluginPackage::fetchInfo()
m_description = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(m_module, CFSTR("WebPluginDescription"));
} else {
- int resFile = CFBundleOpenBundleResourceMap(m_module);
-
- UseResFile(resFile);
-
- Vector<String> mimes = stringListFromResourceId(MIMEListStringStringNumber);
-
- if (mimes.size() % 2 != 0)
- return false;
-
- Vector<String> descriptions = stringListFromResourceId(MIMEDescriptionStringNumber);
- if (descriptions.size() != mimes.size() / 2)
- return false;
-
- for (size_t i = 0; i < mimes.size(); i += 2) {
- String mime = mimes[i].lower();
- Vector<String> extensions;
- mimes[i + 1].lower().split(UChar(','), extensions);
-
- m_mimeToExtensions.set(mime, extensions);
-
- m_mimeToDescriptions.set(mime, descriptions[i / 2]);
- }
-
- Vector<String> names = stringListFromResourceId(PluginNameOrDescriptionStringNumber);
- if (names.size() == 2) {
- m_description = names[0];
- m_name = names[1];
- }
-
- CFBundleCloseBundleResourceMap(m_module, resFile);
+ LOG(Plugins, "Nix removed ancient code that relies on long-deprecated functionality that we don't want to support!");
+ return false;
}
LOG(Plugins, "PluginPackage::fetchInfo(): Found plug-in '%s'", m_name.utf8().data());
diff --git a/src/3rdparty/webkit/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm b/src/3rdparty/webkit/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
index b206e48..669d442 100644
--- a/src/3rdparty/webkit/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
+++ b/src/3rdparty/webkit/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
@@ -26,7 +26,6 @@
#import "config.h"
#import "NetscapePluginModule.h"
-#import <WebCore/WebCoreNSStringExtras.h>
#import <wtf/HashSet.h>
using namespace WebCore;
@@ -196,132 +195,6 @@ static bool getPluginInfoFromPropertyLists(CFBundleRef bundle, PluginInfo& plugi
return true;
}
-class ResourceMap {
-public:
- explicit ResourceMap(CFBundleRef bundle)
- : m_bundle(bundle)
- , m_currentResourceFile(CurResFile())
- , m_bundleResourceMap(CFBundleOpenBundleResourceMap(m_bundle))
- {
- UseResFile(m_bundleResourceMap);
- }
-
- ~ResourceMap()
- {
- // Close the resource map.
- CFBundleCloseBundleResourceMap(m_bundle, m_bundleResourceMap);
-
- // And restore the old resource.
- UseResFile(m_currentResourceFile);
- }
-
- bool isValid() const { return m_bundleResourceMap != -1; }
-
-private:
- CFBundleRef m_bundle;
- ResFileRefNum m_currentResourceFile;
- ResFileRefNum m_bundleResourceMap;
-};
-
-static bool getStringListResource(ResID resourceID, Vector<String>& stringList) {
- Handle stringListHandle = Get1Resource('STR#', resourceID);
- if (!stringListHandle || !*stringListHandle)
- return false;
-
- // Get the string list size.
- Size stringListSize = GetHandleSize(stringListHandle);
- if (stringListSize < static_cast<Size>(sizeof(UInt16)))
- return false;
-
- CFStringEncoding stringEncoding = stringEncodingForResource(stringListHandle);
-
- unsigned char* ptr = reinterpret_cast<unsigned char*>(*stringListHandle);
- unsigned char* end = ptr + stringListSize;
-
- // Get the number of strings in the string list.
- UInt16 numStrings = *reinterpret_cast<UInt16*>(ptr);
- ptr += sizeof(UInt16);
-
- for (UInt16 i = 0; i < numStrings; ++i) {
- // We're past the end of the string, bail.
- if (ptr >= end)
- return false;
-
- // Get the string length.
- unsigned char stringLength = *ptr++;
-
- RetainPtr<CFStringRef> cfString(AdoptCF, CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, ptr, stringLength, stringEncoding, false, kCFAllocatorNull));
- if (!cfString.get())
- return false;
-
- stringList.append(cfString.get());
- ptr += stringLength;
- }
-
- if (ptr != end)
- return false;
-
- return true;
-}
-
-static const ResID PluginNameOrDescriptionStringNumber = 126;
-static const ResID MIMEDescriptionStringNumber = 127;
-static const ResID MIMEListStringStringNumber = 128;
-
-static bool getPluginInfoFromCarbonResources(CFBundleRef bundle, PluginInfo& pluginInfo)
-{
- ResourceMap resourceMap(bundle);
- if (!resourceMap.isValid())
- return false;
-
- // Get the description and name string list.
- Vector<String> descriptionAndName;
- if (!getStringListResource(PluginNameOrDescriptionStringNumber, descriptionAndName))
- return false;
-
- // Get the MIME types and extensions string list. This list needs to be a multiple of two.
- Vector<String> mimeTypesAndExtensions;
- if (!getStringListResource(MIMEListStringStringNumber, mimeTypesAndExtensions))
- return false;
-
- if (mimeTypesAndExtensions.size() % 2)
- return false;
-
- // Now get the MIME type descriptions string list. This string list needs to be the same length as the number of MIME types.
- Vector<String> mimeTypeDescriptions;
- if (!getStringListResource(MIMEDescriptionStringNumber, mimeTypeDescriptions))
- return false;
-
- // Add all MIME types.
- for (size_t i = 0; i < mimeTypesAndExtensions.size() / 2; ++i) {
- MimeClassInfo mimeClassInfo;
-
- const String& mimeType = mimeTypesAndExtensions[i * 2];
- String description;
- if (i < mimeTypeDescriptions.size())
- description = mimeTypeDescriptions[i];
-
- mimeClassInfo.type = mimeType.lower();
- mimeClassInfo.desc = description;
-
- Vector<String> extensions;
- mimeTypesAndExtensions[i * 2 + 1].split(',', extensions);
-
- for (size_t i = 0; i < extensions.size(); ++i)
- mimeClassInfo.extensions.append(extensions[i].lower());
-
- pluginInfo.mimes.append(mimeClassInfo);
- }
-
- // Set the description and name if they exist.
- if (descriptionAndName.size() > 0)
- pluginInfo.desc = descriptionAndName[0];
- if (descriptionAndName.size() > 1)
- pluginInfo.name = descriptionAndName[1];
-
- return true;
-}
-
bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginInfoStore::Plugin& plugin)
{
RetainPtr<CFStringRef> bundlePath(AdoptCF, pluginPath.createCFString());
@@ -344,8 +217,7 @@ static bool getPluginInfoFromCarbonResources(CFBundleRef bundle, PluginInfo& plu
return false;
// Check that there's valid info for this plug-in.
- if (!getPluginInfoFromPropertyLists(bundle.get(), plugin.info) &&
- !getPluginInfoFromCarbonResources(bundle.get(), plugin.info))
+ if (!getPluginInfoFromPropertyLists(bundle.get(), plugin.info))
return false;
plugin.path = pluginPath;

View File

@ -79,12 +79,12 @@ let
in
stdenv.mkDerivation rec {
name = "openblas-${version}";
version = "0.3.1";
version = "0.3.3";
src = fetchFromGitHub {
owner = "xianyi";
repo = "OpenBLAS";
rev = "v${version}";
sha256 = "1dkwp4gz1hzpmhzks9y9ipb4c5h0r6c7yff62x3s8x9z6f8knaqc";
sha256 = "0cpkvfvc14xm9mifrm919rp8vrq70gpl7r2sww4f0izrl39wklwx";
};
inherit blas64;
@ -118,20 +118,7 @@ stdenv.mkDerivation rec {
] ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "musl") "NO_AFFINITY=1"
++ mapAttrsToList (var: val: var + "=" + val) config;
patches = [
# Backport of https://github.com/xianyi/OpenBLAS/pull/1667, which
# is causing problems and was already accepted upstream.
(fetchpatch {
url = "https://github.com/xianyi/OpenBLAS/commit/5f2a3c05cd0e3872be3c5686b9da6b627658eeb7.patch";
sha256 = "1qvxhk92likrshw6z6hjqxvkblwzgsbzis2b2f71bsvx9174qfk1";
})
# Double "MAX_ALLOCATING_THREADS", fix with Go and Octave
# https://github.com/xianyi/OpenBLAS/pull/1663 (see also linked issue)
(fetchpatch {
url = "https://github.com/xianyi/OpenBLAS/commit/a49203b48c4a3d6f86413fc8c4b1fbfaa1946463.patch";
sha256 = "0v6kjkbgbw7hli6xkism48wqpkypxmcqvxpx564snll049l2xzq2";
})
];
patches = [];
doCheck = true;
checkTarget = "tests";
@ -140,7 +127,7 @@ stdenv.mkDerivation rec {
# Write pkgconfig aliases. Upstream report:
# https://github.com/xianyi/OpenBLAS/issues/1740
for alias in blas cblas lapack; do
cat <<EOF > $out/lib/pkgconfig/openblas-$alias.pc
cat <<EOF > $out/lib/pkgconfig/$alias.pc
Name: $alias
Version: ${version}
Description: $alias provided by the OpenBLAS package.

View File

@ -21,7 +21,9 @@ buildPythonPackage rec {
(stdenv.lib.optionals (!isPy3k) [ trollius futures ]);
checkPhase = ''
runHook preCheck
USE_TWISTED=true py.test $out
runHook postCheck
'';
meta = with stdenv.lib; {

View File

@ -11,7 +11,8 @@ buildPythonPackage rec {
};
disabled = isPyPy;
buildInputs = [ gfortran pytest blas ];
nativeBuildInputs = [ gfortran pytest ];
buildInputs = [ blas ];
patches = lib.optionals (python.hasDistutilsCxxPatch or false) [
# We patch cpython/distutils to fix https://bugs.python.org/issue1222585

View File

@ -11,6 +11,41 @@
, glibcLocales
}:
with stdenv.lib;
let
# https://github.com/pyca/pyopenssl/issues/791
# These tests, we disable in the case that libressl is passed in as openssl.
failingLibresslTests = [
"test_op_no_compression"
"test_npn_advertise_error"
"test_npn_select_error"
"test_npn_client_fail"
"test_npn_success"
"test_use_certificate_chain_file_unicode"
"test_use_certificate_chain_file_bytes"
"test_add_extra_chain_cert"
"test_set_session_id_fail"
"test_verify_with_revoked"
"test_set_notAfter"
"test_set_notBefore"
];
disabledTests = [
# https://github.com/pyca/pyopenssl/issues/692
# These tests, we disable always.
"test_set_default_verify_paths"
"test_fallback_default_verify_paths"
] ++ (optionals (hasPrefix "libressl" openssl.meta.name) failingLibresslTests);
# Compose the final string expression, including the "-k" and the single quotes.
testExpression = optionalString (disabledTests != [])
"-k 'not ${concatStringsSep " and not " disabledTests}'";
in
buildPythonPackage rec {
pname = "pyOpenSSL";
version = "18.0.0";
@ -22,16 +57,10 @@ buildPythonPackage rec {
outputs = [ "out" "dev" ];
preCheck = ''
sed -i 's/test_set_default_verify_paths/noop/' tests/test_ssl.py
# https://github.com/pyca/pyopenssl/issues/692
sed -i 's/test_fallback_default_verify_paths/noop/' tests/test_ssl.py
'';
checkPhase = ''
runHook preCheck
export LANG="en_US.UTF-8"
py.test
py.test tests ${testExpression}
runHook postCheck
'';

View File

@ -29,9 +29,11 @@ buildPythonPackage rec {
# Remove .pytest_cache when using py.test in a Nix build
setupHook = writeText "pytest-hook" ''
postFixupHooks+=(
'find $out -name .pytest_cache -type d -exec rm -rf {} +'
)
pytestcachePhase() {
find $out -name .pytest_cache -type d -exec rm -rf {} +
}
preDistPhases+=" pytestcachePhase"
'';
meta = with stdenv.lib; {

View File

@ -42,6 +42,22 @@ in buildPythonPackage rec {
export CUDNN_INCLUDE_DIR=${cudnn}/include
'';
preFixup = ''
function join_by { local IFS="$1"; shift; echo "$*"; }
function strip2 {
IFS=':'
read -ra RP <<< $(patchelf --print-rpath $1)
IFS=' '
RP_NEW=$(join_by : ''${RP[@]:2})
patchelf --set-rpath \$ORIGIN:''${RP_NEW} "$1"
}
for f in $(find ''${out} -name 'libcaffe2*.so')
do
strip2 $f
done
'';
buildInputs = [
cmake
numpy.blas
@ -56,7 +72,7 @@ in buildPythonPackage rec {
] ++ lib.optional (pythonOlder "3.5") typing;
checkPhase = ''
${cudaStubEnv}python test/run_test.py --exclude distributed autograd distributions jit sparse torch utils nn
${cudaStubEnv}python test/run_test.py --exclude dataloader sparse torch utils
'';
meta = {

View File

@ -10,7 +10,8 @@ buildPythonPackage rec {
};
checkInputs = [ nose pytest ];
buildInputs = [ gfortran numpy.blas ];
nativeBuildInputs = [ gfortran ];
buildInputs = [ numpy.blas ];
propagatedBuildInputs = [ numpy ];
# Remove tests because of broken wrapper

View File

@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ perl gdb ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ bootstrap_cmds xnu ];
enableParallelBuilding = true;
separateDebugInfo = stdenv.isLinux;
preConfigure = stdenv.lib.optionalString stdenv.isDarwin (
let OSRELEASE = ''

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, python, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
{ stdenv, fetchFromGitHub, python, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "ninja-${version}";
@ -11,10 +13,11 @@ stdenv.mkDerivation rec {
sha256 = "16scq9hcq6c5ap6sy8j4qi75qps1zvrf3p79j1vbrvnqzp928i5f";
};
nativeBuildInputs = [ python asciidoc docbook_xml_dtd_45 docbook_xsl libxslt.bin re2c ];
nativeBuildInputs = [ python ] ++ optionals buildDocs [ asciidoc docbook_xml_dtd_45 docbook_xsl libxslt.bin re2c ];
buildPhase = ''
python configure.py --bootstrap
'' + optionalString buildDocs ''
# "./ninja -vn manual" output copied here to support cross compilation.
asciidoc -b docbook -d book -o build/manual.xml doc/manual.asciidoc
xsltproc --nonet doc/docbook.xsl build/manual.xml > doc/manual.html
@ -22,14 +25,15 @@ stdenv.mkDerivation rec {
installPhase = ''
install -Dm555 -t $out/bin ninja
install -Dm444 -t $out/share/doc/ninja doc/manual.asciidoc doc/manual.html
install -Dm444 misc/bash-completion $out/share/bash-completion/completions/ninja
install -Dm444 misc/zsh-completion $out/share/zsh/site-functions/_ninja
'' + optionalString buildDocs ''
install -Dm444 -t $out/share/doc/ninja doc/manual.asciidoc doc/manual.html
'';
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
meta = {
description = "Small build system with a focus on speed";
longDescription = ''
Ninja is a small build system with a focus on speed. It differs from

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, autoreconfHook, pkgconfig, perl, python, libxml2Python, libxslt, which
, docbook_xml_dtd_43, docbook_xsl, gnome-doc-utils, dblatex, gettext, itstool
, docbook_xml_dtd_43, docbook_xsl, gnome-doc-utils, gettext, itstool
, withDblatex ? false, dblatex
}:
stdenv.mkDerivation rec {
@ -20,8 +21,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs =
[ pkgconfig perl python libxml2Python libxslt docbook_xml_dtd_43 docbook_xsl
gnome-doc-utils dblatex gettext which itstool
];
gnome-doc-utils gettext which itstool
] ++ stdenv.lib.optional withDblatex dblatex;
configureFlags = [ "--disable-scrollkeeper" ];

View File

@ -19,7 +19,6 @@ stdenv.mkDerivation rec {
patches = optional (!vanilla) ./requires-private.patch
++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
preConfigure = ""; # TODO(@Ericson2314): Remove next mass rebuild
buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ]

View File

@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
inherit sha256;
};
# TODO: fix on mass rebuild
${if interactive then "patches" else null} = optional (version == "6.5") ./perl.patch;
patches = optional (version == "6.5") ./perl.patch;
# We need a native compiler to build perl XS extensions
# when cross-compiling.

View File

@ -1,22 +0,0 @@
--- CF-855.17/CoreFoundation.h 2015-01-03 00:17:41.000000000 -0500
+++ CF-855.17/CoreFoundation.h.new 2015-01-03 00:18:35.000000000 -0500
@@ -72,6 +72,7 @@
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFError.h>
#include <CoreFoundation/CFLocale.h>
+#include <CoreFoundation/CFMachPort.h>
#include <CoreFoundation/CFNumber.h>
#include <CoreFoundation/CFNumberFormatter.h>
#include <CoreFoundation/CFPreferences.h>
--- CF-855.17/Makefile 2015-01-03 00:32:52.000000000 -0500
+++ CF-855.17/Makefile.new 2015-01-03 00:33:07.000000000 -0500
@@ -9,7 +9,7 @@
HFILES = $(wildcard *.h)
INTERMEDIATE_HFILES = $(addprefix $(OBJBASE)/CoreFoundation/,$(HFILES))
-PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h
+PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMachPort.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h
PRIVATE_HEADERS=CFBundlePriv.h CFCharacterSetPriv.h CFError_Private.h CFLogUtilities.h CFPriv.h CFRuntime.h CFStorage.h CFStreamAbstract.h CFStreamPriv.h CFStreamInternal.h CFStringDefaultEncoding.h CFStringEncodingConverter.h CFStringEncodingConverterExt.h CFUniChar.h CFUnicodeDecomposition.h CFUnicodePrecomposition.h ForFoundationOnly.h CFBurstTrie.h CFICULogging.h

View File

@ -1,39 +0,0 @@
diff --git a/CFBase.h b/CFBase.h
index ffddd2b..e5a926b 100644
--- a/CFBase.h
+++ b/CFBase.h
@@ -249,6 +249,33 @@ CF_EXTERN_C_BEGIN
#endif
#endif
+#if __has_attribute(objc_bridge) && __has_feature(objc_bridge_id) && __has_feature(objc_bridge_id_on_typedefs)
+
+#ifdef __OBJC__
+@class NSArray;
+@class NSAttributedString;
+@class NSString;
+@class NSNull;
+@class NSCharacterSet;
+@class NSData;
+@class NSDate;
+@class NSTimeZone;
+@class NSDictionary;
+@class NSError;
+@class NSLocale;
+@class NSNumber;
+@class NSSet;
+@class NSURL;
+#endif
+
+#define CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T)))
+#define CF_BRIDGED_MUTABLE_TYPE(T) __attribute__((objc_bridge_mutable(T)))
+#define CF_RELATED_TYPE(T,C,I) __attribute__((objc_bridge_related(T,C,I)))
+#else
+#define CF_BRIDGED_TYPE(T)
+#define CF_BRIDGED_MUTABLE_TYPE(T)
+#define CF_RELATED_TYPE(T,C,I)
+#endif
CF_EXPORT double kCFCoreFoundationVersionNumber;

View File

@ -1,51 +0,0 @@
{ stdenv, appleDerivation, ICU, dyld, libdispatch, libplatform, launchd, libclosure }:
# this project uses blocks, a clang-only extension
assert stdenv.cc.isClang;
appleDerivation {
buildInputs = [ dyld ICU libdispatch libplatform launchd libclosure ];
patches = [ ./add-cfmachport.patch ./cf-bridging.patch ./remove-xpc.patch ];
__propagatedImpureHostDeps = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation" ];
preBuild = ''
substituteInPlace Makefile \
--replace "/usr/bin/clang" "clang" \
--replace "-arch i386 " "" \
--replace "/usr/bin/" "" \
--replace "/usr/sbin/" "" \
--replace "/bin/" "" \
--replace "INSTALLNAME=/System" "INSTALLNAME=$out" \
--replace "install_name_tool -id /System/Library/Frameworks" "install_name_tool -id @rpath" \
--replace 'chown -RH -f root:wheel $(DSTBASE)/CoreFoundation.framework' "" \
--replace 'chmod -RH' 'chmod -R'
# with this file present, CoreFoundation gets a _main symbol defined, which can
# interfere with linking other programs
rm plconvert.c
replacement=''$'#define __PTK_FRAMEWORK_COREFOUNDATION_KEY5 55\n#define _pthread_getspecific_direct(key) pthread_getspecific((key))\n#define _pthread_setspecific_direct(key, val) pthread_setspecific((key), (val))'
substituteInPlace CFPlatform.c --replace "#include <pthread/tsd_private.h>" "$replacement"
substituteInPlace CFRunLoop.c --replace "#include <pthread/private.h>" ""
substituteInPlace CFURLPriv.h \
--replace "#include <CoreFoundation/CFFileSecurity.h>" "" \
--replace "#include <CoreFoundation/CFURLEnumerator.h>" "" \
--replace "CFFileSecurityRef" "void *" \
--replace "CFURLEnumeratorResult" "void *" \
--replace "CFURLEnumeratorRef" "void *"
export DSTROOT=$out
'';
postInstall = ''
mv $out/System/* $out
rmdir $out/System
mv $out/Library/Frameworks/CoreFoundation.framework/Versions/A/PrivateHeaders/* \
$out/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers
'';
}

View File

@ -1,17 +0,0 @@
diff --git a/CFBundlePriv.h b/CFBundlePriv.h
index d4feb5f..e7b52e8 100644
--- a/CFBundlePriv.h
+++ b/CFBundlePriv.h
@@ -254,12 +254,6 @@ Boolean _CFBundleGetStringsFilesShared(CFBundleRef bundle);
CF_EXPORT
CFURLRef _CFBundleCopyFrameworkURLForExecutablePath(CFStringRef executablePath);
-#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
-#include <xpc/xpc.h>
-CF_EXPORT
-void _CFBundleSetupXPCBootstrap(xpc_object_t bootstrap) CF_AVAILABLE(10_10, 8_0);
-#endif
-
/* Functions deprecated as SPI */
CF_EXPORT

View File

@ -1,8 +1,6 @@
{ cctools, appleDerivation }:
{ appleDerivation }:
appleDerivation {
nativeBuildInputs = [ cctools ];
patches = [ ./clang-5.patch ];
postPatch = ''

View File

@ -204,7 +204,6 @@ let
bootstrap_cmds = applePackage "bootstrap_cmds" "dev-tools-7.0" "1v5dv2q3af1xwj5kz0a5g54fd5dm6j4c9dd2g66n4kc44ixyrhp3" {};
bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "11a9kkhz5bfgi1i8kpdkis78lhc6b5vxmhd598fcdgra1jw4iac2" {};
CarbonHeaders = applePackage "CarbonHeaders" "osx-10.6.2" "1zam29847cxr6y9rnl76zqmkbac53nx0szmqm9w5p469a6wzjqar" {};
CF = applePackage "CF" "osx-10.10.5" "07f5psjxi7wyd13ci4x83ya5hy6p69sjfqcpp2mmxdlhd8yzkf74" {};
CommonCrypto = applePackage "CommonCrypto" "osx-10.11.6" "0vllfpb8f4f97wj2vpdd7w5k9ibnsbr6ff1zslpp6q323h01n25y" {};
configd = applePackage "configd" "osx-10.8.5" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" {};
copyfile = applePackage "copyfile" "osx-10.11.6" "1rkf3iaxmjz5ycgrmf0g971kh90jb2z1zqxg5vlqz001s4y457gs" {};
@ -216,7 +215,7 @@ let
# Splicing is currently broken in Nixpkgs
# cctools need to be specified manually here to handle this
ICU = applePackage "ICU" "osx-10.10.5" "1qihlp42n5g4dl0sn0f9pc0bkxy1452dxzf0vr6y5gqpshlzy03p" { inherit (buildPackages.darwin) cctools; };
ICU = applePackage "ICU" "osx-10.10.5" "1qihlp42n5g4dl0sn0f9pc0bkxy1452dxzf0vr6y5gqpshlzy03p" {};
IOKit = applePackage "IOKit" "osx-10.11.6" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x00" { inherit IOKitSrcs; };
launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};

View File

@ -33,7 +33,6 @@ name: version: sha256: args: let
pkgs.gnustep.make
pkgs.darwin.apple_sdk.frameworks.AppKit
pkgs.darwin.apple_sdk.frameworks.Foundation
pkgs.darwin.cf-private
];
makeFlags = [
"-f${makeFile}"

View File

@ -39,9 +39,5 @@ appleDerivation {
--replace 'return mLoginDLDbIdentifier;' 'return mLoginDLDbIdentifier; }' \
--replace '_xpc_runtime_is_app_sandboxed()' 'false'
# hope that doesn't hurt anything
substituteInPlace lib/KCEventNotifier.h --replace \
'CoreFoundation/CFNotificationCenter.h' \
'${apple_sdk.sdk.out}/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFNotificationCenter.h'
'';
}

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook
, libcxxabi, libuuid
, libcxxabi, libuuid, llvm
, libobjc ? null, maloader ? null
, enableDumpNormalizedLibArgs ? false
}:
@ -56,7 +56,7 @@ let
autoreconfHook
];
buildInputs = [ libuuid ] ++
stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
stdenv.lib.optionals stdenv.isDarwin [ llvm libcxxabi libobjc ];
patches = [
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch

View File

@ -1,21 +1,59 @@
{ stdenv, osx_private_sdk, CF }:
{ CF, apple_sdk }:
stdenv.mkDerivation {
name = "${CF.name}-private";
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
dest=$out/Library/Frameworks/CoreFoundation.framework/Headers
mkdir -p $dest
pushd $dest
for file in ${CF}/Library/Frameworks/CoreFoundation.framework/Headers/*; do
ln -sf $file
done
# Copy or overwrite private headers, some of these might already
# exist in CF but the private versions have more information.
cp -Lfv ${osx_private_sdk}/include/CoreFoundationPrivateHeaders/* $dest
popd
'';
# cf-private is a bit weird, but boils down to CF with a weird setup-hook that
# makes a build link against the system CoreFoundation rather than our pure one.
# The reason it exists is that although our CF headers and build are pretty legit
# now, the underlying runtime is quite different. Apple's in a bit of flux around CF
# right now, and support three different backends for it: swift, "C", and an ObjC
# one. The former two can be built from public sources, but the ObjC one isn't really
# public. Unfortunately, it's also one of the core underpinnings of a lot of Mac-
# specific behavior, and defines a lot of symbols that some Objective C apps depend
# on, even though one might expect those symbols to derive from Foundation. So if
# your app relies on NSArray and several other basic ObjC types, it turns out that
# because of their magic "toll-free bridging" support, the symbols for those types
# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have
# this hack in place to let people link properly anyway. Phew!
#
# This can be revisited if Apple ever decide to release the ObjC backend in a publicly
# buildable form.
#
# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to
# an existing package was annoying. We need a buildEnv that knows how to add those
CF.overrideAttrs (orig: {
# PLEASE if you add things to this derivation, explain in reasonable detail why
# you're adding them and when the workaround can go away. This whole derivation is
# a workaround and if you don't explain what you're working around, it makes it
# very hard for people to clean it up later.
name = "${orig.name}-private";
setupHook = ./setup-hook.sh;
}
# TODO: consider re-adding https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch
# once the missing headers are in and see if that fixes all need for this.
# This can go away once https://bugs.swift.org/browse/SR-8741 happens, which is
# looking more likely these days with the friendly people at Apple! We only need
# the header because the setup hook takes care of linking us against a version
# of the framework with the functionality built into it. The main user I know of
# this is watchman, who can almost certainly switch to the pure CF once the header
# and functionality is merged in.
installPhase = orig.installPhase + ''
basepath="Library/Frameworks/CoreFoundation.framework/Headers"
path="$basepath/CFFileDescriptor.h"
# Append the include at top level or nobody will notice the header we're about to add
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \
"$out/$basepath/CoreFoundation.h"
cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
'' +
# This one is less likely to go away, but I'll mention it anyway. The issue is at
# https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase
''
path="$basepath/CFURLEnumerator.h"
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \
"$out/$basepath/CoreFoundation.h"
cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
'';
})

View File

@ -14,11 +14,12 @@ in stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "apple";
repo = "swift-corelibs-foundation";
rev = "85c640e7ce50e6ca61a134c72270e214bc63fdba"; # https://github.com/apple/swift-corelibs-foundation/pull/1686
sha256 = "0z2v278wy7jh0c92g1dszd8hj8naxari660sqx6yab5dwapd46qc";
rev = "71aaba20e1450a82c516af1342fe23268e15de0a";
sha256 = "17kpql0f27xxz4jjw84vpas5f5sn4vdqwv10g151rc3rswbwln1z";
};
buildInputs = [ ninja python libxml2 objc4 ICU curl ];
nativeBuildInputs = [ ninja python ];
buildInputs = [ libxml2 objc4 ICU curl ];
sourceRoot = "source/CoreFoundation";
@ -31,8 +32,7 @@ in stdenv.mkDerivation {
# 3. Use the legit CoreFoundation.h, not the one telling you not to use it because of Swift
substituteInPlace build.py \
--replace "cf.CFLAGS += '-DDEPLOYMENT" '#' \
--replace "cf.LDFLAGS += '-ldispatch" '#' \
--replace "Base.subproj/SwiftRuntime/CoreFoundation.h" 'Base.subproj/CoreFoundation.h'
--replace "cf.LDFLAGS += '-ldispatch" '#'
# Includes xpc for some initialization routine that they don't define anyway, so no harm here
substituteInPlace PlugIn.subproj/CFBundlePriv.h \
@ -53,8 +53,11 @@ in stdenv.mkDerivation {
BUILD_DIR = "./Build";
CFLAGS = "-DINCLUDE_OBJC -I${libxml2.dev}/include/libxml2"; # They seem to assume we include objc in some places and not in others, make a PR; also not sure why but libxml2 include path isn't getting picked up from buildInputs
LDFLAGS = "-install_name ${placeholder "out"}/Frameworks/CoreFoundation.framework/CoreFoundation -current_version 1234.56.7 -compatibility_version 150.0.0 -init ___CFInitialize";
configurePhase = "../configure --sysroot unused";
# I'm guessing at the version here. https://github.com/apple/swift-corelibs-foundation/commit/df3ec55fe6c162d590a7653d89ad669c2b9716b1 imported "high sierra"
# and this version is a version from there. No idea how accurate it is.
LDFLAGS = "-current_version 1454.90.0 -compatibility_version 150.0.0 -init ___CFInitialize";
configurePhase = "../configure release --sysroot UNUSED";
enableParallelBuilding = true;
buildPhase = "ninja -j $NIX_BUILD_CORES";
@ -66,6 +69,12 @@ in stdenv.mkDerivation {
mkdir -p $base/Versions/A/{Headers,PrivateHeaders,Modules}
cp ./Build/CoreFoundation/libCoreFoundation.dylib $base/Versions/A/CoreFoundation
# Note that this could easily live in the ldflags above as `-install_name @rpath/...` but
# https://github.com/NixOS/nixpkgs/issues/46434 thwarts that, so for now I'm hacking it up
# after the fact.
install_name_tool -id '@rpath/CoreFoundation.framework/Versions/A/CoreFoundation' $base/Versions/A/CoreFoundation
cp ./Build/CoreFoundation/usr/include/CoreFoundation/*.h $base/Versions/A/Headers
cp ./Build/CoreFoundation/usr/include/CoreFoundation/module.modulemap $base/Versions/A/Modules

View File

@ -1,8 +0,0 @@
{ callPackage, darwin }:
rec {
corefoundation = callPackage ./corefoundation.nix { inherit (darwin) objc4 ICU; };
libdispatch = callPackage ./libdispatch.nix {
inherit (darwin) apple_sdk_sierra xnu;
};
}

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile --replace " netem " " "
'';
outputs = [ "out" "dev"];
makeFlags = [
"DESTDIR="
"LIBDIR=$(out)/lib"
@ -23,7 +25,7 @@ stdenv.mkDerivation rec {
"MANDIR=$(out)/share/man"
"BASH_COMPDIR=$(out)/share/bash-completion/completions"
"DOCDIR=$(TMPDIR)/share/doc/${name}" # Don't install docs
"HDRDIR=$(TMPDIR)/include/iproute2" # Don't install headers
"HDRDIR=$(dev)/include/iproute2"
];
buildFlags = [

View File

@ -3,7 +3,7 @@
}:
let
common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
name = "linux-headers-${version}";
src = fetchurl {
@ -20,8 +20,6 @@ let
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
# "patches" array defaults to 'null' to avoid changing hash
# and causing mass rebuild
inherit patches;
buildPhase = ''
@ -45,7 +43,7 @@ let
in {
linuxHeaders = common {
version = "4.15";
sha256 = "0sd7l9n9h7vf9c6gd6ciji28hawda60yj0llh17my06m0s4lf9js";
version = "4.18.3";
sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
};
}

View File

@ -26,8 +26,8 @@ in stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "NixOS";
repo = "systemd";
rev = "21efe60844fda21039c052442076dabcf8643a90";
sha256 = "0aqifjsb0kaxnqy5nlmzvyzgfd99lm60k1494lbnnk8ahdh8ab07";
rev = "31859ddd35fc3fa82a583744caa836d356c31d7f";
sha256 = "1xci0491j95vdjgs397n618zii3sgwnvanirkblqqw6bcvcjvir1";
};
outputs = [ "out" "lib" "man" "dev" ];

View File

@ -1136,11 +1136,11 @@ let
}) // {inherit ;};
libxcb = (mkDerivation "libxcb" {
name = "libxcb-1.12";
name = "libxcb-1.13";
builder = ./builder.sh;
src = fetchurl {
url = http://xcb.freedesktop.org/dist/libxcb-1.12.tar.bz2;
sha256 = "0nvv0la91cf8p5qqlb3r5xnmg1jn2wphn4fb5jfbr6byqsvv3psa";
url = http://xcb.freedesktop.org/dist/libxcb-1.13.tar.bz2;
sha256 = "1ahxhmdqp4bhb90zmc275rmf5wixqra4bnw9pqnzyl1w3598g30q";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libxslt libpthreadstubs python libXau xcbproto libXdmcp ];
@ -1448,11 +1448,11 @@ let
}) // {inherit ;};
xcbproto = (mkDerivation "xcbproto" {
name = "xcb-proto-1.12";
name = "xcb-proto-1.13";
builder = ./builder.sh;
src = fetchurl {
url = http://xcb.freedesktop.org/dist/xcb-proto-1.12.tar.bz2;
sha256 = "01j91946q8f34l1mbvmmgvyc393sm28ym4lxlacpiav4qsjan8jr";
url = http://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2;
sha256 = "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python ];

View File

@ -1,6 +1,6 @@
http://xcb.freedesktop.org/dist/libpthread-stubs-0.4.tar.bz2
http://xcb.freedesktop.org/dist/libxcb-1.12.tar.bz2
http://xcb.freedesktop.org/dist/xcb-proto-1.12.tar.bz2
http://xcb.freedesktop.org/dist/libxcb-1.13.tar.bz2
http://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.bz2
http://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.bz2
http://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2
http://xcb.freedesktop.org/dist/xcb-util-image-0.4.0.tar.bz2

View File

@ -88,7 +88,6 @@ in rec {
extraPackages = lib.optional (libcxx != null) libcxx;
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
inherit buildPackages coreutils gnugrep bintools;
libc = last.pkgs.darwin.Libsystem;
@ -198,6 +197,10 @@ in rec {
CF = null; # use CoreFoundation from bootstrap-tools
configd = null;
};
python2 = self.python;
ninja = super.ninja.override { buildDocs = false; };
darwin = super.darwin // { cctools = super.darwin.cctools.override { llvm = null; }; };
};
in with prevStage; stageFun 1 prevStage {
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
@ -217,11 +220,12 @@ in rec {
zlib patchutils m4 scons flex perl bison unifdef unzip openssl python
libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz
findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils;
findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils
libssh2 nghttp2 libkrb5 python2 ninja;
darwin = super.darwin // {
inherit (darwin)
dyld Libsystem xnu configd ICU libdispatch libclosure launchd;
dyld Libsystem xnu configd ICU libdispatch libclosure launchd CF;
};
};
in with prevStage; stageFun 2 prevStage {
@ -235,7 +239,10 @@ in rec {
allowedRequisites =
[ bootstrapTools ] ++
(with pkgs; [ xz.bin xz.out libcxx libcxxabi ]) ++
(with pkgs; [
xz.bin xz.out libcxx libcxxabi zlib libxml2.out curl.out openssl.out libssh2.out
nghttp2.lib libkrb5
]) ++
(with pkgs.darwin; [ dyld Libsystem CF ICU locale ]);
overrides = persistent;
@ -247,9 +254,10 @@ in rec {
patchutils m4 scons flex perl bison unifdef unzip openssl python
gettext sharutils libarchive pkg-config groff bash subversion
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util
findfreetype libssh curl cmake autoconf automake libtool cpio;
findfreetype libssh curl cmake autoconf automake libtool cpio
libssh2 nghttp2 libkrb5 python2 ninja;
# Avoid pulling in a full python and it's extra dependencies for the llvm/clang builds.
# Avoid pulling in a full python and its extra dependencies for the llvm/clang builds.
libxml2 = super.libxml2.override { pythonSupport = false; };
llvmPackages_5 = super.llvmPackages_5 // (let
@ -281,7 +289,10 @@ in rec {
allowedRequisites =
[ bootstrapTools ] ++
(with pkgs; [ xz.bin xz.out bash libcxx libcxxabi ]) ++
(with pkgs; [
xz.bin xz.out bash libcxx libcxxabi zlib libxml2.out curl.out openssl.out libssh2.out
nghttp2.lib libkrb5
]) ++
(with pkgs.darwin; [ dyld ICU Libsystem locale ]);
overrides = persistent;
@ -292,7 +303,7 @@ in rec {
inherit
gnumake gzip gnused bzip2 gawk ed xz patch bash
ncurses libffi zlib gmp pcre gnugrep
coreutils findutils diffutils patchutils;
coreutils findutils diffutils patchutils ninja;
# Hack to make sure we don't link ncurses in bootstrap tools. The proper
# solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib,
@ -312,8 +323,14 @@ in rec {
});
in { inherit tools libraries; } // tools // libraries);
darwin = super.darwin // {
darwin = super.darwin // rec {
inherit (darwin) dyld Libsystem libiconv locale;
libxml2-nopython = super.libxml2.override { pythonSupport = false; };
CF = super.darwin.CF.override {
libxml2 = libxml2-nopython;
python = prevStage.python;
};
};
};
in with prevStage; stageFun 4 prevStage {
@ -345,6 +362,17 @@ in rec {
});
in { inherit tools libraries; } // tools // libraries);
# N.B: the important thing here is to ensure that python == python2
# == python27 or you get weird issues with inconsistent package sets.
# In a particularly subtle bug, I overrode python2 instead of python27
# here, and it caused gnome-doc-utils to complain about:
# "PyThreadState_Get: no current thread". This is because Python gets
# really unhappy if you have Python A which loads a native python lib
# which was linked against Python B, which in our case was happening
# because we didn't override python "deeply enough". Anyway, this works
# and I'm just leaving this blurb here so people realize why it matters
python27 = super.python27.override { CF = prevStage.darwin.CF; };
darwin = super.darwin // {
inherit (darwin) dyld ICU Libsystem libiconv;
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
@ -398,9 +426,10 @@ in rec {
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.lib patch pcre.out gettext
binutils.bintools darwin.binutils darwin.binutils.bintools
curl.out openssl.out libssh2.out nghttp2.lib libkrb5
cc.expand-response-params
]) ++ (with pkgs.darwin; [
dyld Libsystem CF cctools ICU libiconv locale
dyld Libsystem CF cctools ICU libiconv locale libxml2-nopython.out
]);
overrides = lib.composeExtensions persistent (self: super: {

View File

@ -3,7 +3,7 @@
with import pkgspath { inherit system; };
let
llvmPackages = llvmPackages_4;
llvmPackages = llvmPackages_5;
in rec {
coreutils_ = coreutils.override (args: {
# We want coreutils without ACL support.
@ -12,6 +12,10 @@ in rec {
singleBinary = false;
});
# We want a version of cctools without LLVM, because the LTO support ends up making
# the bootstrap tools huge and isn't really necessary for bootstrap
cctools_ = darwin.cctools.override { llvm = null; };
# Avoid debugging larger changes for now.
bzip2_ = bzip2.override (args: { linkStatic = true; });
@ -73,6 +77,7 @@ in rec {
cp -d ${gettext}/lib/libintl*.dylib $out/lib
chmod +x $out/lib/libintl*.dylib
cp -d ${ncurses.out}/lib/libncurses*.dylib $out/lib
cp -d ${libxml2.out}/lib/libxml2*.dylib $out/lib
# Copy what we need of clang
cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin
@ -94,7 +99,7 @@ in rec {
# Copy binutils.
for i in as ld ar ranlib nm strip otool install_name_tool dsymutil lipo; do
cp ${darwin.cctools}/bin/$i $out/bin
cp ${cctools_}/bin/$i $out/bin
done
cp -rd ${pkgs.darwin.CF}/Library $out
@ -104,9 +109,9 @@ in rec {
nuke-refs $out/bin/*
rpathify() {
local libs=$(${darwin.cctools}/bin/otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
local libs=$(${cctools_}/bin/otool -L "$1" | tail -n +2 | grep -o "$NIX_STORE.*-\S*") || true
for lib in $libs; do
${darwin.cctools}/bin/install_name_tool -change $lib "@rpath/$(basename $lib)" "$1"
${cctools_}/bin/install_name_tool -change $lib "@rpath/$(basename $lib)" "$1"
done
}

View File

@ -225,6 +225,8 @@ rec {
inherit doCheck doInstallCheck;
inherit outputs;
} // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
enableParallelChecking = attrs.enableParallelChecking or true;
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
NIX_HARDENING_ENABLE = enabledHardeningOptions;
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {

View File

@ -211,7 +211,7 @@ isELF() {
exec {fd}< "$fn"
read -r -n 4 -u "$fd" magic
exec {fd}<&-
if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi
if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi
}
# Return success if the specified file is a script (i.e. starts with
@ -257,9 +257,17 @@ shopt -s nullglob
# Set up the initial path.
PATH=
HOST_PATH=
for i in $initialPath; do
if [ "$i" = / ]; then i=; fi
addToSearchPath PATH "$i/bin"
# For backward compatibility, we add initial path to HOST_PATH so
# it can be used in auto patch-shebangs. Unfortunately this will
# not work with cross compilation.
if [ -z "${strictDeps-}" ]; then
addToSearchPath HOST_PATH "$i/bin"
fi
done
if (( "${NIX_DEBUG:-0}" >= 1 )); then
@ -272,7 +280,6 @@ if [ -z "${SHELL:-}" ]; then echo "SHELL not set"; exit 1; fi
BASH="$SHELL"
export CONFIG_SHELL="$SHELL"
# Dummy implementation of the paxmark function. On Linux, this is
# overwritten by paxctl's setup hook.
paxmark() { true; }
@ -1044,7 +1051,7 @@ checkPhase() {
# Old bash empty array hack
# shellcheck disable=SC2086
local flagsArray=(
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
$makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
${checkFlags:-VERBOSE=y} ${checkFlagsArray+"${checkFlagsArray[@]}"}
${checkTarget}
@ -1176,7 +1183,7 @@ installCheckPhase() {
# Old bash empty array hack
# shellcheck disable=SC2086
local flagsArray=(
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
$makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
$installCheckFlags ${installCheckFlagsArray+"${installCheckFlagsArray[@]}"}
${installCheckTarget:-installcheck}

View File

@ -92,7 +92,6 @@ let
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
name = "${name}-gcc-wrapper";
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
inherit (prevStage) stdenv;

View File

@ -112,8 +112,8 @@ in with pkgs; rec {
cp -d ${gcc.cc.out}/bin/gcc $out/bin
cp -d ${gcc.cc.out}/bin/cpp $out/bin
cp -d ${gcc.cc.out}/bin/g++ $out/bin
cp -d ${gcc.cc.lib}/lib*/libgcc_s.so* $out/lib
cp -d ${gcc.cc.lib}/lib*/libstdc++.so* $out/lib
cp -d ${gcc.cc.lib}/lib/libgcc_s.so* $out/lib
cp -d ${gcc.cc.lib}/lib/libstdc++.so* $out/lib
cp -rd ${gcc.cc.out}/lib/gcc $out/lib
chmod -R u+w $out/lib
rm -f $out/lib/gcc/*/*/include*/linux

View File

@ -29,4 +29,6 @@ with pkgs;
macOSSierraShared = callPackage ./macos-sierra-shared {};
cross = callPackage ./cross {};
patch-shebangs = callPackage ./patch-shebangs {};
}

View File

@ -0,0 +1,26 @@
{ stdenv, runCommand }:
let
bad-shebang = stdenv.mkDerivation {
name = "bad-shebang";
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
echo "#!/bin/sh" > $out/bin/test
echo "echo -n hello" >> $out/bin/test
chmod +x $out/bin/test
'';
};
in runCommand "patch-shebangs-test" {
passthru = { inherit bad-shebang; };
meta.platforms = stdenv.lib.platforms.all;
} ''
printf "checking whether patchShebangs works properly... ">&2
if ! grep -q '^#!/bin/sh' ${bad-shebang}/bin/test; then
echo "yes" >&2
touch $out
else
echo "no" >&2
exit 1
fi
''

Some files were not shown because too many files have changed in this diff Show More