Merge staging-next into master

This commit is contained in:
Frederik Rietdijk 2019-05-07 19:29:06 +02:00 committed by GitHub
commit a80982b4c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
284 changed files with 1681 additions and 3658 deletions

View file

@ -32,11 +32,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ glib libsndfile ]
++ lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ]
buildInputs = [ glib libsndfile libpulseaudio libjack2 ]
++ lib.optionals stdenv.isLinux [ alsaLib ]
++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreMIDI CoreServices ];
cmakeFlags = lib.optional stdenv.isDarwin "-Denable-framework=off";
cmakeFlags = [ "-Denable-framework=off" ];
meta = with lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";

View file

@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
"--enable-mac-app=$$out/Applications"
];
CFLAGS = "-O3 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10";
CFLAGS = "-O3";
LDFLAGS = "-O3 -L${ncurses.out}/lib";
postInstall = ''

View file

@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
sha256 = "0m83c33rzxvs0w214njql2c7q3fg06wnyijch3l2s88i7frl121f";
};
NIX_CFLAGS_COMPILE = "-Wno-error";
meta = with stdenv.lib; {
description = "It's like cat, but for images";
homepage = https://github.com/eddieantonio/imgcat;

View file

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
cp obj-unix/tthsum $out/bin
'';
doCheck = !stdenv.isDarwin;
meta = with stdenv.lib; {
description = "An md5sum-alike program that works with Tiger/THEX hashes";
longDescription = ''

View file

@ -153,15 +153,9 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (!isTorBrowserLike) [
"-I${nss.dev}/include/nss"
]
++ lib.optional stdenv.isDarwin [
"-isystem ${llvmPackages.libcxx}/include/c++/v1"
"-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10"
];
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace js/src/jsmath.cpp --replace 'defined(HAVE___SINCOS)' 0
'' + lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) ''
postPatch = lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) ''
substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h'
'';

View file

@ -5,6 +5,7 @@
# Not mentioned but seems needed
, qtgraphicaleffects
, qtdeclarative
, qtmacextras
}:
let
@ -37,7 +38,8 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio;
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
meta = with stdenv.lib; {
description = "A glossy client for Matrix, written in QtQuick Controls 2 and C++";

View file

@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
./gcc6.patch
];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = {
description = "Renders an image of the earth or other planets into the X root window";
homepage = http://xplanet.sourceforge.net;

View file

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
buildInputs = [cmake];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with stdenv.lib; {
description = "Computational Morphometry Toolkit ";
longDescription = ''A software toolkit for computational morphometry of

View file

@ -5,10 +5,32 @@
# rewritten to /nix/store/<hash>/bin/python. Interpreters that are
# already in the store are left untouched.
fixupOutputHooks+=('if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then patchShebangs "$prefix"; fi')
fixupOutputHooks+=(patchShebangsAuto)
# Run patch shebangs on a directory.
# patchShebangs [--build | --host] directory
# Flags:
# --build : Lookup commands available at build-time
# --host : Lookup commands available at runtime
# Example use cases,
# $ patchShebangs --host /nix/store/...-hello-1.0/bin
# $ patchShebangs --build configure
patchShebangs() {
local pathName
if [ "$1" = "--host" ]; then
pathName=HOST_PATH
shift
elif [ "$1" = "--build" ]; then
pathName=PATH
shift
fi
local dir="$1"
header "patching script interpreter paths in $dir"
local f
local oldPath
@ -27,6 +49,14 @@ patchShebangs() {
oldInterpreterLine=$(head -1 "$f" | tail -c+3)
read -r oldPath arg0 args <<< "$oldInterpreterLine"
if [ -z "$pathName" ]; then
if [ -n "$strictDeps" ] && [[ "$f" = "$NIX_STORE"* ]]; then
pathName=HOST_PATH
else
pathName=PATH
fi
fi
if $(echo "$oldPath" | grep -q "/bin/env$"); then
# Check for unsupported 'env' functionality:
# - options: something starting with a '-'
@ -35,14 +65,17 @@ patchShebangs() {
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
exit 1
fi
newPath="$(command -v "$arg0" || true)"
newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"
else
if [ "$oldPath" = "" ]; then
# If no interpreter is specified linux will use /bin/sh. Set
# oldpath="/bin/sh" so that we get /nix/store/.../sh.
oldPath="/bin/sh"
fi
newPath="$(command -v "$(basename "$oldPath")" || true)"
newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"
args="$arg0 $args"
fi
@ -55,13 +88,28 @@ patchShebangs() {
# escape the escape chars so that sed doesn't interpret them
escapedInterpreterLine=$(echo "$newInterpreterLine" | sed 's|\\|\\\\|g')
# Preserve times, see: https://github.com/NixOS/nixpkgs/pull/33281
touch -r "$f" "$f.timestamp"
timestamp=$(mktemp)
touch -r "$f" "$timestamp"
sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" "$f"
touch -r "$f.timestamp" "$f"
rm "$f.timestamp"
touch -r "$timestamp" "$f"
rm "$timestamp"
fi
fi
done < <(find "$dir" -type f -perm -0100 -print0)
stopNest
}
patchShebangsAuto () {
if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then
# Dev output will end up being run on the build platform. An
# example case of this is sdl2-config. Otherwise, we can just
# use the runtime path (--host).
if [ "$output" != out ] && [ "$output" = "$outputDev" ]; then
patchShebangs --build "$prefix"
else
patchShebangs --host "$prefix"
fi
fi
}

View file

@ -86,9 +86,6 @@ expandResponseParams() {
#shellcheck disable=SC2034
readarray -d '' params < <("@expandResponseParams@" "$@")
return 0
else
echo "Response files aren't supported during bootstrapping" >&2
return 1
fi
fi
done

View file

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
"-Dgtk_doc=true"
];
doCheck = !stdenv.isAarch64;
doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
passthru = {
updateScript = gnome3.updateScript {

View file

@ -1,4 +1,4 @@
{ pkgs, newScope }:
{ pkgs, newScope, stdenv, llvmPackages_6 }:
let
callPackage = newScope self;
@ -10,7 +10,9 @@ let
gorm = callPackage ./gorm {};
projectcenter = callPackage ./projectcenter {};
system_preferences = callPackage ./systempreferences {};
libobjc = callPackage ./libobjc2 {};
libobjc = callPackage ./libobjc2 {
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
};
make = callPackage ./make {};
back = callPackage ./back {};
base = callPackage ./base { giflib = pkgs.giflib_4_1; };

View file

@ -418,6 +418,7 @@ stdenv.mkDerivation ({
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -430,6 +430,7 @@ stdenv.mkDerivation ({
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -435,6 +435,7 @@ stdenv.mkDerivation ({
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -131,11 +131,6 @@ stdenv.mkDerivation rec {
})
];
postPatch = optionalString stdenv.isDarwin ''
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
'';
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "386"
@ -187,5 +182,6 @@ stdenv.mkDerivation rec {
license = licenses.bsd3;
maintainers = with maintainers; [ cstrahan orivej velovix mic92 ];
platforms = platforms.linux ++ platforms.darwin;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -136,11 +136,6 @@ stdenv.mkDerivation rec {
./skip-test-extra-files-on-386.patch
];
postPatch = optionalString stdenv.isDarwin ''
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
'';
GOOS = stdenv.targetPlatform.parsed.kernel.name;
GOARCH = goarch stdenv.targetPlatform;
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
@ -188,7 +183,7 @@ stdenv.mkDerivation rec {
(cd src && ./make.bash)
'';
doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
checkPhase = ''
runHook preCheck

View file

@ -141,9 +141,6 @@ stdenv.mkDerivation rec {
postPatch = ''
find . -name '*.orig' -exec rm {} ';'
'' + optionalString stdenv.isDarwin ''
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
'';
GOOS = stdenv.targetPlatform.parsed.kernel.name;
@ -193,7 +190,7 @@ stdenv.mkDerivation rec {
(cd src && ./make.bash)
'';
doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
checkPhase = ''
runHook preCheck

View file

@ -150,7 +150,7 @@ stdenv.mkDerivation rec {
else
"";
doCheck = !bootstrapVersion;
doCheck = !bootstrapVersion && !stdenv.isDarwin;
checkPhase = stdenv.lib.optionalString doCheck ''
# Build default lib test runners

View file

@ -43,5 +43,6 @@ stdenv.mkDerivation rec {
description = "A new implementation of the C++ standard library, targeting C++11";
license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -22,10 +22,13 @@ assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries;
let
src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." version));
in stdenv.mkDerivation rec {
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
in
stdenv.mkDerivation {
name = "llvm-${version}";
unpackPhase = ''
@ -153,8 +156,9 @@ in stdenv.mkDerivation rec {
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${version}.dylib
${stdenv.lib.concatMapStringsSep "\n" (v: ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
'') versionSuffixes}
'';
enableParallelBuilding = true;

View file

@ -27,5 +27,6 @@ stdenv.mkDerivation {
homepage = http://lld.llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -19,10 +19,13 @@
let
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
in stdenv.mkDerivation (rec {
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
in
stdenv.mkDerivation (rec {
name = "llvm-${version}";
unpackPhase = ''
@ -136,8 +139,9 @@ in stdenv.mkDerivation (rec {
+ 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"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
${stdenv.lib.concatMapStringsSep "\n" (v: ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
'') versionSuffixes}
'';
doCheck = stdenv.isLinux && (!stdenv.isi686);

View file

@ -27,5 +27,6 @@ stdenv.mkDerivation {
homepage = http://lld.llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -18,10 +18,13 @@
let
src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
in stdenv.mkDerivation (rec {
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
in
stdenv.mkDerivation (rec {
name = "llvm-${version}";
unpackPhase = ''
@ -119,8 +122,9 @@ in stdenv.mkDerivation (rec {
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/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
${stdenv.lib.concatMapStringsSep "\n" (v: ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
'') versionSuffixes}
'';
doCheck = stdenv.isLinux && (!stdenv.isi686);

View file

@ -21,11 +21,13 @@ let
src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
in
in stdenv.mkDerivation (rec {
stdenv.mkDerivation (rec {
name = "llvm-${version}";
unpackPhase = ''
@ -133,8 +135,9 @@ in stdenv.mkDerivation (rec {
+ 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"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
${stdenv.lib.concatMapStringsSep "\n" (v: ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
'') versionSuffixes}
'';
doCheck = stdenv.isLinux && (!stdenv.isi686);

View file

@ -9,7 +9,7 @@ let
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "067lwggnbg0w1dfrps790r5l6k8n5zwhlsw7zb6zvmfpwpfn4nx4"}
unpackFile ${fetch "cfe" "0vc4i87qwxnw9lci4ayws9spakg0z6w5w670snj9f8g5m9rc8zg9"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}

View file

@ -1,74 +0,0 @@
commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
Author: Tobias Mayer <tobim@fastmail.fm>
Date: Wed Feb 13 12:44:17 2019 +0100
Provide clock_gettime for xray on macos < 10.12
diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
index a46c151af..38aea6932 100644
--- a/lib/xray/xray_basic_logging.cc
+++ b/lib/xray/xray_basic_logging.cc
@@ -36,6 +36,29 @@
#include "xray_tsc.h"
#include "xray_utils.h"
+#if __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+enum clockid_t {
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
+ CLOCK_REALTIME = REALTIME_CLOCK
+};
+
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
+ if (ts != NULL) {
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), clock_id, &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;
+ return 0;
+ }
+ return -1;
+}
+#endif
+
namespace __xray {
SpinMutex LogMutex;
diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
index 4b308b27f..1d044c8fd 100644
--- a/lib/xray/xray_fdr_logging.cc
+++ b/lib/xray/xray_fdr_logging.cc
@@ -38,6 +38,29 @@
#include "xray_tsc.h"
#include "xray_utils.h"
+#if __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+enum clockid_t {
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
+ CLOCK_REALTIME = REALTIME_CLOCK
+};
+
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
+ if (ts != NULL) {
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), clock_id, &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;
+ return 0;
+ }
+ return -1;
+}
+#endif
+
namespace __xray {
atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};

View file

@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
name = "compiler-rt-${version}";
inherit version;
src = fetch "compiler-rt" "065ybd8fsc4h2hikbdyricj6pyv4r7r7kpcikhb2y5zf370xybkq";
src = fetch "compiler-rt" "1n48p8gjarihkws0i2bay5w9bdwyxyxxbpwyng7ba58jb30dlyq5";
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
@ -26,9 +26,8 @@ stdenv.mkDerivation rec {
patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch;
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra

View file

@ -5,7 +5,7 @@
}:
let
release_version = "7.0.1";
release_version = "7.1.0";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
@ -13,7 +13,7 @@ let
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "1v9vc7id1761qm7mywlknsp810232iwyz8rd4y5km4h7pg9cg4sc";
clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; });

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "1wdrxg365ig0kngx52pd0n820sncp24blb0zpalc579iidhh4002";
src = fetch "libcxx" "0kmhcapm2cjwalyiqasj9dmqbw59mcwdl8fgl951wg7ax84b8hj4";
postUnpack = ''
unpackFile ${libcxxabi.src}

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "1n6yx0949l9bprh75dffchahn8wplkm79ffk4f2ap9vw2lx90s41";
src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "0ca0qygrk87lhjk6cpv1wbmdfnficqqjsda3k7b013idvnralsc8";
src = fetch "lld" "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];

View file

@ -17,7 +17,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "10k9lyk3i72j9hca523r9pz79qp7d8q7jqnjy0i3saj1bgknpd3n";
src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
postPatch = ''
# Fix up various paths that assume llvm and clang are installed in the same place

View file

@ -22,12 +22,13 @@
let
inherit (stdenv.lib) optional optionals optionalString;
src = fetch "llvm" "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3";
polly_src = fetch "polly" "0wgvayfilgb530bq51l7szxfb13l24nnrmyji2f6ncq95a24dw8v";
src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v";
polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Used when creating a versioned symlinks of libLLVM.dylib
versionSuffixes = with stdenv.lib;
let parts = splitString "." release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
in stdenv.mkDerivation (rec {
name = "llvm-${version}";
@ -53,12 +54,6 @@ in stdenv.mkDerivation (rec {
propagatedBuildInputs = [ ncurses zlib ];
patches = [
# https://bugs.llvm.org/show_bug.cgi?id=39427
# https://github.com/NixOS/nixpkgs/issues/54370
(fetchpatch {
url = "https://github.com/llvm-mirror/llvm/commit/57567def148f387153a8149fb590bd39b1b006a1.patch";
sha256 = "1w1xg5pxpc6cals1nf5j5k4p6qi8lcrpvn0paxc86m415i79xmcg";
})
# backport, fix building rust crates with lto
(fetchpatch {
url = "https://github.com/llvm-mirror/llvm/commit/da1fb72bb305d6bc1f3899d541414146934bf80f.patch";
@ -148,8 +143,9 @@ in stdenv.mkDerivation (rec {
+ 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"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
${stdenv.lib.concatMapStringsSep "\n" (v: ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
'') versionSuffixes}
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32);

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation {
name = "openmp-${version}";
src = fetch "openmp" "030dkg5cypd7j9hq0mcqb5gs31lxwmzfq52j81l7v9ldcy5bf5mz";
src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

View file

@ -1,74 +0,0 @@
commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
Author: Tobias Mayer <tobim@fastmail.fm>
Date: Wed Feb 13 12:44:17 2019 +0100
Provide clock_gettime for xray on macos < 10.12
diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
index a46c151af..38aea6932 100644
--- a/lib/xray/xray_basic_logging.cc
+++ b/lib/xray/xray_basic_logging.cc
@@ -36,6 +36,29 @@
#include "xray_tsc.h"
#include "xray_utils.h"
+#if __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+enum clockid_t {
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
+ CLOCK_REALTIME = REALTIME_CLOCK
+};
+
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
+ if (ts != NULL) {
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), clock_id, &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;
+ return 0;
+ }
+ return -1;
+}
+#endif
+
namespace __xray {
SpinMutex LogMutex;
diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
index 4b308b27f..1d044c8fd 100644
--- a/lib/xray/xray_fdr_logging.cc
+++ b/lib/xray/xray_fdr_logging.cc
@@ -38,6 +38,29 @@
#include "xray_tsc.h"
#include "xray_utils.h"
+#if __MACH__
+#include <mach/clock.h>
+#include <mach/mach.h>
+enum clockid_t {
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
+ CLOCK_REALTIME = REALTIME_CLOCK
+};
+
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
+ if (ts != NULL) {
+ clock_serv_t cclock;
+ mach_timespec_t mts;
+ host_get_clock_service(mach_host_self(), clock_id, &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;
+ return 0;
+ }
+ return -1;
+}
+#endif
+
namespace __xray {
atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};

View file

@ -34,8 +34,7 @@ stdenv.mkDerivation rec {
patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch;
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra

View file

@ -2,6 +2,8 @@
, buildPackages
, newScope, callPackage
, CoreFoundation, Security
, llvmPackages_5
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
}: rec {
makeRustPlatform = { rustc, cargo, ... }: {
rust = {
@ -48,10 +50,15 @@
buildRustPackages = buildPackages.rust.packages.stable;
# Analogous to stdenv
rustPlatform = makeRustPlatform self.buildRustPackages;
rustc = self.callPackage ./rustc.nix {
rustc = self.callPackage ./rustc.nix ({
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
};
} // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
stdenv = llvmPackages_5.stdenv;
pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; };
});
cargo = self.callPackage ./cargo.nix {
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;

View file

@ -128,25 +128,6 @@ self: super: builtins.intersectAttrs super {
# the system-fileio tests use canonicalizePath, which fails in the sandbox
system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio;
# Prevents needing to add `security_tool` as a run-time dependency for
# everything using x509-system to give access to the `security` executable.
x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc
then let inherit (pkgs.darwin) security_tool;
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
# darwin.security_tool is broken in Mojave (#45042)
# We will use the system provided security for now.
# Beware this WILL break in sandboxes!
# TODO(matthewbauer): If someone really needs this to work in sandboxes,
# I think we can add a propagatedImpureHost dep here, but Im hoping to
# get a proper fix available soonish.
postPatch = (drv.postPatch or "") + ''
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
'';
})
else super.x509-system;
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
gio = disableHardening (addPkgconfigDepend (addBuildTool super.gio self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];
glib = disableHardening (addPkgconfigDepend (addBuildTool super.glib self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];

View file

@ -46,7 +46,14 @@
})
./riscv.patch
] ++
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch)
++ stdenv.lib.optionals stdenv.isDarwin [
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
})
./filter-mkostemp-darwin.patch
];
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".

View file

@ -2,6 +2,7 @@
, fetchurl, makeWrapper, gawk, pkgconfig
, libffi, libtool, readline, gmp, boehmgc, libunistring
, coverageAnalysis ? null
, fetchpatch
}:
# Do either a coverage analysis build or a standard build.
@ -42,8 +43,11 @@
patches = [
./eai_system.patch
./riscv.patch
] ++
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
] ++ stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
++ stdenv.lib.optional stdenv.isDarwin (fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
});
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".

View file

@ -0,0 +1,28 @@
Filter incompat. mkostemp(3) flags on macOS 10.12
macOS Sierra introduces a mkostemp(3) function which is used when
present. Contrary to the GNUlib version of mkostemp(3) that was used
previously, this version fails with 'invalid argument' when flags other
than from a specified set are passed. From mktemp(3):
| The mkostemp() function is like mkstemp() but allows specifying
| additional open(2) flags (defined in <fcntl.h>). The permitted flags
| are O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.
Signed-off-by: Clemens Lang <cal@macports.org>
Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23]
--- a/libguile/filesys.c.orig 2017-01-09 00:53:27.000000000 +0100
+++ b/libguile/filesys.c 2017-01-09 00:54:48.000000000 +0100
@@ -1486,6 +1486,12 @@
mode_bits = scm_i_mode_bits (mode);
}
+#ifdef __APPLE__
+ /* macOS starting with 10.12 defines mkostemp(2) which is used if defined,
+ * but only accepts some flags according to its manpage. It fails with
+ * invalid argument when other flags are passed. */
+ open_flags &= O_APPEND | O_SHLOCK | O_EXLOCK | O_CLOEXEC;
+#endif
SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
if (rv == -1)
SCM_SYSERROR;

View file

@ -42,7 +42,7 @@ let
executable = libPrefix;
pythonVersion = with sourceVersion; "${major}.${minor}";
sitePackages = "lib/${libPrefix}/site-packages";
inherit pythonForBuild;
inherit hasDistutilsCxxPatch pythonForBuild;
} // {
inherit ucsEncoding;
};

View file

@ -39,7 +39,7 @@ let
executable = libPrefix;
pythonVersion = with sourceVersion; "${major}.${minor}";
sitePackages = "lib/${libPrefix}/site-packages";
inherit pythonForBuild;
inherit hasDistutilsCxxPatch pythonForBuild;
};
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";

View file

@ -13,6 +13,7 @@ with pkgs;
, pythonVersion
, packageOverrides
, sitePackages
, hasDistutilsCxxPatch
, pythonForBuild
, self
}: let
@ -40,7 +41,7 @@ with pkgs;
inherit sourceVersion;
pythonAtLeast = lib.versionAtLeast pythonVersion;
pythonOlder = lib.versionOlder pythonVersion;
inherit pythonForBuild;
inherit hasDistutilsCxxPatch pythonForBuild;
};
in {

View file

@ -24,6 +24,7 @@ let
executable = "pypy${if isPy3k then "3" else ""}";
pythonForBuild = self; # No cross-compiling for now.
sitePackages = "site-packages";
hasDistutilsCxxPatch = false;
};
pname = passthru.executable;
version = with sourceVersion; "${major}.${minor}.${patch}";

View file

@ -34,6 +34,7 @@ let
executable = "pypy${if isPy3k then "3" else ""}";
pythonForBuild = self; # Not possible to cross-compile with.
sitePackages = "site-packages";
hasDistutilsCxxPatch = false;
};
pname = "${passthru.executable}_prebuilt";
version = with sourceVersion; "${major}.${minor}.${patch}";

View file

@ -12,7 +12,9 @@ toPythonPath() {
echo $result
}
addEnvHooks "$hostOffset" addPythonPath
if [ -z "${dontAddPythonPath:-}" ]; then
addEnvHooks "$hostOffset" addPythonPath
fi
# Determinism: The interpreter is patched to write null timestamps when compiling python files.
# This way python doesn't try to update them when we freeze timestamps in nix store.

View file

@ -2,10 +2,10 @@
callPackage ./generic.nix (args // rec {
release = "8.6";
version = "${release}.6";
version = "${release}.9";
src = fetchurl {
url = "mirror://sourceforge/tcl/tcl${version}-src.tar.gz";
sha256 = "01zypqhy57wvh1ikk28bg733sk5kf4q568pq9v6fvcz4h6bl0rd2";
sha256 = "0kjzj7mkzfnb7ksxanbibibfpciyvsh5ffdlhs0bmfc75kgd435d";
};
})

View file

@ -33,11 +33,12 @@ stdenv.mkDerivation rec {
postInstall = ''
make install-private-headers
ln -s $out/bin/tclsh${release} $out/bin/tclsh
ln -s $out/lib/libtcl${release}.so $out/lib/libtcl.so
'';
meta = with stdenv.lib; {
description = "The Tcl scription language";
homepage = http://www.tcl.tk/;
description = "The Tcl scripting language";
homepage = https://www.tcl.tk/;
license = licenses.tcltk;
platforms = platforms.all;
maintainers = with maintainers; [ vrthra ];

View file

@ -3,11 +3,33 @@
callPackage ./generic.nix (args // rec {
version = "1.67.0";
patches = [ (fetchpatch {
url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
stripLen = 1;
})];
patches = [
(fetchpatch {
url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
stripLen = 1;
})
] ++ stdenv.lib.optionals stdenv.cc.isClang [
# Fixes https://github.com/boostorg/atomic/issues/15
(fetchpatch {
url = https://github.com/boostorg/atomic/commit/6e14ca24dab50ad4c1fa8c27c7dd6f1cb791b534.patch;
sha256 = "102g35ygvv8cxagp9651284xk4vybk93q2fm577y4mdxf5k46b7a";
stripLen = 1;
})
# Needed for the next patch
(fetchpatch {
url = https://github.com/boostorg/asio/commit/38cb19719748ad56b14d73ca1fff5828f36e5894.patch;
sha256 = "0cj9cxz9rfbsx8p8f5alxx00dq3r7g0vh23j68bbxbs9gq1arq2n";
stripLen = 1;
})
# Fixes https://github.com/boostorg/asio/pull/91
(fetchpatch {
url = https://github.com/boostorg/asio/commit/43874d5497414c67655d901e48c939ef01337edb.patch;
sha256 = "1c2ds164s2ygvpb4785p4ncv8ywbpm08cphirb99xp4mqvb693is";
stripLen = 1;
})
];
src = fetchurl {
url = "mirror://sourceforge/boost/boost_1_67_0.tar.bz2";

View file

@ -114,8 +114,9 @@ stdenv.mkDerivation {
description = "Collection of C++ libraries";
license = stdenv.lib.licenses.boost;
platforms = (platforms.unix ++ platforms.windows);
badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux";
platforms = platforms.unix ++ platforms.windows;
badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux"
++ stdenv.lib.optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin";
maintainers = with maintainers; [ peti ];
};

View file

@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=argument-outside-range";
meta = with stdenv.lib; {
description = "A professional free 3D Game Multiphysics Library";
longDescription = ''

View file

@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
# /build/clucene-core-2.3.3.4/build/bin/cl_test"
doCheck = false;
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with stdenv.lib; {
description = "Core library for full-featured text search engine";
longDescription = ''

View file

@ -46,7 +46,7 @@ let
'';
binPrograms = optional (!stdenv.isDarwin) "gapplication" ++ [ "gdbus" "gio" "gsettings" ];
version = "2.60.0";
version = "2.60.1";
in
stdenv.mkDerivation rec {
@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0ls3njqknb345ni5i8hn9nr1n70kn6s8bi0g6kcqj3c4js5mv1i0";
sha256 = "0q2mkdvp20v6dvrhik8k5j875kj29hcfz346xi0624n6spsq9y49";
};
patches = optional stdenv.isDarwin ./darwin-compilation.patch

View file

@ -1,6 +1,6 @@
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -101,6 +101,39 @@
@@ -95,6 +95,39 @@ def get_windows_option_group(parser):
return group
@ -40,7 +40,7 @@
def _get_option_parser():
parser = optparse.OptionParser('%prog [options] sources',
version='%prog ' + giscanner.__version__)
@@ -211,6 +244,10 @@
@@ -205,6 +238,10 @@ match the namespace prefix.""")
parser.add_option("", "--filelist",
action="store", dest="filelist", default=[],
help="file containing headers and sources to be scanned")
@ -53,7 +53,7 @@
parser.add_option_group(group)
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -62,6 +62,12 @@
@@ -57,6 +57,12 @@ def _ldd_library_pattern(library_name):
$""" % re.escape(library_name), re.VERBOSE)
@ -66,21 +66,33 @@
# This is a what we do for non-la files. We assume that we are on an
# ELF-like system where ldd exists and the soname extracted with ldd is
# a filename that can be opened with dlopen().
@@ -110,17 +116,16 @@ def _resolve_non_libtool(options, binary, libraries):
if isinstance(output, bytes):
@@ -106,7 +112,8 @@ def _resolve_non_libtool(options, binary, libraries):
output = output.decode("utf-8", "replace")
- # Use absolute paths on OS X to conform to how libraries are usually
- # referenced on OS X systems, and file names everywhere else.
- basename = platform.system() != 'Darwin'
- return resolve_from_ldd_output(libraries, output, basename=basename)
+ # Never strip away absolute paths in Nix
+ basename = False
+ return resolve_from_ldd_output(libraries, output, basename=basename, fallback_libpath=options.fallback_libpath)
shlibs = resolve_from_ldd_output(libraries, output)
- return list(map(sanitize_shlib_path, shlibs))
+ fallback_libpath = options.fallback_libpath or "";
+ return list(map(lambda p: os.path.join(fallback_libpath, p), map(sanitize_shlib_path, shlibs)))
-def resolve_from_ldd_output(libraries, output, basename=False):
+def resolve_from_ldd_output(libraries, output, basename=False, fallback_libpath=""):
def sanitize_shlib_path(lib):
@@ -115,19 +122,18 @@ def sanitize_shlib_path(lib):
# In case we get relative paths on macOS (like @rpath) then we fall
# back to the basename as well:
# https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
- if sys.platform == "darwin":
- if not os.path.isabs(lib):
- return os.path.basename(lib)
- return lib
- else:
+
+ # Always use absolute paths if available
+ if not os.path.isabs(lib):
return os.path.basename(lib)
+ return lib
def resolve_from_ldd_output(libraries, output):
patterns = {}
for library in libraries:
if not os.path.isfile(library):
@ -89,7 +101,7 @@
if len(patterns) == 0:
return []
@@ -129,11 +134,14 @@ def resolve_from_ldd_output(libraries, output, basename=False):
@@ -139,8 +145,11 @@ def resolve_from_ldd_output(libraries, output):
if line.endswith(':'):
continue
for word in line.split():
@ -102,14 +114,10 @@
+ m = pattern.match(word)
if m:
del patterns[library]
- shlibs.append(_sanitize_install_name(m.group()))
+ shlibs.append(os.path.join(fallback_libpath, _sanitize_install_name(m.group())))
break
if len(patterns) > 0:
shlibs.append(m.group())
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -116,17 +116,11 @@
@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file):
if dlname is None:
return None

View file

@ -9,7 +9,7 @@
let
pname = "gobject-introspection";
version = "1.60.0";
version = "1.60.1";
in
with stdenv.lib;
stdenv.mkDerivation rec {
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0pgk9lcvz3i79m6g2ynlp00ghws7g0p0d5qyf0k72warrf841zly";
sha256 = "1cr4r3lh5alrks9q2ycs1kn2crnkhrhn2wrmibng6dndkr4x2i6q";
};
outputs = [ "out" "dev" "man" ];
@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;
patches = [
./macos-shared-library.patch
(substituteAll {
src = ./test_shlibs.patch;
inherit nixStoreDir;

View file

@ -1,36 +0,0 @@
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index c93d20c..4d4915d 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -43,6 +43,22 @@ def _resolve_libtool(options, binary, libraries):
return shlibs
+def _sanitize_install_name(install_name):
+ '''
+ On macOS, the dylib can be built with install_name as @rpath/libfoo.so
+ instead of the absolute path to the library, so handle that. The name
+ can also be @loader_path or @executable_path.
+ '''
+ if not install_name.startswith('@'):
+ return install_name
+ if install_name.startswith('@rpath/'):
+ return install_name[7:]
+ if install_name.startswith('@loader_path/'):
+ return install_name[13:]
+ if install_name.startswith('@executable_path/'):
+ return install_name[17:]
+ raise RuntimeError('Unknown install_name {!r}'.format(install_name))
+
# Assume ldd output is something vaguely like
#
@@ -136,7 +152,7 @@ def resolve_from_ldd_output(libraries, output, basename=False):
m = pattern.match(word)
if m:
del patterns[library]
- shlibs.append(m.group())
+ shlibs.append(_sanitize_install_name(m.group()))
break
if len(patterns) > 0:

View file

@ -1,6 +1,6 @@
--- a/tests/scanner/test_shlibs.py
+++ b/tests/scanner/test_shlibs.py
@@ -10,6 +10,46 @@ from giscanner.shlibs import resolve_from_ldd_output
@@ -7,6 +7,30 @@ from giscanner.shlibs import resolve_from_ldd_output, sanitize_shlib_path
class TestLddParser(unittest.TestCase):
@ -26,25 +26,18 @@
+ self.assertEqual(
+ ['@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libglib-2.0.so.0',
+ '@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libgio-2.0.so.0'],
+ resolve_from_ldd_output(libraries, output, basename=False))
+
+ def test_resolve_from_ldd_output_macos(self):
+ output = '''\
+ @rpath/libatk-1.0.0.dylib
+ @rpath/libgstreamer-1.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
+ /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libglib-2.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
+ /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libintl.dylib (compatibility version 0.0.0, current version 0.0.0)
+ /Volumes/USB_SSD/cerbero/build/dist/darwin_x86_64/lib/libgobject-2.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
+ /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
+ '''
+ libraries = ['atk-1.0']
+ fallback_libpath = '@nixStoreDir@/1ynd5b01z87c1nw75k5iy7sq49hpkw53-atk-2.30.0/lib'
+
+ self.assertEqual(
+ [ '%s/libatk-1.0.0.dylib' % fallback_libpath ],
+ resolve_from_ldd_output(libraries, output, basename=False, fallback_libpath=fallback_libpath))
+ resolve_from_ldd_output(libraries, output))
+
def test_resolve_from_ldd_output(self):
output = '''\
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbe12d68000)
@@ -40,7 +64,8 @@ class TestLddParser(unittest.TestCase):
self.assertEqual(
sanitize_shlib_path('/foo/bar'),
- '/foo/bar' if sys.platform == 'darwin' else 'bar')
+ # NixOS always want the absolute path
+ '/foo/bar')
def test_unresolved_library(self):
output = ''

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, libpulseaudio, alsaLib, libcap
, CoreAudio, CoreServices, AudioUnit
, CoreAudio, CoreServices, AudioUnit, AudioToolbox
, usePulseAudio }:
stdenv.mkDerivation rec {

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libcddb ncurses help2man ]
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ];
doCheck = true;
doCheck = !stdenv.isDarwin;
meta = with stdenv.lib; {
description = "A library for OS-independent CD-ROM and CD image access";

View file

@ -1,27 +1,14 @@
{ stdenv, fetchurl, pkgconfig, libxml2, glib, fetchpatch, gnome3 }:
{ stdenv, fetchurl, pkgconfig, libxml2, glib, gnome3 }:
stdenv.mkDerivation rec {
pname = "libcroco";
version = "0.6.12";
version = "0.6.13";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0q7qhi7z64i26zabg9dbs5706fa8pmzp1qhpa052id4zdiabbi6x";
sha256 = "1m110rbj5d2raxcdp4iz0qp172284945awrsbdlq99ksmqsc4zkn";
};
patches = [
(fetchpatch {
name = "CVE-2017-7960.patch";
url = https://gitlab.gnome.org/GNOME/libcroco/commit/898e3a8c8c0314d2e6b106809a8e3e93cf9d4394.patch;
sha256 = "1xjwdqijxf4b7mhdp3kkgnb6c14y0bn3b3gg79kyrm82x696d94l";
})
(fetchpatch {
name = "CVE-2017-7961.patch";
url = https://gitlab.gnome.org/GNOME/libcroco/commit/9ad72875e9f08e4c519ef63d44cdbd94aa9504f7.patch;
sha256 = "0zakd72ynzjgzskwyvqglqiznsb93j1bkvc1lgyrzgv9rwrbwv9s";
})
];
outputs = [ "out" "dev" ];
outputBin = "dev";

View file

@ -14,17 +14,12 @@ stdenv.mkDerivation rec {
buildInputs = [ libpthreadstubs libpciaccess valgrind-light ];
# libdrm as of 2.4.70 does not actually do anything with udev.
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
postPatch = ''
for a in */*-symbol-check ; do
patchShebangs $a
done
'';
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
configureFlags = [ "--enable-install-test-programs" ]
++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64)
[ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ]

View file

@ -1,88 +0,0 @@
diff -Naur libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c libdrm-2.4.26/intel/intel_bufmgr_gem.c
--- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c 2011-04-01 10:30:51.000000000 -0400
+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400
@@ -51,6 +51,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <stdbool.h>
+#include <sys/time.h>
#include "errno.h"
#include "libdrm_lists.h"
@@ -987,9 +988,9 @@
if (atomic_dec_and_test(&bo_gem->refcount)) {
drm_intel_bufmgr_gem *bufmgr_gem =
(drm_intel_bufmgr_gem *) bo->bufmgr;
- struct timespec time;
+ struct timeval time;
- clock_gettime(CLOCK_MONOTONIC, &time);
+ gettimeofday(&time, NULL);
pthread_mutex_lock(&bufmgr_gem->lock);
drm_intel_gem_bo_unreference_final(bo, time.tv_sec);
diff -Naur libdrm-2.4.26-orig/xf86drm.c libdrm-2.4.26/xf86drm.c
--- libdrm-2.4.26-orig/xf86drm.c 2011-03-21 09:39:24.000000000 -0400
+++ libdrm-2.4.26/xf86drm.c 2011-08-29 02:17:49.000000000 -0400
@@ -51,6 +51,9 @@
#include <sys/mman.h>
#include <sys/time.h>
#include <stdarg.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <mach/mach_time.h>
+#endif
/* Not all systems have MAP_FAILED defined */
#ifndef MAP_FAILED
@@ -1941,20 +1944,43 @@
*/
int drmWaitVBlank(int fd, drmVBlankPtr vbl)
{
+#if defined(__APPLE__) && defined(__MACH__)
+ uint64_t start, end, elapsed, elapsedNano;
+ static const uint64_t maxElapsed = 2000000000;
+ static mach_timebase_info_data_t timebaseInfo;
+ if ( timebaseInfo.denom == 0 ) {
+ (void) mach_timebase_info(&timebaseInfo);
+ }
+#else
struct timespec timeout, cur;
+#endif
int ret;
+#if defined(__APPLE__) && defined(__MACH__)
+ start = mach_absolute_time();
+#else
ret = clock_gettime(CLOCK_MONOTONIC, &timeout);
if (ret < 0) {
fprintf(stderr, "clock_gettime failed: %s\n", strerror(ret));
goto out;
}
timeout.tv_sec++;
+#endif
do {
ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
vbl->request.type &= ~DRM_VBLANK_RELATIVE;
if (ret && errno == EINTR) {
+#if defined(__APPLE__) && defined(__MACH__)
+ end = mach_absolute_time();
+ elapsed = end - start;
+ elapsedNano = elapsed * timebaseInfo.numer / timebaseInfo.denom;
+ if (elapsedNano > maxElapsed) {
+ errno = EBUSY;
+ ret = -1;
+ break;
+ }
+#else
clock_gettime(CLOCK_MONOTONIC, &cur);
/* Timeout after 1s */
if (cur.tv_sec > timeout.tv_sec + 1 ||
@@ -1964,6 +1990,7 @@
ret = -1;
break;
}
+#endif
}
} while (ret && errno == EINTR);

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
@ -30,6 +30,12 @@ stdenv.mkDerivation rec {
)
'';
patches = stdenv.lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch";
sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1";
});
doCheck = false; # fails 1 out of 10 tests
meta = with stdenv.lib; {

View file

@ -1,41 +0,0 @@
Adapted from https://github.com/zcash/libsnark/pull/10
diff --git a/depends/libff/libff/common/profiling.cpp b/depends/libff/libff/common/profiling.cpp
index f2a1985..319149c 100755
--- a/depends/libff/libff/common/profiling.cpp
+++ b/depends/libff/libff/common/profiling.cpp
@@ -27,6 +27,13 @@
#include <proc/readproc.h>
#endif
+#ifdef __MACH__
+#include <time.h>
+#include <sys/time.h>
+#include <mach/clock.h>
+#include <mach/mach.h>
+#endif
+
namespace libff {
long long get_nsec_time()
@@ -42,10 +49,20 @@ long long get_nsec_cpu_time()
return 0;
#else
::timespec ts;
+#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);
+ ts.tv_sec = mts.tv_sec;
+ ts.tv_nsec = mts.tv_nsec;
+#else
if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) )
throw ::std::runtime_error("clock_gettime(CLOCK_PROCESS_CPUTIME_ID) failed");
// If we expected this to work, don't silently ignore failures, because that would hide the problem and incur an unnecessarily system-call overhead. So if we ever observe this exception, we should probably add a suitable #ifdef .
//TODO: clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is not supported by native Windows. What about Cygwin? Should we #ifdef on CLOCK_PROCESS_CPUTIME_ID or on __linux__?
+#endif
return ts.tv_sec * 1000000000ll + ts.tv_nsec;
#endif
}

View file

@ -19,8 +19,6 @@ in stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [ ./darwin-fix-clock-gettime.patch ];
enableParallelBuilding = true;
meta = with stdenv.lib; {

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "libsoup";
version = "2.66.0";
version = "2.66.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "08c9kkdhzy504gv23pfdm4sq3dd3j20sikwz6gv0qrwcdjnw5bai";
sha256 = "1zs3bhspwg7fggxd7x1rrggpkcf2j9ch6dhncq9syh252z0vcb2a";
};
postPatch = ''

View file

@ -31,7 +31,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = true;
checkPhase = "make tests && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib make test";
preCheck = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib
'';
checkTarget = "tests test";
meta = with stdenv.lib; {
description = "High-level, multiplatform C++ network packet sniffing and crafting library";

View file

@ -1,14 +1,14 @@
{ stdenv, lib, fetchpatch, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, ApplicationServices, CoreServices }:
stdenv.mkDerivation rec {
version = "1.27.0";
version = "1.28.0";
pname = "libuv";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1nhd3772qymlv0b251wg9rrqz279vki4hnd4s23yyll0kpmzkpac";
sha256 = "0l0gx69sdy3sv3pirjbca2ws54n9d83mj0j96h77k0ncywimvi64";
};
postPatch = let

View file

@ -6,14 +6,14 @@
stdenv.mkDerivation rec {
name = "libva-${lib.optionalString minimal "minimal-"}${version}";
version = "2.4.0";
version = "2.4.1";
# update libva-utils and vaapiIntel as well
src = fetchFromGitHub {
owner = "01org";
repo = "libva";
rev = version;
sha256 = "1b58n6rjfsfjfw1s5kdfa0jpfiqs83g2w14s7sfp1qkckkz3988l";
sha256 = "06kqff05jhd87yi53gyc2qivgg4sbf19qyznm9s4dyz92k04cl5c";
};
outputs = [ "dev" "out" ];

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libxml2, findXMLCatalogs, python2, libgcrypt
{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs, python2, libgcrypt
, cryptoSupport ? false
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
}:
@ -18,6 +18,14 @@ stdenv.mkDerivation rec {
sha256 = "1j1q1swnsy8jgi9x7mclvkrqhfgn09886gdlr9wzk7a08i8n0dlf";
};
patches = [
(fetchpatch {
name = "CVE-2019-11068.patch";
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
})
];
outputs = [ "bin" "dev" "out" "man" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
buildInputs = [ libxml2.dev ]

View file

@ -1,76 +0,0 @@
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

@ -93,7 +93,7 @@ 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" ]
++ lib.optional (elem "swrast" galliumDrivers) "osmesa";

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, glib, expat, pam, perl
, intltool, spidermonkey_52 , gobject-introspection, libxslt, docbook_xsl, dbus
, intltool, spidermonkey_60 , gobject-introspection, libxslt, docbook_xsl, dbus
, docbook_xml_dtd_412, gtk-doc, coreutils
, useSystemd ? stdenv.isLinux, systemd
, withGnome ? true
@ -14,28 +14,14 @@ let
in
stdenv.mkDerivation rec {
name = "polkit-0.115";
pname = "polkit";
version = "0.116";
src = fetchurl {
url = "https://www.freedesktop.org/software/polkit/releases/${name}.tar.gz";
sha256 = "0c91y61y4gy6p91cwbzg32dhavw4b7fflg370rimqhdxpzdfr1rg";
url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.gz";
sha256 = "1c9lbpndh5zis22f154vjrhnqw65z8s85nrgl42v738yf6g0q5w8";
};
patches = [
# CVE-2019-6133 - See: https://bugs.chromium.org/p/project-zero/issues/detail?id=1692
(fetchpatch {
url = "https://gitlab.freedesktop.org/polkit/polkit/commit/6cc6aafee135ba44ea748250d7d29b562ca190e3.patch";
name = "CVE-2019-6133.patch";
sha256 = "0jjlbjzqcz96xh6w3nv3ss9jl0hhrcd7jg4aa5advf08ibaj29r1";
})
# CVE-2018-19788 - high UID fixup
(fetchpatch {
url = "https://gitlab.freedesktop.org/polkit/polkit/commit/5230646dc6876ef6e27f57926b1bad348f636147.patch";
name = "CVE-2018-19788.patch";
sha256 = "1y3az4mlxx8k1zcss5qm7k102s7k1kqgcfnf11j9678fh7p008vp";
})
];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i -e "s/-Wl,--as-needed//" configure.ac
'';
@ -46,7 +32,7 @@ stdenv.mkDerivation rec {
[ glib gtk-doc pkgconfig intltool perl ]
++ [ libxslt docbook_xsl docbook_xml_dtd_412 ]; # man pages
buildInputs =
[ glib expat pam spidermonkey_52 ]
[ glib expat pam spidermonkey_60 ]
++ stdenv.lib.optional useSystemd systemd
++ stdenv.lib.optional withGnome gobject-introspection;
@ -72,15 +58,21 @@ stdenv.mkDerivation rec {
configureFlags = [
"--datadir=${system}/share"
"--sysconfdir=/etc"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
"--with-polkitd-user=polkituser" #TODO? <nixos> config.ids.uids.polkituser
"--with-os-type=NixOS" # not recognized but prevents impurities on non-NixOS
(if withGnome then "--enable-introspection" else "--disable-introspection")
] ++ stdenv.lib.optional (!doCheck) "--disable-test";
makeFlags = "INTROSPECTION_GIRDIR=$(out)/share/gir-1.0 INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0";
makeFlags = [
"INTROSPECTION_GIRDIR=${placeholder "out"}/share/gir-1.0"
"INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
];
installFlags=["datadir=$(out)/share" "sysconfdir=$(out)/etc"];
installFlags = [
"datadir=${placeholder "out"}/share"
"sysconfdir=${placeholder "out"}/etc"
];
inherit doCheck;
checkInputs = [dbus];

View file

@ -231,5 +231,6 @@ stdenv.mkDerivation rec {
license = lib.licenses.lgpl21Plus; # or gpl3
maintainers = with lib.maintainers; [ orivej lovek323 phreedom sander ];
platforms = lib.platforms.unix;
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
cf-private,
cf-private, llvmPackages_5,
# options
developerBuild ? false,
@ -51,34 +51,24 @@ let
patches = {
qtbase = [
./qtbase.patch
./qtbase-darwin.patch
./qtbase-revert-no-macos10.10.patch
./qtbase-fixguicmake.patch
] ++ optionals stdenv.isDarwin [
./qtbase-darwin-nseventtype.patch
./qtbase-darwin-revert-69221.patch
];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];
qttools = [ ./qttools.patch ];
qtwebengine = [ ./qtwebengine-no-build-skip.patch ]
++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
++ optionals stdenv.isDarwin [
./qtwebengine-darwin-no-platform-check.patch
./qtwebengine-darwin-sdk-10.10.patch
./qtwebengine-darwin-old-sdk.patch
];
qtwebkit = [ ./qtwebkit.patch ]
++ optionals stdenv.isDarwin [
./qtwebkit-darwin-no-readline.patch
./qtwebkit-darwin-no-qos-classes.patch
];
qtwebengine = [
./qtwebengine-no-build-skip.patch
./qtwebengine-darwin-no-platform-check.patch
];
qtwebkit = [ ./qtwebkit.patch ];
};
mkDerivation =
import ../mkDerivation.nix
{ inherit stdenv; inherit (stdenv) lib; }
import ../mkDerivation.nix {
inherit (stdenv) lib;
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
}
{ inherit debug; };
qtModule =
@ -109,7 +99,7 @@ let
qtdoc = callPackage ../modules/qtdoc.nix {};
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
qtimageformats = callPackage ../modules/qtimageformats.nix {};
qtlocation = callPackage ../modules/qtlocation.nix {};
qtlocation = callPackage ../modules/qtlocation.nix { };
qtmacextras = callPackage ../modules/qtmacextras.nix {
inherit cf-private;
};

View file

@ -1,13 +0,0 @@
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
removeMonitor();
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
}];

View file

@ -1,73 +0,0 @@
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 00c3f7c22c..94d35f59d6 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1355,15 +1355,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
{
QMacAutoReleasePool pool;
- Qt::WindowType type = window()->type();
- Qt::WindowFlags flags = window()->flags();
-
- // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
- // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
- // higher than the height of the screen in its non-rotated state, unless the window is
- // created with the NSWindowStyleMaskBorderless style mask.
- NSWindowStyleMask styleMask = windowStyleMask(flags);
-
QRect rect = geometry();
QScreen *targetScreen = nullptr;
@@ -1375,22 +1366,26 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
}
if (!targetScreen) {
- qCWarning(lcQpaCocoaWindow) << "Window position" << rect << "outside any known screen, using primary screen";
+ qCWarning(lcQpaCocoaWindow) << "Window position outside any known screen, using primary screen";
targetScreen = QGuiApplication::primaryScreen();
- // AppKit will only reposition a window that's outside the target screen area if
- // the window has a title bar. If left out, the window ends up with no screen.
- // The style mask will be corrected to the original style mask in setWindowFlags.
- styleMask |= NSWindowStyleMaskTitled;
}
rect.translate(-targetScreen->geometry().topLeft());
QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(targetScreen->handle());
NSRect frame = QCocoaScreen::mapToNative(rect, cocoaScreen);
+ // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
+ // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
+ // higher than the height of the screen in its non-rotated state, unless the window is
+ // created with the NSWindowStyleMaskBorderless style mask.
+
+ Qt::WindowType type = window()->type();
+ Qt::WindowFlags flags = window()->flags();
+
// Create NSWindow
Class windowClass = shouldBePanel ? [QNSPanel class] : [QNSWindow class];
QCocoaNSWindow *nsWindow = [[windowClass alloc] initWithContentRect:frame
- styleMask:styleMask
+ styleMask:windowStyleMask(flags)
// Deferring window creation breaks OpenGL (the GL context is
// set up before the window is shown and needs a proper window)
backing:NSBackingStoreBuffered defer:NO
@@ -1399,9 +1394,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow",
"Resulting NSScreen should match the requested NSScreen");
- if (targetScreen != window()->screen())
- QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
-
nsWindow.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
// Prevent Cocoa from releasing the window on close. Qt
@@ -1421,6 +1413,9 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
});
}
+ if (targetScreen != window()->screen())
+ QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
+
nsWindow.restorable = NO;
nsWindow.level = windowLevel(flags);

View file

@ -1,70 +0,0 @@
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 341d3bccf2..3368234c26 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
QMacAutoReleasePool pool;
userProfiles.clear();
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
QMacAutoReleasePool pool;
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
scanThread->interfaceName = QString::fromNSString(ifName);
scanThread->start();
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index a17a02b629..d76c42fa03 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -114,7 +114,7 @@ void QCocoaScreen::updateGeometry()
return;
// The reference screen for the geometry is always the primary screen
- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 72f3bc0075..a9c058a850 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1676,7 +1676,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
if (!m_drawContentBorderGradient) {
window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
- [window.contentView.superview setNeedsDisplay:YES];
+ [[window.contentView superview] setNeedsDisplay:YES];
window.titlebarAppearsTransparent = NO;
return;
}
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index cb13b7d184..0159d68dca 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -231,7 +231,7 @@ static bool isMouseEvent(NSEvent *ev)
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
NSPoint loc = [theEvent locationInWindow];
NSRect windowFrame = [self convertRectFromScreen:self.frame];
- NSRect contentFrame = self.contentView.frame;
+ NSRect contentFrame = [self.contentView frame];
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
}
@@ -260,7 +260,7 @@ static bool isMouseEvent(NSEvent *ev)
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)

View file

@ -1,102 +0,0 @@
Revert "Remove code paths for macOS < 10.11"
This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
From: Jake Petroules <jake.petroules@qt.io>
Date: Thu, 8 Feb 2018 11:05:42 -0800
Subject: [PATCH] Remove code paths for macOS < 10.11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
---
.../fontdatabases/mac/qfontengine_coretext.mm | 16 +++-------------
src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +-----
src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ----------------
3 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 98b753eff9..489d9cd031 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -47,18 +47,28 @@
#include <cmath>
-#if defined(Q_OS_MACOS)
+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
#import <AppKit/AppKit.h>
#endif
-#if defined(QT_PLATFORM_UIKIT)
+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
#import <UIKit/UIKit.h>
#endif
// These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
// but they are not documented and are not in public headers so are private API and exposed
// only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
-#if defined(Q_OS_MACOS)
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
+#define kCTFontWeightUltraLight -0.8
+#define kCTFontWeightThin -0.6
+#define kCTFontWeightLight -0.4
+#define kCTFontWeightRegular 0
+#define kCTFontWeightMedium 0.23
+#define kCTFontWeightSemibold 0.3
+#define kCTFontWeightBold 0.4
+#define kCTFontWeightHeavy 0.56
+#define kCTFontWeightBlack 0.62
+#elif defined(Q_OS_OSX)
#define kCTFontWeightUltraLight NSFontWeightUltraLight
#define kCTFontWeightThin NSFontWeightThin
#define kCTFontWeightLight NSFontWeightLight
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 94f2125bad..272cd9f3dc 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
// resetting our mCurrentDir, set the delegate
// here to make sure it gets the correct value.
[mSavePanel setDelegate:self];
- mOpenPanel.accessoryViewDisclosed = YES;
+
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
+ if (__builtin_available(macOS 10.11, *))
+ mOpenPanel.accessoryViewDisclosed = YES;
+#endif
if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
[mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 057a4c2943..eb55e50622 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
return QCocoaScreen::mapToNative(maximizedFrame);
}
+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
+/*
+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
+ in black bars on top and bottom of the window. By implementing the following
+ method, AppKit will choose that instead, and resolve the right fullscreen
+ geometry.
+*/
+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
+{
+ Q_UNUSED(proposedSize);
+ Q_ASSERT(window == m_cocoaWindow->nativeWindow());
+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
+}
+#endif
+
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
{
Q_UNUSED(window);

View file

@ -1,30 +0,0 @@
Fix a following build error:
In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7:
../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."
static_assert(
^
../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here
: AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
^
../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here
static_assert(internal::AssertBindArgsValidity<
^
../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
return base::BindRepeating(std::forward<Functor>(functor),
^
../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
^
--- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic(
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
- weak_ptr_factory_.GetWeakPtr(), nil));
+ weak_ptr_factory_.GetWeakPtr(), nullptr));
}
}

View file

@ -1,21 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
--- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
@@ -45,7 +45,7 @@ NSString *RTCFieldTrialTrendlineFilterValue(
return [NSString stringWithFormat:format, windowSize, smoothingCoeff, thresholdGain];
}
-void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials) {
+void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials) {
if (!fieldTrials) {
RTCLogWarning(@"No fieldTrials provided.");
return;
diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
--- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
@@ -40,4 +40,4 @@ RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue(
* Must be called before any other call into WebRTC. See:
* webrtc/system_wrappers/include/field_trial_default.h
*/
-RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials);
+RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials);

View file

@ -1,160 +0,0 @@
Fix build against 10.10 SDK
The SecKey part perhaps could be fixed by implementing a revert to
https://chromium.googlesource.com/chromium/src.git/+/8418e098b9cbedf884878b61dcd3292c515845cf%5E%21/#F0
--- a/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -1,3 +1,4 @@
+#define NSEventTypeScrollWheel 22
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
--- a/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
+++ b/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
@@ -48,21 +48,6 @@ namespace net {
namespace {
-// TODO(davidben): Remove this when we switch to building to the 10.13
-// SDK. https://crbug.com/780980
-#if !defined(MAC_OS_X_VERSION_10_13) || \
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
-API_AVAILABLE(macosx(10.13))
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 =
- CFSTR("algid:sign:RSA:digest-PSS:SHA256:SHA256:32");
-API_AVAILABLE(macosx(10.13))
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 =
- CFSTR("algid:sign:RSA:digest-PSS:SHA384:SHA384:48");
-API_AVAILABLE(macosx(10.13))
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 =
- CFSTR("algid:sign:RSA:digest-PSS:SHA512:SHA512:64");
-#endif
-
class ScopedCSSM_CC_HANDLE {
public:
ScopedCSSM_CC_HANDLE() : handle_(0) {}
@@ -187,109 +172,6 @@ class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate {
DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM);
};
-// Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized.
-API_AVAILABLE(macosx(10.12))
-SecKeyAlgorithm GetSecKeyAlgorithm(uint16_t algorithm) {
- switch (algorithm) {
- case SSL_SIGN_RSA_PKCS1_SHA512:
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512;
- case SSL_SIGN_RSA_PKCS1_SHA384:
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384;
- case SSL_SIGN_RSA_PKCS1_SHA256:
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256;
- case SSL_SIGN_RSA_PKCS1_SHA1:
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1;
- case SSL_SIGN_RSA_PKCS1_MD5_SHA1:
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw;
- case SSL_SIGN_ECDSA_SECP521R1_SHA512:
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA512;
- case SSL_SIGN_ECDSA_SECP384R1_SHA384:
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA384;
- case SSL_SIGN_ECDSA_SECP256R1_SHA256:
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA256;
- case SSL_SIGN_ECDSA_SHA1:
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA1;
- }
-
- if (base::mac::IsAtLeastOS10_13()) {
- switch (algorithm) {
- case SSL_SIGN_RSA_PSS_SHA512:
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA512;
- case SSL_SIGN_RSA_PSS_SHA384:
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA384;
- case SSL_SIGN_RSA_PSS_SHA256:
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA256;
- }
- }
-
- return nullptr;
-}
-
-class API_AVAILABLE(macosx(10.12)) SSLPlatformKeySecKey
- : public ThreadedSSLPrivateKey::Delegate {
- public:
- SSLPlatformKeySecKey(int type, size_t max_length, SecKeyRef key)
- : key_(key, base::scoped_policy::RETAIN) {
- // Determine the algorithms supported by the key.
- for (uint16_t algorithm : SSLPrivateKey::DefaultAlgorithmPreferences(
- type, true /* include PSS */)) {
- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
- if (sec_algorithm &&
- SecKeyIsAlgorithmSupported(key_.get(), kSecKeyOperationTypeSign,
- sec_algorithm)) {
- preferences_.push_back(algorithm);
- }
- }
- }
-
- ~SSLPlatformKeySecKey() override {}
-
- std::vector<uint16_t> GetAlgorithmPreferences() override {
- return preferences_;
- }
-
- Error Sign(uint16_t algorithm,
- base::span<const uint8_t> input,
- std::vector<uint8_t>* signature) override {
- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
- if (!sec_algorithm) {
- NOTREACHED();
- return ERR_FAILED;
- }
-
- const EVP_MD* md = SSL_get_signature_algorithm_digest(algorithm);
- uint8_t digest[EVP_MAX_MD_SIZE];
- unsigned digest_len;
- if (!md || !EVP_Digest(input.data(), input.size(), digest, &digest_len, md,
- nullptr)) {
- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
- }
-
- base::ScopedCFTypeRef<CFDataRef> digest_ref(CFDataCreateWithBytesNoCopy(
- kCFAllocatorDefault, digest, base::checked_cast<CFIndex>(digest_len),
- kCFAllocatorNull));
-
- base::ScopedCFTypeRef<CFErrorRef> error;
- base::ScopedCFTypeRef<CFDataRef> signature_ref(SecKeyCreateSignature(
- key_, sec_algorithm, digest_ref, error.InitializeInto()));
- if (!signature_ref) {
- LOG(ERROR) << error;
- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
- }
-
- signature->assign(
- CFDataGetBytePtr(signature_ref),
- CFDataGetBytePtr(signature_ref) + CFDataGetLength(signature_ref));
- return OK;
- }
-
- private:
- std::vector<uint16_t> preferences_;
- base::ScopedCFTypeRef<SecKeyRef> key_;
-
- DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey);
-};
-
scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
const X509Certificate* certificate,
SecKeyRef private_key) {
@@ -298,13 +180,6 @@ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
if (!GetClientCertInfo(certificate, &key_type, &max_length))
return nullptr;
- if (base::mac::IsAtLeastOS10_12()) {
- return base::MakeRefCounted<ThreadedSSLPrivateKey>(
- std::make_unique<SSLPlatformKeySecKey>(key_type, max_length,
- private_key),
- GetSSLPlatformKeyTaskRunner());
- }
-
const CSSM_KEY* cssm_key;
OSStatus status = SecKeyGetCSSMKey(private_key, &cssm_key);
if (status != noErr) {

View file

@ -1,11 +0,0 @@
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
--- a/Source/cmake/OptionsQt.cmake
+++ b/Source/cmake/OptionsQt.cmake
@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG)
endif ()
if (APPLE)
- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1)
endif ()
if (ENABLE_MATHML)

View file

@ -1,45 +0,0 @@
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
--- a/Source/JavaScriptCore/shell/CMakeLists.txt
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
@@ -9,7 +9,6 @@ set(JSC_LIBRARIES
)
if (WTF_OS_MAC_OS_X)
- list(APPEND JSC_LIBRARIES edit)
endif ()
if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -563,7 +563,6 @@
#if PLATFORM(IOS)
#define HAVE_NETWORK_EXTENSION 1
-#define HAVE_READLINE 1
#if USE(APPLE_INTERNAL_SDK)
#define USE_CFNETWORK 1
#endif
@@ -650,7 +649,6 @@
#define HAVE_MADV_DONTNEED 1
#define HAVE_MERGESORT 1
#define HAVE_PTHREAD_SETNAME_NP 1
-#define HAVE_READLINE 1
#define HAVE_SYS_TIMEB_H 1
#if !PLATFORM(GTK) && !PLATFORM(QT)
diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake
--- a/Source/WTF/wtf/PlatformMac.cmake
+++ b/Source/WTF/wtf/PlatformMac.cmake
@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED)
find_library(COCOA_LIBRARY Cocoa)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
-find_library(READLINE_LIBRARY Readline)
list(APPEND WTF_LIBRARIES
${COREFOUNDATION_LIBRARY}
${COCOA_LIBRARY}
- ${READLINE_LIBRARY}
libicucore.dylib
)

View file

@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
cf-private,
cf-private, llvmPackages_5,
# options
developerBuild ? false,
@ -51,11 +51,7 @@ let
patches = {
qtbase = [
./qtbase.patch
./qtbase-darwin.patch
./qtbase-revert-no-macos10.10.patch
./qtbase-fixguicmake.patch
] ++ optionals stdenv.isDarwin [
./qtbase-darwin-nseventtype.patch
];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
@ -73,8 +69,10 @@ let
};
mkDerivation =
import ../mkDerivation.nix
{ inherit stdenv; inherit (stdenv) lib; }
import ../mkDerivation.nix {
inherit (stdenv) lib;
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
}
{ inherit debug; };
qtModule =

View file

@ -1,13 +0,0 @@
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
removeMonitor();
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
}];

View file

@ -1,70 +0,0 @@
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index c3dd49ff3e..6871399817 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -283,7 +283,7 @@ void QScanThread::getUserConfigurations()
QMacAutoReleasePool pool;
userProfiles.clear();
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
@@ -598,7 +598,7 @@ void QCoreWlanEngine::doRequestUpdate()
QMacAutoReleasePool pool;
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
scanThread->interfaceName = QString::fromNSString(ifName);
scanThread->start();
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index afe14e623c..74d69c2fa1 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -127,7 +127,7 @@ void QCocoaScreen::updateProperties()
const qreal previousRefreshRate = m_refreshRate;
// The reference screen for the geometry is always the primary screen
- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index df1ad82592..0318a4ff96 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1704,7 +1704,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
if (!m_drawContentBorderGradient) {
window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
- [window.contentView.superview setNeedsDisplay:YES];
+ [[window.contentView superview] setNeedsDisplay:YES];
window.titlebarAppearsTransparent = NO;
return;
}
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index c17ad47aba..a0f1dd38fb 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -230,7 +230,7 @@ static bool isMouseEvent(NSEvent *ev)
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
NSPoint loc = [theEvent locationInWindow];
NSRect windowFrame = [self convertRectFromScreen:self.frame];
- NSRect contentFrame = self.contentView.frame;
+ NSRect contentFrame = [self.contentView frame];
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
}
@@ -257,7 +257,7 @@ static bool isMouseEvent(NSEvent *ev)
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
// Unfortunately there's no NSWindowListOrderedBackToFront,

View file

@ -1,102 +0,0 @@
Revert "Remove code paths for macOS < 10.11"
This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
From: Jake Petroules <jake.petroules@qt.io>
Date: Thu, 8 Feb 2018 11:05:42 -0800
Subject: [PATCH] Remove code paths for macOS < 10.11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
---
.../fontdatabases/mac/qfontengine_coretext.mm | 16 +++-------------
src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +-----
src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ----------------
3 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 98b753eff9..489d9cd031 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -47,18 +47,28 @@
#include <cmath>
-#if defined(Q_OS_MACOS)
+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
#import <AppKit/AppKit.h>
#endif
-#if defined(QT_PLATFORM_UIKIT)
+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
#import <UIKit/UIKit.h>
#endif
// These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
// but they are not documented and are not in public headers so are private API and exposed
// only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
-#if defined(Q_OS_MACOS)
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
+#define kCTFontWeightUltraLight -0.8
+#define kCTFontWeightThin -0.6
+#define kCTFontWeightLight -0.4
+#define kCTFontWeightRegular 0
+#define kCTFontWeightMedium 0.23
+#define kCTFontWeightSemibold 0.3
+#define kCTFontWeightBold 0.4
+#define kCTFontWeightHeavy 0.56
+#define kCTFontWeightBlack 0.62
+#elif defined(Q_OS_OSX)
#define kCTFontWeightUltraLight NSFontWeightUltraLight
#define kCTFontWeightThin NSFontWeightThin
#define kCTFontWeightLight NSFontWeightLight
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 94f2125bad..272cd9f3dc 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
// resetting our mCurrentDir, set the delegate
// here to make sure it gets the correct value.
[mSavePanel setDelegate:self];
- mOpenPanel.accessoryViewDisclosed = YES;
+
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
+ if (__builtin_available(macOS 10.11, *))
+ mOpenPanel.accessoryViewDisclosed = YES;
+#endif
if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
[mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 057a4c2943..eb55e50622 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
return QCocoaScreen::mapToNative(maximizedFrame);
}
+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
+/*
+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
+ in black bars on top and bottom of the window. By implementing the following
+ method, AppKit will choose that instead, and resolve the right fullscreen
+ geometry.
+*/
+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
+{
+ Q_UNUSED(proposedSize);
+ Q_ASSERT(window == m_cocoaWindow->nativeWindow());
+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
+}
+#endif
+
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
{
Q_UNUSED(window);

View file

@ -38,7 +38,7 @@ let
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
patches = {
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [ ./qtscript.patch ];
qtserialport = [ ./qtserialport.patch ];

View file

@ -1,35 +0,0 @@
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 341d3bc..3368234 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
QMacAutoReleasePool pool;
userProfiles.clear();
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
QMacAutoReleasePool pool;
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
for (NSString *ifName in wifiInterfaces) {
scanThread->interfaceName = QString::fromNSString(ifName);
scanThread->start();
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 5cd4beb..84919e6 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -320,7 +320,7 @@ static void qt_closePopups()
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)

View file

@ -2,7 +2,7 @@
stdenv, lib,
src, patches, version, qtCompatVersion,
coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2,
coreutils, bison, flex, gdb, gperf, lndir, perl, pkgconfig, python2,
which,
# darwin support
darwin, libiconv,
@ -78,17 +78,15 @@ stdenv.mkDerivation {
[ libinput ]
++ lib.optional withGtk3 gtk3
)
++ lib.optional stdenv.isDarwin
# Needed for OBJC_CLASS_$_NSDate symbols.
[ darwin.cf-private ]
# Needed for OBJC_CLASS_$_NSDate symbols.
++ lib.optional stdenv.isDarwin darwin.cf-private
++ lib.optional developerBuild gdb
++ lib.optional (cups != null) cups
++ lib.optional (mysql != null) mysql.connector-c
++ lib.optional (postgresql != null) postgresql;
nativeBuildInputs =
[ bison flex gperf lndir perl pkgconfig python2 which ]
++ lib.optional (!stdenv.isDarwin) patchelf;
[ bison flex gperf lndir perl pkgconfig python2 which ];
propagatedNativeBuildInputs = [ lndir ];
@ -199,26 +197,11 @@ stdenv.mkDerivation {
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
]
++ (
if stdenv.isDarwin
then
[
"-Wno-missing-sysroot"
"-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090"
"-D__AVAILABILITY_INTERNAL__MAC_10_10=__attribute__((availability(macosx,introduced=10.10)))"
# Note that nixpkgs's objc4 is from macOS 10.11 while the SDK is
# 10.9 which necessitates the above macro definition that mentions
# 10.10
]
else
lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
++ lib.optionals withGtk3
[
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
]
)
++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
++ lib.optionals withGtk3 [
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
]
++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC";
prefixKey = "-prefix ";
@ -395,6 +378,7 @@ stdenv.mkDerivation {
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
platforms = platforms.unix;
broken = stdenv.isDarwin && (compareVersion "5.9.0" < 0);
};
}

View file

@ -79,7 +79,7 @@ qtModule {
cat <<EOF > src/3rdparty/chromium/build/mac/find_sdk.py
#!/usr/bin/env python
print("${darwin.apple_sdk.sdk}")
print("10.10.0")
print("10.12.0")
EOF
cat <<EOF > src/3rdparty/chromium/build/config/mac/sdk_info.py

View file

@ -35,10 +35,15 @@ let
url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz";
sha256 = "0mw6mynjmg6yl3l2k33yra2x84s4r6mh44ylhk9znjfk74jra8zg";
};
buildInputs = [ numpy pytest six ];
checkPhase = ''
buildInputs = [ numpy six ];
nativeBuildInputs = [ pytest ];
preCheck = ''
export HOME=$PWD
'';
checkPhase = ''
runHook preCheck
py.test test/
runHook postCheck
'';
meta = {
description = "Distributed just-in-time shared library building";

View file

@ -58,6 +58,7 @@ let
BINARY = 64;
TARGET = setTarget "ATHLON";
DYNAMIC_ARCH = true;
NO_AVX512 = true;
USE_OPENMP = true;
};
};

View file

@ -6,11 +6,11 @@ in
stdenv.mkDerivation rec {
name = "sqlite-analyzer-${version}";
version = "3.27.2";
version = "3.28.0";
src = assert version == sqlite.version; fetchurl {
url = "https://sqlite.org/2019/sqlite-src-${archiveVersion version}.zip";
sha256 = "02nz1y22wyb8101d9y6wfdrvp855wvch67js12p5y3riya345g8m";
sha256 = "15v57b113bpgcshfsx5jw93szar3da94rr03i053xhl15la7jllh";
};
nativeBuildInputs = [ unzip ];
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A tool that shows statistics about SQLite databases";
downloadPage = http://sqlite.org/download.html;
homepage = http://www.sqlite.org;
homepage = https://www.sqlite.org;
license = licenses.publicDomain;
maintainers = with maintainers; [ pesterhazy ];
platforms = platforms.unix;

View file

@ -10,12 +10,12 @@ in
stdenv.mkDerivation rec {
name = "sqlite-${version}";
version = "3.27.2";
version = "3.28.0";
# NB! Make sure to update analyzer.nix src (in the same directory).
src = fetchurl {
url = "https://sqlite.org/2019/sqlite-autoconf-${archiveVersion version}.tar.gz";
sha256 = "0vpgwszs19pwks2b4dhqwa0n6q5sx6pn1s7rngyyrd98xa2rxhsh";
sha256 = "1hxpi45crbqp6lacl7z611lna02k956m9bsy2bjzrbb2y23546yn";
};
outputs = [ "bin" "dev" "out" ];
@ -75,8 +75,8 @@ stdenv.mkDerivation rec {
meta = {
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
downloadPage = http://sqlite.org/download.html;
homepage = http://www.sqlite.org/;
downloadPage = https://sqlite.org/download.html;
homepage = https://www.sqlite.org/;
license = licenses.publicDomain;
maintainers = with maintainers; [ eelco np ];
platforms = platforms.unix ++ platforms.windows;

View file

@ -3,8 +3,8 @@
callPackage ./generic.nix (args // rec {
src = fetchurl {
url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
sha256 = "17diivcfcwdhp4v5zi6j9nkxncccjqkivhp363c4wx5lf4d3fb6n";
url = "mirror://sourceforge/tcl/tk${tcl.version}.1-src.tar.gz"; # TODO: remove '.1' for v8.6.10 or v8.7.x
sha256 = "1d7bfkxpacy33w5nahf73lkwxqpff44w1jplg7i2gmwgiaawvjwg";
};
patches = [ ./different-prefix-with-tcl.patch ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./Fix-bad-install_name-for-libtk8.6.dylib.patch ];

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