From 7cc5913d0d664f3d11feac398916fbf5e26977c6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 08:26:29 -0700 Subject: [PATCH 01/39] abcmidi: 2019.08.11 -> 2019.10.13 --- pkgs/tools/audio/abcmidi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix index 773b09958ea..8d990f3a3a8 100644 --- a/pkgs/tools/audio/abcmidi/default.nix +++ b/pkgs/tools/audio/abcmidi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "abcMIDI"; - version = "2019.08.11"; + version = "2019.10.13"; src = fetchzip { url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip"; - sha256 = "0rkqmavg7iv9080jdqs0qz80nanhizv6jk0fg9d5xvq3gnmfvnj1"; + sha256 = "1i2gpfrzi12smrlni25fcah6a8rb5l7p358r60jbysc2bpzxwd9l"; }; # There is also a file called "makefile" which seems to be preferred by the standard build phase From d0abd313f15e3aaac43d218f829792455b792a33 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 09:16:51 -0700 Subject: [PATCH 02/39] bleachbit: 2.2 -> 3.0 --- pkgs/applications/misc/bleachbit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix index 3f13972de9b..01eb69baadd 100644 --- a/pkgs/applications/misc/bleachbit/default.nix +++ b/pkgs/applications/misc/bleachbit/default.nix @@ -1,13 +1,13 @@ { stdenv, pythonPackages, fetchurl, gettext }: pythonPackages.buildPythonApplication rec { pname = "bleachbit"; - version = "2.2"; + version = "3.0"; format = "other"; src = fetchurl { url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; - sha256 = "1yj9bc3k6s1aib7znb79h5rybfv691zz4szxkwf9fm9nr0dws603"; + sha256 = "18ns9hms671b4l0189m1m2agprkydnpvyky9q2f5hxf35i9cn67d"; }; nativeBuildInputs = [ gettext ]; From 865565453f3006ab952a417764f5527db9095d1d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 10:29:50 -0700 Subject: [PATCH 03/39] btrbk: 0.28.3 -> 0.29.0 --- pkgs/tools/backup/btrbk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/backup/btrbk/default.nix b/pkgs/tools/backup/btrbk/default.nix index 963d7945b89..71e1807603c 100644 --- a/pkgs/tools/backup/btrbk/default.nix +++ b/pkgs/tools/backup/btrbk/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "btrbk"; - version = "0.28.3"; + version = "0.29.0"; src = fetchurl { url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz"; - sha256 = "0s69pcjkjxg77cgyjahwyg2w81ckgzwz1ds4ifjw7z0zhjxy7miz"; + sha256 = "1ki40jga09x361lj36hgzw3ahs0cg2w0s3rjwp209255fzyl89il"; }; nativeBuildInputs = [ asciidoc asciidoctor makeWrapper ]; From 9925f6e323f439c9d51ea606fd4a866b2b52b903 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 12:03:50 -0700 Subject: [PATCH 04/39] dblatex: 0.3.10 -> 0.3.11 --- pkgs/tools/typesetting/tex/dblatex/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix index c4eaf4e1df4..cc9432f6f22 100644 --- a/pkgs/tools/typesetting/tex/dblatex/default.nix +++ b/pkgs/tools/typesetting/tex/dblatex/default.nix @@ -21,11 +21,11 @@ assert enableAllFeatures -> ghostscript != null; stdenv.mkDerivation rec { - name = "dblatex-0.3.10"; + name = "dblatex-0.3.11"; src = fetchurl { url = "mirror://sourceforge/dblatex/${name}.tar.bz2"; - sha256 = "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg"; + sha256 = "0rp1bc2lgisigscq1i7zxfd2qdaxxxld6khbcxss4pq7fpi9fzkv"; }; buildInputs = [ python2 libxslt tex ] From 14df7a478e14cd1363f0219bb2b940b473223566 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 17:06:48 -0700 Subject: [PATCH 05/39] drumkv1: 0.9.10 -> 0.9.11 --- pkgs/applications/audio/drumkv1/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix index 604fe4c4ab7..8120ce5a6db 100644 --- a/pkgs/applications/audio/drumkv1/default.nix +++ b/pkgs/applications/audio/drumkv1/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "drumkv1"; - version = "0.9.10"; + version = "0.9.11"; src = fetchurl { url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz"; - sha256 = "0h08r6vq23dlnag67fcfcpx83wampx4fag82v4bgkqg2sdh64p3n"; + sha256 = "1wnjn175l0mz51k9pjf3pdzv54c4jlh63saavld9lm6zfgfs13d7"; }; buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ]; From 6634cd78d7dca2ebc9916eabd61cca697e8e4c78 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 23:16:50 -0700 Subject: [PATCH 06/39] include-what-you-use: 0.12 -> 0.13 --- .../tools/analysis/include-what-you-use/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/include-what-you-use/default.nix b/pkgs/development/tools/analysis/include-what-you-use/default.nix index c05d47e396c..424d83822e8 100644 --- a/pkgs/development/tools/analysis/include-what-you-use/default.nix +++ b/pkgs/development/tools/analysis/include-what-you-use/default.nix @@ -3,10 +3,10 @@ stdenv.mkDerivation rec { pname = "include-what-you-use"; # Also bump llvmPackages in all-packages.nix to the supported version! - version = "0.12"; + version = "0.13"; src = fetchurl { - sha256 = "09b0h704fh7r4f5h92p5997cj3zk1v04bqp4jk1j1f6cmfq2z2d5"; + sha256 = "1jav4qf7d303by9iy6v08w73wfwzj76i54inh90w1s34m9q44aa9"; url = "${meta.homepage}/downloads/${pname}-${version}.src.tar.gz"; }; From 602e14fc8bc7d7acc5b99687de2ecc7d23da4201 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 6 Nov 2019 15:05:22 -0500 Subject: [PATCH 07/39] gnome3.gnome-flashback: add systemd targets for customSessions --- pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix index e381860ca2c..dc7e0ed222f 100644 --- a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix +++ b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix @@ -22,6 +22,7 @@ , writeTextFile , writeShellScriptBin , xkeyboard_config +, runCommand }: let @@ -141,6 +142,13 @@ let DesktopNames=GNOME-Flashback;GNOME; ''; }; + + mkSystemdTargetForWm = { wmName }: + runCommand "gnome-flashback-${wmName}.target" {} '' + mkdir -p $out/lib/systemd/user + cp "${gnome-flashback}/lib/systemd/user/gnome-session-x11@gnome-flashback-metacity.target" \ + "$out/lib/systemd/user/gnome-session-x11@gnome-flashback-${wmName}.target" + ''; }; meta = with stdenv.lib; { From 473cd0d4ba97a579b473c37022a5809af3b6b76f Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 6 Nov 2019 15:14:25 -0500 Subject: [PATCH 08/39] nixos/gnome3: add gnome-flashback to systemd.packages When we did the revert of adding gnome-flashback to systemd.packages [0] I forgot to test with other display managers. If we use GDM with gnome-flashback it appears it doesn't try to fallback to non-systemd startup and always fails and starts the regular gnome-session. So adding gnome-flashback to systemd.packages was perfectly fine, but we did forgot one detail. We need systemd targets for the customSessions which is added using mkSystemdTargetForWm in the gnome- flashback package. [0]: 42f567b30def552337bf17a6d30410c16c2b47cc --- nixos/modules/services/x11/desktop-managers/gnome3.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 5ad31e5b9d0..7338319f111 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -184,6 +184,13 @@ in enableGnomeKeyring = true; }; + systemd.packages = with pkgs.gnome3; [ + gnome-flashback + ] ++ (map + (wm: gnome-flashback.mkSystemdTargetForWm { + inherit (wm) wmName; + }) cfg.flashback.customSessions); + services.dbus.packages = [ pkgs.gnome3.gnome-screensaver ]; From 9bf9370d95fbd70604db5b2b01a027bb865624b5 Mon Sep 17 00:00:00 2001 From: Vadim-Valdis Yudaev Date: Sun, 10 Nov 2019 19:11:42 +0200 Subject: [PATCH 09/39] btrfs-progs: 5.2.2 -> 5.3.1 --- pkgs/tools/filesystems/btrfs-progs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index 95fc1c1cd7a..e04b9efe48f 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "btrfs-progs"; - version = "5.2.2"; + version = "5.3.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; - sha256 = "1imivxjppi8zl27gn472pwpk8bg5dijkbyi340by31vhy7dj24w2"; + sha256 = "0f6s1iwiqbncrvxp74k50s88x6zqf85sjxg04kyni82l1vk1m8xz"; }; nativeBuildInputs = [ From 38ebb8ff828d29252379cd62ede753d8a5edfa4e Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 27 Oct 2019 20:05:48 -0400 Subject: [PATCH 10/39] fetchurl: Eliminate pointless cross differences --- pkgs/build-support/fetchurl/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 6300587a7d1..7d23a3a7f8f 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC. +{ lib, buildPackages ? { inherit stdenvNoCC; }, stdenvNoCC, curl }: # Note that `curl' may be `null', in case of the native stdenvNoCC. let @@ -10,7 +10,7 @@ let # resulting store derivations (.drv files) much smaller, which in # turn makes nix-env/nix-instantiate faster. mirrorsFile = - stdenvNoCC.mkDerivation ({ + buildPackages.stdenvNoCC.mkDerivation ({ name = "mirrors-list"; builder = ./write-mirror-list.sh; preferLocalBuild = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4ae7430e0f..5a1b9cfab69 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -283,8 +283,10 @@ in fetchhg = callPackage ../build-support/fetchhg { }; # `fetchurl' downloads a file from the network. - fetchurl = makeOverridable (import ../build-support/fetchurl) { - inherit lib stdenvNoCC; + fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform + then buildPackages.fetchurl # No need to do special overrides twice, + else makeOverridable (import ../build-support/fetchurl) { + inherit lib stdenvNoCC buildPackages; curl = buildPackages.curl.override (old: rec { # break dependency cycles fetchurl = stdenv.fetchurlBoot; From 91718534f1f476a727b51a256c93885e57cf602d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 10 Nov 2019 20:02:44 -0500 Subject: [PATCH 11/39] lib: Switch to w64 vendor for MinGW It is needed for the `-municode` flag, supposedly. --- lib/systems/examples.nix | 4 ++-- lib/systems/parse.nix | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 511ae197948..585156c2475 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -207,7 +207,7 @@ rec { # 32 bit mingw-w64 mingw32 = { - config = "i686-pc-mingw32"; + config = "i686-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; @@ -215,7 +215,7 @@ rec { # 64 bit mingw-w64 mingwW64 = { # That's the triplet they use in the mingw-w64 docs. - config = "x86_64-pc-mingw32"; + config = "x86_64-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 5e12df32ffd..5a3805cf997 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -208,6 +208,9 @@ rec { vendors = setTypes types.openVendor { apple = {}; pc = {}; + # Actually matters, unlocking some MinGW-w64-specific options in GCC. See + # bottom of https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/ + w64 = {}; none = {}; unknown = {}; From 0a63190c3115126e6a571b6ca555fa684b8bf4ed Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 10 Nov 2019 22:32:31 -0500 Subject: [PATCH 12/39] windows top-level: Clean up with makeScope --- pkgs/os-specific/windows/default.nix | 42 +++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix index 4621c2da10f..8c2f3ca5498 100644 --- a/pkgs/os-specific/windows/default.nix +++ b/pkgs/os-specific/windows/default.nix @@ -1,29 +1,27 @@ -{ newScope, crossLibcStdenv }: let +{ stdenv, newScope, crossLibcStdenv }: - callPackage = newScope self; +stdenv.lib.makeScope newScope (self: with self; { - self = { - cygwinSetup = callPackage ./cygwin-setup { }; + cygwinSetup = callPackage ./cygwin-setup { }; - jom = callPackage ./jom { }; + jom = callPackage ./jom { }; - w32api = callPackage ./w32api { }; + w32api = callPackage ./w32api { }; - mingwrt = callPackage ./mingwrt { }; - mingw_runtime = self.mingwrt; + mingwrt = callPackage ./mingwrt { }; + mingw_runtime = mingwrt; - mingw_w64 = callPackage ./mingw-w64 { - stdenv = crossLibcStdenv; - }; - - mingw_w64_headers = callPackage ./mingw-w64/headers.nix { }; - - mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { }; - - pthreads = callPackage ./pthread-w32 { }; - - wxMSW = callPackage ./wxMSW-2.8 { }; - - libgnurx = callPackage ./libgnurx { }; + mingw_w64 = callPackage ./mingw-w64 { + stdenv = crossLibcStdenv; }; -in self + + mingw_w64_headers = callPackage ./mingw-w64/headers.nix { }; + + mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { }; + + pthreads = callPackage ./pthread-w32 { }; + + wxMSW = callPackage ./wxMSW-2.8 { }; + + libgnurx = callPackage ./libgnurx { }; +}) From 06c5e811e6e0244a8e5a9645fd8347c719aab228 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 10 Nov 2019 22:35:59 -0500 Subject: [PATCH 13/39] mcfgthreads: Init from git --- pkgs/os-specific/windows/default.nix | 22 +++++++++++++++++-- .../windows/mcfgthreads/default.nix | 19 ++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 pkgs/os-specific/windows/mcfgthreads/default.nix diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix index 8c2f3ca5498..7f1634d5c0b 100644 --- a/pkgs/os-specific/windows/default.nix +++ b/pkgs/os-specific/windows/default.nix @@ -1,4 +1,6 @@ -{ stdenv, newScope, crossLibcStdenv }: +{ stdenv, buildPackages +, newScope, overrideCC, crossLibcStdenv, libcCross +}: stdenv.lib.makeScope newScope (self: with self; { @@ -15,9 +17,25 @@ stdenv.lib.makeScope newScope (self: with self; { stdenv = crossLibcStdenv; }; + crossThreadsStdenv = overrideCC crossLibcStdenv + (if stdenv.hostPlatform.useLLVM or false + then buildPackages.llvmPackages_8.lldClangNoLibcxx + else buildPackages.gccCrossStageStatic.override (old: { + bintools = old.bintools.override { + libc = libcCross; + }; + libc = libcCross; + })); + mingw_w64_headers = callPackage ./mingw-w64/headers.nix { }; - mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { }; + mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { + stdenv = crossThreadsStdenv; + }; + + mcfgthreads = callPackage ./mcfgthreads { + stdenv = crossThreadsStdenv; + }; pthreads = callPackage ./pthread-w32 { }; diff --git a/pkgs/os-specific/windows/mcfgthreads/default.nix b/pkgs/os-specific/windows/mcfgthreads/default.nix new file mode 100644 index 00000000000..468e92a1e9d --- /dev/null +++ b/pkgs/os-specific/windows/mcfgthreads/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation { + pname = "mcfgthreads"; + version = "git"; + src = fetchFromGitHub { + owner = "lhmouse"; + repo = "mcfgthread"; + rev = "9570e5ca7b98002d707c502c919d951bf256b9c6"; + sha256 = "10y2x3x601a7c1hkd6zlr3xpfsnlr05xl28v23clf619756a5755"; + }; + # Don't want prebuilt binaries sneaking in. + postUnpack = '' + rm -r "$sourceRoot/debug" "$sourceRoot/release" + ''; + nativeBuildInputs = [ + autoreconfHook + ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a1b9cfab69..4ca16cc81e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7577,7 +7577,7 @@ in ../development/compilers/gcc/libstdc++-hook.sh; crossLibcStdenv = overrideCC stdenv - (if stdenv.targetPlatform.useLLVM or false + (if stdenv.hostPlatform.useLLVM or false then buildPackages.llvmPackages_8.lldClangNoLibc else buildPackages.gccCrossStageStatic); From 999ef20129cf0c4809a3d654f2378192f6b32ef1 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 00:08:45 -0500 Subject: [PATCH 14/39] mingw-w64 libc: Multiple outputs and parallel builds Also deduplicate more of the GCC derivations. --- .../development/compilers/gcc/4.8/default.nix | 25 +++++------------ .../development/compilers/gcc/4.9/default.nix | 25 +++++------------ pkgs/development/compilers/gcc/5/default.nix | 25 +++++------------ pkgs/development/compilers/gcc/6/default.nix | 25 +++++------------ pkgs/development/compilers/gcc/7/default.nix | 25 +++++------------ pkgs/development/compilers/gcc/8/default.nix | 25 +++++------------ pkgs/development/compilers/gcc/9/default.nix | 25 +++++------------ .../compilers/gcc/common/configure-flags.nix | 2 +- .../gcc/common/extra-target-flags.nix | 28 +++++++++++++++++++ .../compilers/gcc/snapshot/default.nix | 25 +++++------------ .../os-specific/windows/mingw-w64/default.nix | 4 +++ 11 files changed, 89 insertions(+), 145 deletions(-) create mode 100644 pkgs/development/compilers/gcc/common/extra-target-flags.nix diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 324599e4982..e8892e17b71 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -251,24 +251,13 @@ stdenv.mkDerivation ({ ++ optionals javaAwtGtk [ gmp mpfr ] )); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 9d4d8a9b6ac..4f6d32b3317 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -257,24 +257,13 @@ stdenv.mkDerivation ({ ++ optionals javaAwtGtk [ gmp mpfr ] )); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index d809c6c4e36..3c8cdde8103 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -264,24 +264,13 @@ stdenv.mkDerivation ({ ++ optionals javaAwtGtk [ gmp mpfr ] )); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 1eec43cb320..82cec33756d 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -266,24 +266,13 @@ stdenv.mkDerivation ({ ++ optionals javaAwtGtk [ gmp mpfr ] )); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 7a4b0ed3222..c500bb477a2 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -230,24 +230,13 @@ stdenv.mkDerivation ({ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index c0df37bd5f8..6ce10a78427 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -212,24 +212,13 @@ stdenv.mkDerivation ({ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 23a5eeafb8b..0e78cffdef2 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -211,24 +211,13 @@ stdenv.mkDerivation ({ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 0707e087178..a0c9941e3c6 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -49,7 +49,7 @@ let "--disable-decimal-float" # requires libc "--disable-libmpx" # requires libc ] ++ lib.optionals crossMingw [ - "--with-headers=${libcCross}/include" + "--with-headers=${lib.getDev libcCross}/include" "--with-gcc" "--with-gnu-as" "--with-gnu-ld" diff --git a/pkgs/development/compilers/gcc/common/extra-target-flags.nix b/pkgs/development/compilers/gcc/common/extra-target-flags.nix new file mode 100644 index 00000000000..1c2fad8fbc5 --- /dev/null +++ b/pkgs/development/compilers/gcc/common/extra-target-flags.nix @@ -0,0 +1,28 @@ +{ stdenv, crossStageStatic, libcCross }: + +let + inherit (stdenv) lib hostPlatform targetPlatform; +in + +{ + EXTRA_TARGET_FLAGS = let + mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([ + "-idirafter ${lib.getDev dep}${dep.incdir or "/include"}" + ] ++ stdenv.lib.optionals (! crossStageStatic) [ + "-B${lib.getLib dep}${dep.libdir or "/lib"}" + ]); + in mkFlags libcCross + ; + + EXTRA_TARGET_LDFLAGS = let + mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([ + "-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}" + ] ++ (if crossStageStatic then [ + "-B${lib.getLib dep}${dep.libdir or "/lib"}" + ] else [ + "-Wl,-rpath,${lib.getLib dep}${dep.libdir or "/lib"}" + "-Wl,-rpath-link,${lib.getLib dep}${dep.libdir or "/lib"}" + ])); + in mkFlags libcCross + ; +} diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index d073edfb09c..f431df03549 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -184,24 +184,13 @@ stdenv.mkDerivation ({ LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); - EXTRA_TARGET_FLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-idirafter ${getDev libcCross}${libcCross.incdir or "/include"}" - ] ++ optionals (! crossStageStatic) [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ]); - - EXTRA_TARGET_LDFLAGS = optionals - (targetPlatform != hostPlatform && libcCross != null) - ([ - "-Wl,-L${libcCross.out}${libcCross.libdir or "/lib"}" - ] ++ (if crossStageStatic then [ - "-B${libcCross.out}${libcCross.libdir or "/lib"}" - ] else [ - "-Wl,-rpath,${libcCross.out}${libcCross.libdir or "/lib"}" - "-Wl,-rpath-link,${libcCross.out}${libcCross.libdir or "/lib"}" - ])); + inherit + (import ../common/extra-target-flags.nix { + inherit stdenv crossStageStatic libcCross; + }) + EXTRA_TARGET_FLAGS + EXTRA_TARGET_LDFLAGS + ; passthru = { inherit langC langCC langObjC langObjCpp langFortran langGo version; diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix index 022aaffe596..7efc2e21313 100644 --- a/pkgs/os-specific/windows/mingw-w64/default.nix +++ b/pkgs/os-specific/windows/mingw-w64/default.nix @@ -11,11 +11,15 @@ in stdenv.mkDerivation { sha256 = "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm"; }; + outputs = [ "out" "dev" ]; + configureFlags = [ "--enable-idl" "--enable-secure-api" ]; + enableParallelBuilding = true; + buildInputs = [ windows.mingw_w64_headers ]; dontStrip = true; hardeningDisable = [ "stackprotector" "fortify" ]; From c57018fb3b51f5ba4e955c6641059ab1b72c49eb Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 11 Nov 2019 06:18:42 -0500 Subject: [PATCH 15/39] arrow-cpp: fix tests not being run on linux Fixes: 8c86e54a ('arrow-cpp: fix/disable some plasma tests on darwin') --- pkgs/development/libraries/arrow-cpp/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index e277617c0ff..f6f3493002a 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -93,7 +93,7 @@ in stdenv.mkDerivation rec { ]; in '' ctest -L unittest -V \ - --exclude-regex '(${builtins.concatStringsSep "|" excludedTests})' + --exclude-regex '^(${builtins.concatStringsSep "|" excludedTests})$' ''); meta = { From 00164f2fd3b475695ed5774c29438f7e68006fda Mon Sep 17 00:00:00 2001 From: tekeri <47343275+tekeri@users.noreply.github.com> Date: Thu, 4 Jul 2019 14:47:40 +0900 Subject: [PATCH 16/39] perlPackages.CDB_File: init at 0.99 --- pkgs/top-level/perl-packages.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b5b9fe9f165..e217fd1eaf5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1948,6 +1948,20 @@ let }; }; + CDB_File = buildPerlPackage { + pname = "CDB_File"; + version = "0.99"; + src = fetchurl { + url = "mirror://cpan/authors/id/T/TO/TODDR/CDB_File-0.99.tar.gz"; + sha256 = "1c32b30131871e8a7b23f47d8f65d9cdeb87069fa4c221781a03416496f91f16"; + }; + meta = { + homepage = "http://github.com/toddr/CDB_File"; + description = "Perl extension for access to cdb databases"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + Catmandu = buildPerlModule { pname = "Catmandu"; version = "1.2002"; From 6fe78ec26a5fe519fd376e85f8eaa87bd8022d39 Mon Sep 17 00:00:00 2001 From: tekeri <47343275+tekeri@users.noreply.github.com> Date: Tue, 2 Jul 2019 18:47:36 +0900 Subject: [PATCH 17/39] perlPackages.CacheKyotoTycoon: init at 0.16 --- pkgs/top-level/perl-packages.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b5b9fe9f165..34177ce060d 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1175,6 +1175,21 @@ let }; }; + CacheKyotoTycoon = buildPerlModule { + pname = "Cache-KyotoTycoon"; + version = "0.16"; + src = fetchurl { + url = "mirror://cpan/authors/id/T/TO/TOKUHIROM/Cache-KyotoTycoon-0.16.tar.gz"; + sha256 = "0z4lnc3jfqx8rykm998q2jy5wkhb8p5pir80g9lqpi4lb0ilic6c"; + }; + propagatedBuildInputs = [ Furl URI ]; + buildInputs = [ FileWhich TestTCP TestRequires TestSharedFork ]; + meta = { + description = "KyotoTycoon client library"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + CacheMemcached = buildPerlPackage { pname = "Cache-Memcached"; version = "1.30"; From eb523b823cd466e027806ed1b66b7040aa95d418 Mon Sep 17 00:00:00 2001 From: tekeri <47343275+tekeri@users.noreply.github.com> Date: Tue, 2 Jul 2019 18:45:22 +0900 Subject: [PATCH 18/39] perlPackages.Furl: init at 3.13 --- pkgs/top-level/perl-packages.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 34177ce060d..994eba91cbc 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -7404,6 +7404,21 @@ let doCheck = false; }; + Furl = buildPerlModule { + pname = "Furl"; + version = "3.13"; + src = fetchurl { + url = "mirror://cpan/authors/id/T/TO/TOKUHIROM/Furl-3.13.tar.gz"; + sha256 = "1wxa2v9yjzvnzp62p1jvcx8x61z5qvlvzyah853vvaywpjxwyyl8"; + }; + propagatedBuildInputs = [ HTTPParserXS ModuleBuildTiny ClassAccessorLite ]; + buildInputs = [ HTTPBody HTTPProxy NetIDNEncode Plack PlackMiddlewareDeflater Starlet TestRequires TestTCP TestSharedFork ]; + meta = { + description = "Lightning-fast URL fetcher"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + GamesSolitaireVerify = buildPerlModule { pname = "Games-Solitaire-Verify"; version = "0.2202"; From c4329144917f67bee587aefa2ac39dc7b4a74386 Mon Sep 17 00:00:00 2001 From: tekeri <47343275+tekeri@users.noreply.github.com> Date: Tue, 2 Jul 2019 18:46:34 +0900 Subject: [PATCH 19/39] perlPackages.FindLib: init at 1.04 --- pkgs/top-level/perl-packages.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b5b9fe9f165..bda82495b73 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -7326,6 +7326,19 @@ let buildInputs = [ TestPod ]; }; + FindLib = buildPerlPackage { + pname = "Find-Lib"; + version = "1.04"; + src = fetchurl { + url = "mirror://cpan/authors/id/Y/YA/YANNK/Find-Lib-1.04.tar.gz"; + sha256 = "0lg88v0sqfpq4d3jwvk6c9blqnpxbz8f4s22zr3b1qb160g94wqx"; + }; + meta = with stdenv.lib; { + description = "Helper to smartly find libs to use in the filesystem tree"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + FontAFM = buildPerlPackage { pname = "Font-AFM"; version = "1.20"; From a4b468190506d0e4af434cdb7ae820a0af27ac3e Mon Sep 17 00:00:00 2001 From: tekeri <47343275+tekeri@users.noreply.github.com> Date: Tue, 2 Jul 2019 16:09:16 +0900 Subject: [PATCH 20/39] perlPackages.LogDispatchFileRotate: init at 1.36 --- pkgs/top-level/perl-packages.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b5b9fe9f165..290d00cf5d3 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10231,6 +10231,21 @@ let buildInputs = [ IPCRun3 TestFatal TestNeeds ]; }; + LogDispatchFileRotate = buildPerlPackage { + pname = "Log-Dispatch-FileRotate"; + version = "1.36"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MS/MSCHOUT/Log-Dispatch-FileRotate-1.36.tar.gz"; + sha256 = "0vlmi17p7fky3x58rs7r5mdxi6l5jla8zhlb55kvssxc1w5v2b27"; + }; + propagatedBuildInputs = [ DateManip LogDispatch PathTiny ]; + meta = { + description = "Log to Files that Archive/Rotate Themselves"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + buildInputs = [ TestFatal TestNeeds TestWarn ]; + }; + LogHandler = buildPerlModule { pname = "Log-Handler"; version = "0.88"; From 04cb05d20c780f0cbe76eca6dfc2f08e741a1660 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 00:23:32 -0500 Subject: [PATCH 21/39] gcc: Build MinGW stage two with threading library Currently this is set up to be mcfgthreads, but it could be something else instead. --- .../development/compilers/gcc/4.8/default.nix | 11 +++++++++-- .../development/compilers/gcc/4.9/default.nix | 11 +++++++++-- pkgs/development/compilers/gcc/5/default.nix | 15 +++++++++++++-- pkgs/development/compilers/gcc/6/default.nix | 18 ++++++++++++++---- pkgs/development/compilers/gcc/7/default.nix | 17 ++++++++++++++--- pkgs/development/compilers/gcc/8/default.nix | 19 +++++++++++++++---- pkgs/development/compilers/gcc/9/default.nix | 19 +++++++++++++++---- .../compilers/gcc/common/configure-flags.nix | 2 +- .../gcc/common/extra-target-flags.nix | 4 +++- .../gcc/common/mfcgthreads-patches-repo.nix | 1 + .../compilers/gcc/snapshot/default.nix | 19 +++++++++++++++---- .../windows/mcfgthreads/default.nix | 5 +++++ pkgs/top-level/all-packages.nix | 17 ++++++++++++++++- 13 files changed, 130 insertions(+), 28 deletions(-) create mode 100644 pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index e8892e17b71..eee2c1a97a8 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -23,6 +23,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -47,10 +48,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "4.8.5"; +let majorVersion = "4"; + version = "${majorVersion}.8.5"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -171,6 +176,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + preConfigure = import ../common/pre-configure.nix { inherit (stdenv) lib; inherit version hostPlatform langJava langGo; @@ -253,7 +260,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 4f6d32b3317..b4ac68be1a3 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -23,6 +23,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -47,10 +48,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "4.9.4"; +let majorVersion = "4"; + version = "${majorVersion}.9.4"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -177,6 +182,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + preConfigure = import ../common/pre-configure.nix { inherit (stdenv) lib; inherit version hostPlatform langJava langGo; @@ -259,7 +266,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 3c8cdde8103..cb327864f6e 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -23,6 +23,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -45,10 +46,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "5.5.0"; +let majorVersion = "5"; + version = "${majorVersion}.5.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -61,6 +66,10 @@ let version = "5.5.0"; ++ optional stdenv.hostPlatform.isMusl (fetchpatch { url = https://raw.githubusercontent.com/richfelker/musl-cross-make/e84b1bd1fc12a3def33111ca6df522cd6e5ec361/patches/gcc-5.3.0/0001-musl.diff; sha256 = "0pppbf8myi2kjhm3z3479ihn1cm60kycfv60gj8yy1bs0pl1qcfm"; + }) + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "074bl5n27d1ksa31pvzj4vd8xd46r118k0w94gdv3s1vydg7mah0"; }); javaEcj = fetchurl { @@ -183,6 +192,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; preConfigure = import ../common/pre-configure.nix { @@ -266,7 +277,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 82cec33756d..2cecc5bbaa0 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs +{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? stdenv.targetPlatform.isDarwin , langObjCpp ? stdenv.targetPlatform.isDarwin @@ -23,6 +23,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -45,10 +46,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "6.5.0"; +let majorVersion = "6"; + version = "${majorVersion}.5.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -58,7 +63,10 @@ let version = "6.5.0"; ++ optional noSysDirs ../no-sys-dirs.patch ++ optional langFortran ../gfortran-driving.patch ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch - ; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "1c449jgm1vx9g4kv82bxmvlgrwb8f6kwkl0gqmjlmhf7f4hjy2nr"; + }); javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -185,6 +193,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; preConfigure = import ../common/pre-configure.nix { @@ -268,7 +278,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index c500bb477a2..c1592dbcb9b 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -16,6 +16,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "7.4.0"; +let majorVersion = "7"; + version = "${majorVersion}.4.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -58,7 +63,11 @@ let version = "7.4.0"; }) ++ optional langFortran ../gfortran-driving.patch ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch - ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch; + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay"; + }); /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -160,6 +169,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; @@ -232,7 +243,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 6ce10a78427..2f222a8bc94 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs +{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? stdenv.targetPlatform.isDarwin , langObjCpp ? stdenv.targetPlatform.isDarwin @@ -16,6 +16,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "8.3.0"; +let majorVersion = "8"; + version = "${majorVersion}.3.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -50,7 +55,11 @@ let version = "8.3.0"; }) */ ++ optional langFortran ../gfortran-driving.patch ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch - ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch; + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a"; + }); /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -147,6 +156,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; preConfigure = import ../common/pre-configure.nix { @@ -214,7 +225,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 0e78cffdef2..1fdba1baa29 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs +{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? stdenv.targetPlatform.isDarwin , langObjCpp ? stdenv.targetPlatform.isDarwin @@ -16,6 +16,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -34,10 +35,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "9.2.0"; +let majorVersion = "9"; + version = "${majorVersion}.2.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -49,7 +54,11 @@ let version = "9.2.0"; sha256 = ""; # TODO: uncomment and check hash when available. }) */ ++ optional langFortran ../gfortran-driving.patch - ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch; + ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a"; + }); /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -146,6 +155,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; preConfigure = import ../common/pre-configure.nix { @@ -213,7 +224,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index a0c9941e3c6..96026a2d932 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -62,7 +62,7 @@ let "--enable-__cxa_atexit" "--enable-long-long" "--enable-threads=${if targetPlatform.isUnix then "posix" - else if targetPlatform.isWindows then "win32" + else if targetPlatform.isWindows then "mcf" else "single"}" "--enable-nls" "--disable-decimal-float" # No final libdecnumber (it may work only in 386) diff --git a/pkgs/development/compilers/gcc/common/extra-target-flags.nix b/pkgs/development/compilers/gcc/common/extra-target-flags.nix index 1c2fad8fbc5..bce9a8d4738 100644 --- a/pkgs/development/compilers/gcc/common/extra-target-flags.nix +++ b/pkgs/development/compilers/gcc/common/extra-target-flags.nix @@ -1,4 +1,4 @@ -{ stdenv, crossStageStatic, libcCross }: +{ stdenv, crossStageStatic, libcCross, threadsCross }: let inherit (stdenv) lib hostPlatform targetPlatform; @@ -12,6 +12,7 @@ in "-B${lib.getLib dep}${dep.libdir or "/lib"}" ]); in mkFlags libcCross + ++ lib.optionals (!crossStageStatic) (mkFlags threadsCross) ; EXTRA_TARGET_LDFLAGS = let @@ -24,5 +25,6 @@ in "-Wl,-rpath-link,${lib.getLib dep}${dep.libdir or "/lib"}" ])); in mkFlags libcCross + ++ lib.optionals (!crossStageStatic) (mkFlags threadsCross) ; } diff --git a/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix b/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix new file mode 100644 index 00000000000..f8822c6dba0 --- /dev/null +++ b/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix @@ -0,0 +1 @@ +"740f233da00c4fb5bcc225b2e29768824bcecc58" diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index f431df03549..0519f04629e 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs +{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? stdenv.targetPlatform.isDarwin , langObjCpp ? stdenv.targetPlatform.isDarwin @@ -16,6 +16,7 @@ , enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null +, threadsCross ? null # for MinGW , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) stripped ? stdenv.hostPlatform == stdenv.buildPlatform @@ -35,10 +36,14 @@ assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; +# threadsCross is just for MinGW +assert threadsCross != null -> stdenv.targetPlatform.isWindows; + with stdenv.lib; with builtins; -let version = "7-20170409"; +let majorVersion = "7"; + version = "${majorVersion}-20170409"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -46,7 +51,11 @@ let version = "7-20170409"; [ ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch - ++ optional langFortran ../gfortran-driving.patch; + ++ optional langFortran ../gfortran-driving.patch + ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch { + url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch"; + sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay"; + }); /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -118,6 +127,8 @@ stdenv.mkDerivation ({ ++ (optional hostPlatform.isDarwin gnused) ; + depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; + NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl"; preConfigure = import ../common/pre-configure.nix { @@ -186,7 +197,7 @@ stdenv.mkDerivation ({ inherit (import ../common/extra-target-flags.nix { - inherit stdenv crossStageStatic libcCross; + inherit stdenv crossStageStatic libcCross threadsCross; }) EXTRA_TARGET_FLAGS EXTRA_TARGET_LDFLAGS diff --git a/pkgs/os-specific/windows/mcfgthreads/default.nix b/pkgs/os-specific/windows/mcfgthreads/default.nix index 468e92a1e9d..6c4cd171025 100644 --- a/pkgs/os-specific/windows/mcfgthreads/default.nix +++ b/pkgs/os-specific/windows/mcfgthreads/default.nix @@ -3,16 +3,21 @@ stdenv.mkDerivation { pname = "mcfgthreads"; version = "git"; + src = fetchFromGitHub { owner = "lhmouse"; repo = "mcfgthread"; rev = "9570e5ca7b98002d707c502c919d951bf256b9c6"; sha256 = "10y2x3x601a7c1hkd6zlr3xpfsnlr05xl28v23clf619756a5755"; }; + + outputs = [ "out" "dev" ]; + # Don't want prebuilt binaries sneaking in. postUnpack = '' rm -r "$sourceRoot/debug" "$sourceRoot/release" ''; + nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ca16cc81e6..c524add8b05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7610,6 +7610,7 @@ in }; bintools = binutils1; libc = libcCross1; + extraPackages = []; }; gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 { @@ -7619,6 +7620,7 @@ in profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; cloog = if !stdenv.isDarwin then cloog else null; @@ -7632,6 +7634,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_11 else null; @@ -7645,6 +7648,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; })); @@ -7656,6 +7660,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; })); @@ -7667,6 +7672,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_17 else null; })); @@ -7678,6 +7684,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_17 else null; })); @@ -7689,6 +7696,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = if !stdenv.isDarwin then isl_0_17 else null; })); @@ -7700,6 +7708,7 @@ in profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; + threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; isl = isl_0_17; })); @@ -8497,6 +8506,7 @@ in # provide the default choice, avoiding infinite recursion. bintools ? if stdenv.targetPlatform.isDarwin then darwin.binutils else binutils , libc ? bintools.libc + , extraPackages ? stdenv.lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW) threadsCross , ... } @ extraArgs: callPackage ../build-support/cc-wrapper (let self = { @@ -8508,7 +8518,7 @@ in isGNU = cc.isGNU or false; isClang = cc.isClang or false; - inherit cc bintools libc; + inherit cc bintools libc extraPackages; } // extraArgs; in self); wrapCC = cc: wrapCCWith { @@ -10973,6 +10983,11 @@ in libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc; + threadsCross = + if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false) + then targetPackages.windows.mcfgthreads or windows.mcfgthreads + else null; + wasilibc = callPackage ../development/libraries/wasilibc { stdenv = crossLibcStdenv; }; From 89ec69e25eec35b64e8fd384e3ff0ef53a419cbb Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 00:26:23 -0500 Subject: [PATCH 22/39] pcre: Skip winpthread dep Seems to build just fine without it, maybe it was just using C++ threads which mcfgthread provides? --- pkgs/development/libraries/pcre/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 2e111240758..cf08f989369 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -29,8 +29,6 @@ in stdenv.mkDerivation { ] ++ optional (variant != null) "--enable-${variant}"; - buildInputs = optional (stdenv.hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; - # https://bugs.exim.org/show_bug.cgi?id=2173 patches = [ ./stacksize-detection.patch ]; From 4403cd16f91e6ce9eee65f7ed0ab72ce5a81ba0f Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Mon, 11 Nov 2019 17:01:59 +0100 Subject: [PATCH 23/39] profiles/graphical.nix: Drop systemWide pulseaudio in iso It's not needed since #66338 and should have been done earlier. This is based on a follow-up on #56167. --- nixos/modules/profiles/graphical.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/profiles/graphical.nix b/nixos/modules/profiles/graphical.nix index 649f5564ac6..ac3c228b3c6 100644 --- a/nixos/modules/profiles/graphical.nix +++ b/nixos/modules/profiles/graphical.nix @@ -16,7 +16,6 @@ # Enable sound in virtualbox appliances. hardware.pulseaudio.enable = true; - hardware.pulseaudio.systemWide = true; # Needed since we run plasma as root. environment.systemPackages = [ pkgs.glxinfo pkgs.firefox ]; } From ef1d31e53c6f3eb968ab0fa9473992fd9c76b1a5 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Mon, 11 Nov 2019 19:49:38 +0100 Subject: [PATCH 24/39] prometheus-blackbox-exporter: 0.15.1 -> 0.16.0, disable tests --- pkgs/servers/monitoring/prometheus/blackbox-exporter.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix index e15dce8ae45..b44ebd35e9a 100644 --- a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "blackbox_exporter"; - version = "0.15.1"; + version = "0.16.0"; rev = version; goPackagePath = "github.com/prometheus/blackbox_exporter"; @@ -11,10 +11,11 @@ buildGoPackage rec { rev = "v${version}"; owner = "prometheus"; repo = "blackbox_exporter"; - sha256 = "14z4xkkh9jb6ylclzsyj6gyqrb67lxs5cxd7lrs70qli567gzqwc"; + sha256 = "1zbf3ljasv0r91rrmk3mj5nhimaf7xg3aih1ldz27rh5yww7gyzg"; }; - doCheck = true; + # dns-lookup is performed for the tests + doCheck = false; meta = with stdenv.lib; { description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP"; From e00237e79086b6187c019a4d88f1eec2014972b4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 13:53:02 -0500 Subject: [PATCH 25/39] boehm-gc: Fix build on MinGW with mcfgthreads CC @lhmouse --- pkgs/development/libraries/boehm-gc/default.nix | 8 +++++++- pkgs/development/libraries/boehm-gc/mcfgthread.patch | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/boehm-gc/mcfgthread.patch diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index cf76d9e7d24..f03a1385cf3 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchurl +, autoreconfHook , enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179 }: @@ -23,13 +24,18 @@ stdenv.mkDerivation rec { patches = # https://github.com/ivmai/bdwgc/pull/208 - lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch; + lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch + # boehm-gc whitelists GCC threading models + ++ lib.optional stdenv.hostPlatform.isMinGW ./mcfgthread.patch; configureFlags = [ "--enable-cplusplus" "--with-libatomic-ops=none" ] ++ lib.optional enableLargeConfig "--enable-large-config" ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static"; + nativeBuildInputs = + lib.optional stdenv.hostPlatform.isMinGW autoreconfHook; + doCheck = true; # not cross; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/boehm-gc/mcfgthread.patch b/pkgs/development/libraries/boehm-gc/mcfgthread.patch new file mode 100644 index 00000000000..c4aa996aebd --- /dev/null +++ b/pkgs/development/libraries/boehm-gc/mcfgthread.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -277,7 +277,7 @@ case "$THREADS" in + ;; + esac + ;; +- win32) ++ win32 | mcf) + AC_DEFINE(GC_THREADS) + use_parallel_mark=$enable_parallel_mark + if test "${enable_parallel_mark}" != no \ From dec8d2c5daa9988b1679811a35bf8a385bf8a37f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 13:56:14 -0500 Subject: [PATCH 26/39] openssl: Switch deafult for MinGW Working around broken build for now. --- pkgs/top-level/all-packages.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c524add8b05..9fe66cd96b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12954,7 +12954,10 @@ in wolfssl = callPackage ../development/libraries/wolfssl { }; - openssl = openssl_1_1; + openssl = + if stdenv.hostPlatform.isMinGW # Work around broken cross build + then openssl_1_0_2 + else openssl_1_1; inherit (callPackages ../development/libraries/openssl { }) openssl_1_0_2 From 63eac673199d78b2dcd061904811445addad3822 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Nov 2019 14:07:37 -0500 Subject: [PATCH 27/39] nghttp2: Fix MinGW build by skipping some optional deps I think those deps could be made to build, but I didn't want to get bogged down investigating further. "Use flags" are always a good thing, so this is fine for now. --- pkgs/development/libraries/nghttp2/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix index d02247196b1..04018f0e80b 100644 --- a/pkgs/development/libraries/nghttp2/default.nix +++ b/pkgs/development/libraries/nghttp2/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, pkgconfig # Optional Dependencies -, openssl ? null, libev ? null, zlib ? null, c-ares ? null +, openssl ? null, zlib ? null +, enableLibEv ? !stdenv.hostPlatform.isWindows, libev ? null +, enableCAres ? !stdenv.hostPlatform.isWindows, c-ares ? null , enableHpack ? false, jansson ? null , enableAsioLib ? false, boost ? null , enableGetAssets ? false, libxml2 ? null @@ -28,7 +30,10 @@ stdenv.mkDerivation rec { outputs = [ "bin" "out" "dev" "lib" ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ openssl libev zlib c-ares ] + buildInputs = [ openssl ] + ++ optional enableLibEv libev + ++ [ zlib ] + ++ optional enableCAres c-ares ++ optional enableHpack jansson ++ optional enableAsioLib boost ++ optional enableGetAssets libxml2 From b0879a0372fd9a0fa7563c4081de7c9fdf26e3d5 Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Mon, 11 Nov 2019 22:16:42 +0100 Subject: [PATCH 28/39] guake: add missing dependency on setuptools python setuptools is a runtime dependency (as from pkg_resources import Requirement is used) --- pkgs/applications/misc/guake/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix index 97303c43fb1..be29f6a8695 100644 --- a/pkgs/applications/misc/guake/default.nix +++ b/pkgs/applications/misc/guake/default.nix @@ -23,7 +23,7 @@ in python3.pkgs.buildPythonApplication { buildInputs = [ gtk3 keybinder3 libnotify python3 vte ]; - propagatedBuildInputs = with python3.pkgs; [ dbus-python pbr pycairo pygobject3 libwnck3 ]; + propagatedBuildInputs = with python3.pkgs; [ dbus-python pbr pycairo pygobject3 setuptools libwnck3 ]; LC_ALL = "en_US.UTF-8"; # fixes weird encoding error, see https://github.com/NixOS/nixpkgs/pull/38642#issuecomment-379727699 From a0476bbccc82ce8f219cd33f83c65e8381da1ae0 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sat, 9 Nov 2019 10:53:35 -0800 Subject: [PATCH 29/39] python3Packages.websockets: 8.0.2 -> 8.1 --- pkgs/development/python-modules/websockets/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/websockets/default.nix b/pkgs/development/python-modules/websockets/default.nix index 9202d02ad5b..1e1e1ef58a8 100644 --- a/pkgs/development/python-modules/websockets/default.nix +++ b/pkgs/development/python-modules/websockets/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "websockets"; - version = "8.0.2"; + version = "8.1"; src = fetchFromGitHub { owner = "aaugustin"; repo = pname; rev = version; - sha256 = "02fgb8gib4z5fqv30brz3mhxmblw9bw0978fhpjdrkj7wvqrz5h8"; + sha256 = "05jbqcbjg50ydwl0fijhdlqcq7fl6v99kjva66kmmzzza7vwa872"; }; disabled = pythonOlder "3.3"; From 52774319e0c8197958afa942f7bd3929371d5922 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Mon, 11 Nov 2019 16:24:07 -0500 Subject: [PATCH 30/39] fop: builds on all platforms --- pkgs/tools/typesetting/fop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/fop/default.nix b/pkgs/tools/typesetting/fop/default.nix index a72ca698077..c681eaa6ddc 100644 --- a/pkgs/tools/typesetting/fop/default.nix +++ b/pkgs/tools/typesetting/fop/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { ''; homepage = https://xmlgraphics.apache.org/fop/; license = licenses.asl20; - platforms = platforms.linux; + platforms = platforms.all; maintainers = with maintainers; [ bjornfor ndowens ]; }; } From 5e6043b764d772d23718e757bb1d4f4d82555ea9 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 11 Nov 2019 23:29:15 +0100 Subject: [PATCH 31/39] drumkv1: use Qt5's mkDerivation --- pkgs/applications/audio/drumkv1/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix index 8120ce5a6db..b926ff09d22 100644 --- a/pkgs/applications/audio/drumkv1/default.nix +++ b/pkgs/applications/audio/drumkv1/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }: +{ mkDerivation, lib, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "drumkv1"; version = "0.9.11"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; - meta = with stdenv.lib; { + meta = with lib; { description = "An old-school drum-kit sampler synthesizer with stereo fx"; homepage = http://drumkv1.sourceforge.net/; license = licenses.gpl2Plus; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c4af7fab59..47fa0967cca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22325,7 +22325,7 @@ in displaycal = (newScope pythonPackages) ../applications/graphics/displaycal {}; - drumkv1 = callPackage ../applications/audio/drumkv1 { }; + drumkv1 = libsForQt5.callPackage ../applications/audio/drumkv1 { }; duckmarines = callPackage ../games/duckmarines { love = love_0_10; }; From 40f1983f95eded1851575334c067c353b365699c Mon Sep 17 00:00:00 2001 From: symphorien Date: Mon, 11 Nov 2019 22:37:58 +0000 Subject: [PATCH 32/39] caffeine-ng: fix paths in desktop files (#73123) --- pkgs/tools/X11/caffeine-ng/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/X11/caffeine-ng/default.nix b/pkgs/tools/X11/caffeine-ng/default.nix index b54a7303ff8..c161a7c7737 100644 --- a/pkgs/tools/X11/caffeine-ng/default.nix +++ b/pkgs/tools/X11/caffeine-ng/default.nix @@ -23,10 +23,15 @@ python3Packages.buildPythonApplication rec { doCheck = false; # There are no tests. - postBuild = '' + postInstall = '' mkdir -p $out/share cp -r share $out/ + # autostart file + cp -r $out/lib/python*/site-packages/etc $out/etc/ glib-compile-schemas --strict $out/share/glib-2.0/schemas + for i in $(find $out -name "*.desktop"); do + substituteInPlace $i --replace /usr $out + done ''; meta = with lib; { From 374430eff2bf705851e2b98086d9fb6bddf7febc Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 11 Nov 2019 23:51:34 +0100 Subject: [PATCH 33/39] guake: clean up * format with nixpkgs-fmt * remove glibcLocales hack since we now have C.UTF-8 --- pkgs/applications/misc/guake/default.nix | 53 ++++++++++++++++++------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix index be29f6a8695..d403ddc8b26 100644 --- a/pkgs/applications/misc/guake/default.nix +++ b/pkgs/applications/misc/guake/default.nix @@ -1,10 +1,21 @@ -{ stdenv, fetchFromGitHub, python3, gettext, gobject-introspection, wrapGAppsHook, glibcLocales -, gtk3, keybinder3, libnotify, libutempter, vte, libwnck3 }: +{ stdenv +, fetchFromGitHub +, python3 +, gettext +, gobject-introspection +, wrapGAppsHook +, gtk3 +, keybinder3 +, libnotify +, libutempter +, vte +, libwnck3 +}: -let +python3.pkgs.buildPythonApplication rec { + pname = "guake"; version = "3.6.3"; -in python3.pkgs.buildPythonApplication { - name = "guake-${version}"; + format = "other"; src = fetchFromGitHub { @@ -19,18 +30,34 @@ in python3.pkgs.buildPythonApplication { # and https://github.com/NixOS/nixpkgs/issues/56943 strictDeps = false; - nativeBuildInputs = [ gettext gobject-introspection wrapGAppsHook python3.pkgs.pip glibcLocales ]; + nativeBuildInputs = [ + gettext + gobject-introspection + wrapGAppsHook + python3.pkgs.pip + ]; - buildInputs = [ gtk3 keybinder3 libnotify python3 vte ]; + buildInputs = [ + gtk3 + keybinder3 + libnotify + libwnck3 + python3 + vte + ]; - propagatedBuildInputs = with python3.pkgs; [ dbus-python pbr pycairo pygobject3 setuptools libwnck3 ]; - - LC_ALL = "en_US.UTF-8"; # fixes weird encoding error, see https://github.com/NixOS/nixpkgs/pull/38642#issuecomment-379727699 + propagatedBuildInputs = with python3.pkgs; [ + dbus-python + pbr + pycairo + pygobject3 + setuptools + ]; PBR_VERSION = version; # pbr needs either .git directory, sdist, or env var makeFlags = [ - "prefix=$(out)" + "prefix=${placeholder ''out''}" ]; preFixup = '' @@ -39,9 +66,9 @@ in python3.pkgs.buildPythonApplication { meta = with stdenv.lib; { description = "Drop-down terminal for GNOME"; - homepage = http://guake-project.org; + homepage = "http://guake-project.org"; license = licenses.gpl2; - platforms = platforms.linux; maintainers = [ maintainers.msteen ]; + platforms = platforms.linux; }; } From 58d9d8ea32006cf878bc32ad9757b7d489144800 Mon Sep 17 00:00:00 2001 From: Kyle Sferrazza Date: Mon, 11 Nov 2019 18:53:40 -0500 Subject: [PATCH 34/39] numix-solarized-gtk-theme: 20170810 -> 20180913 --- pkgs/misc/themes/numix-solarized/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/themes/numix-solarized/default.nix b/pkgs/misc/themes/numix-solarized/default.nix index 4fd06fae61b..0596141da80 100644 --- a/pkgs/misc/themes/numix-solarized/default.nix +++ b/pkgs/misc/themes/numix-solarized/default.nix @@ -3,14 +3,14 @@ }: stdenv.mkDerivation rec { - version = "20170810"; + version = "20180913"; pname = "numix-solarized-gtk-theme"; src = fetchFromGitHub { owner = "Ferdi265"; repo = "numix-solarized-gtk-theme"; rev = version; - sha256 = "0l4xvsiyg15kp6xwpvm3jckxyhr1lxd678lkhrcyf40n7rd4xinl"; + sha256 = "1kda0lyqi3cxh163fbj8yyi6jj6pf0y980k4s0cmyi3hkh4cqyd5"; }; nativeBuildInputs = [ python3 sass glib gdk-pixbuf libxml2 inkscape optipng ]; From 35566eb61ad99bb97a8934597e8d123c0c43c908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 12 Nov 2019 10:58:45 +0100 Subject: [PATCH 35/39] knot-dns: 2.9.0 -> 2.9.1 It's mainly bugfixes: https://gitlab.labs.nic.cz/knot/knot-dns/raw/v2.9.1/NEWS --- pkgs/servers/dns/knot-dns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index 6e87ac5052c..26d0217254a 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -7,11 +7,11 @@ let inherit (stdenv.lib) optional optionals; in # Note: ATM only the libraries have been tested in nixpkgs. stdenv.mkDerivation rec { pname = "knot-dns"; - version = "2.9.0"; + version = "2.9.1"; src = fetchurl { url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz"; - sha256 = "df7434eaefbabbf7cca2d6cba5038be48a4668e508215ca197532bac7c9b21a2"; + sha256 = "f19121956caa360c387923654f13e4c97b3fb9093d242e110d7e0916b8d8a04d"; }; outputs = [ "bin" "out" "dev" ]; From e10e7e68e98750835e35382ad5ab7ab5ff721488 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Tue, 12 Nov 2019 12:00:18 +0100 Subject: [PATCH 36/39] neomutt: 20191102 -> 20191111 --- pkgs/applications/networking/mailreaders/neomutt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index 81dc935f40d..4305294297a 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -4,14 +4,14 @@ }: stdenv.mkDerivation rec { - version = "20191102"; + version = "20191111"; pname = "neomutt"; src = fetchFromGitHub { owner = "neomutt"; repo = "neomutt"; rev = version; - sha256 = "0x5f9zbvxsxg5y2ir4xq4xw1q2snaxkidhdyhcxw5ljw3qqwhlyq"; + sha256 = "16xr7wdmjw0i72xbnyyh098wx4cr0m8w2cr1szdi1b14p4kpgr67"; }; buildInputs = [ From f1682a7f126d4d56dfbb96bb8c8c5582abb22828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 12 Nov 2019 12:48:05 +0100 Subject: [PATCH 37/39] servant-client-core: patch a security issue leaking authorization header --- .../haskell-modules/configuration-nix.nix | 6 +- ...rvant-client-core-redact-auth-header.patch | 75 +++++++++++++++++ .../servant-client-core-streamBody.patch | 82 ------------------- 3 files changed, 78 insertions(+), 85 deletions(-) create mode 100644 pkgs/development/haskell-modules/patches/servant-client-core-redact-auth-header.patch delete mode 100644 pkgs/development/haskell-modules/patches/servant-client-core-streamBody.patch diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f729c3c8373..5308296c833 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -517,9 +517,9 @@ self: super: builtins.intersectAttrs super { # https://github.com/plow-technologies/servant-streaming/issues/12 servant-streaming-server = dontCheck super.servant-streaming-server; - # https://github.com/haskell-servant/servant/pull/1128 - servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.15" then - appendPatch super.servant-client-core ./patches/servant-client-core-streamBody.patch + # https://github.com/haskell-servant/servant/pull/1238 + servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then + appendPatch super.servant-client-core ./patches/servant-client-core-redact-auth-header.patch else super.servant-client-core; diff --git a/pkgs/development/haskell-modules/patches/servant-client-core-redact-auth-header.patch b/pkgs/development/haskell-modules/patches/servant-client-core-redact-auth-header.patch new file mode 100644 index 00000000000..0f6a34f4f26 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/servant-client-core-redact-auth-header.patch @@ -0,0 +1,75 @@ +diff --git a/servant-client-core.cabal b/servant-client-core.cabal +index 5789da601..3faf65bb4 100644 +--- a/servant-client-core.cabal ++++ b/servant-client-core.cabal +@@ -96,6 +96,7 @@ test-suite spec + main-is: Spec.hs + other-modules: + Servant.Client.Core.Internal.BaseUrlSpec ++ Servant.Client.Core.RequestSpec + + -- Dependencies inherited from the library. No need to specify bounds. + build-depends: +diff --git a/src/Servant/Client/Core/Request.hs b/src/Servant/Client/Core/Request.hs +index 73756e702..0276d46f8 100644 +--- a/src/Servant/Client/Core/Request.hs ++++ b/src/Servant/Client/Core/Request.hs +@@ -64,8 +64,32 @@ data RequestF body path = Request + , requestHeaders :: Seq.Seq Header + , requestHttpVersion :: HttpVersion + , requestMethod :: Method +- } deriving (Generic, Typeable, Eq, Show, Functor, Foldable, Traversable) ++ } deriving (Generic, Typeable, Eq, Functor, Foldable, Traversable) + ++instance (Show a, Show b) => ++ Show (Servant.Client.Core.Request.RequestF a b) where ++ showsPrec p req ++ = showParen ++ (p >= 11) ++ ( showString "Request {requestPath = " ++ . showsPrec 0 (requestPath req) ++ . showString ", requestQueryString = " ++ . showsPrec 0 (requestQueryString req) ++ . showString ", requestBody = " ++ . showsPrec 0 (requestBody req) ++ . showString ", requestAccept = " ++ . showsPrec 0 (requestAccept req) ++ . showString ", requestHeaders = " ++ . showsPrec 0 (redactSensitiveHeader <$> requestHeaders req)) ++ . showString ", requestHttpVersion = " ++ . showsPrec 0 (requestHttpVersion req) ++ . showString ", requestMethod = " ++ . showsPrec 0 (requestMethod req) ++ . showString "}" ++ where ++ redactSensitiveHeader :: Header -> Header ++ redactSensitiveHeader ("Authorization", _) = ("Authorization", "") ++ redactSensitiveHeader h = h + instance Bifunctor RequestF where bimap = bimapDefault + instance Bifoldable RequestF where bifoldMap = bifoldMapDefault + instance Bitraversable RequestF where +diff --git a/test/Servant/Client/Core/RequestSpec.hs b/test/Servant/Client/Core/RequestSpec.hs +new file mode 100644 +index 000000000..99a1db7d3 +--- /dev/null ++++ b/test/Servant/Client/Core/RequestSpec.hs +@@ -0,0 +1,19 @@ ++{-# OPTIONS_GHC -fno-warn-orphans #-} ++{-# LANGUAGE OverloadedStrings #-} ++module Servant.Client.Core.RequestSpec (spec) where ++ ++ ++import Prelude () ++import Prelude.Compat ++import Control.Monad ++import Data.List (isInfixOf) ++import Servant.Client.Core.Request ++import Test.Hspec ++ ++spec :: Spec ++spec = do ++ describe "Request" $ do ++ describe "show" $ do ++ it "redacts the authorization header" $ do ++ let request = void $ defaultRequest { requestHeaders = pure ("authorization", "secret") } ++ isInfixOf "secret" (show request) `shouldBe` False diff --git a/pkgs/development/haskell-modules/patches/servant-client-core-streamBody.patch b/pkgs/development/haskell-modules/patches/servant-client-core-streamBody.patch deleted file mode 100644 index ebadd215cb7..00000000000 --- a/pkgs/development/haskell-modules/patches/servant-client-core-streamBody.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/src/Servant/Client/Core/Internal/HasClient.hs b/src/Servant/Client/Core/Internal/HasClient.hs -index 712007006..6be92ec6d 100644 ---- a/src/Servant/Client/Core/Internal/HasClient.hs -+++ b/src/Servant/Client/Core/Internal/HasClient.hs -@@ -16,6 +16,8 @@ module Servant.Client.Core.Internal.HasClient where - import Prelude () - import Prelude.Compat - -+import Control.Concurrent.MVar -+ (modifyMVar, newMVar) - import qualified Data.ByteString as BS - import qualified Data.ByteString.Lazy as BL - import Data.Foldable -@@ -36,13 +38,14 @@ import qualified Network.HTTP.Types as H - import Servant.API - ((:<|>) ((:<|>)), (:>), AuthProtect, BasicAuth, BasicAuthData, - BuildHeadersTo (..), Capture', CaptureAll, Description, -- EmptyAPI, FramingUnrender (..), FromSourceIO (..), Header', -- Headers (..), HttpVersion, IsSecure, MimeRender (mimeRender), -+ EmptyAPI, FramingRender (..), FramingUnrender (..), -+ FromSourceIO (..), Header', Headers (..), HttpVersion, -+ IsSecure, MimeRender (mimeRender), - MimeUnrender (mimeUnrender), NoContent (NoContent), QueryFlag, - QueryParam', QueryParams, Raw, ReflectMethod (..), RemoteHost, - ReqBody', SBoolI, Stream, StreamBody', Summary, ToHttpApiData, -- Vault, Verb, WithNamedContext, contentType, getHeadersHList, -- getResponse, toQueryParam, toUrlPiece) -+ ToSourceIO (..), Vault, Verb, WithNamedContext, contentType, -+ getHeadersHList, getResponse, toQueryParam, toUrlPiece) - import Servant.API.ContentTypes - (contentTypes) - import Servant.API.Modifiers -@@ -538,7 +541,7 @@ instance (MimeRender ct a, HasClient m api) - hoistClientMonad pm (Proxy :: Proxy api) f (cl a) - - instance -- ( HasClient m api -+ ( HasClient m api, MimeRender ctype chunk, FramingRender framing, ToSourceIO chunk a - ) => HasClient m (StreamBody' mods framing ctype a :> api) - where - -@@ -547,7 +550,39 @@ instance - hoistClientMonad pm _ f cl = \a -> - hoistClientMonad pm (Proxy :: Proxy api) f (cl a) - -- clientWithRoute _pm Proxy _req _body = error "HasClient @StreamBody" -+ clientWithRoute pm Proxy req body -+ = clientWithRoute pm (Proxy :: Proxy api) -+ $ setRequestBody (RequestBodyStreamChunked givesPopper) (contentType ctypeP) req -+ where -+ ctypeP = Proxy :: Proxy ctype -+ framingP = Proxy :: Proxy framing -+ -+ sourceIO = framingRender -+ framingP -+ (mimeRender ctypeP :: chunk -> BL.ByteString) -+ (toSourceIO body) -+ -+ -- not pretty. -+ givesPopper :: (IO BS.ByteString -> IO ()) -> IO () -+ givesPopper needsPopper = S.unSourceT sourceIO $ \step0 -> do -+ ref <- newMVar step0 -+ -+ -- Note sure we need locking, but it's feels safer. -+ let popper :: IO BS.ByteString -+ popper = modifyMVar ref nextBs -+ -+ needsPopper popper -+ -+ nextBs S.Stop = return (S.Stop, BS.empty) -+ nextBs (S.Error err) = fail err -+ nextBs (S.Skip s) = nextBs s -+ nextBs (S.Effect ms) = ms >>= nextBs -+ nextBs (S.Yield lbs s) = case BL.toChunks lbs of -+ [] -> nextBs s -+ (x:xs) | BS.null x -> nextBs step' -+ | otherwise -> return (step', x) -+ where -+ step' = S.Yield (BL.fromChunks xs) s - - - From e3065afa4434bf19fd61e89f05145b5a868310b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 12 Nov 2019 13:09:18 +0100 Subject: [PATCH 38/39] python3Packages.Babel: disable tests on darwin since they fail cc @fridh --- pkgs/development/python-modules/Babel/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/Babel/default.nix b/pkgs/development/python-modules/Babel/default.nix index 96226518800..97b35257820 100644 --- a/pkgs/development/python-modules/Babel/default.nix +++ b/pkgs/development/python-modules/Babel/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytz, pytest, freezegun, glibcLocales }: +{ stdenv, lib, buildPythonPackage, fetchPypi, pytz, pytest, freezegun, glibcLocales }: buildPythonPackage rec { pname = "Babel"; @@ -13,6 +13,8 @@ buildPythonPackage rec { checkInputs = [ pytest freezegun glibcLocales ]; + doCheck = !stdenv.isDarwin; + preCheck = '' export LC_ALL="en_US.UTF-8" ''; From 6618990561d9552d254ae0cb98bed5d9a3bf7e2b Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 12 Nov 2019 13:43:14 +0100 Subject: [PATCH 39/39] pinentry-gtk2: prefer the new attribute name over the old one --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3aed8b32ebf..b02908feea8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3577,11 +3577,11 @@ in gnupg1 = gnupg1compat; # use config.packageOverrides if you prefer original gnupg1 gnupg20 = callPackage ../tools/security/gnupg/20.nix { guiSupport = stdenv.isDarwin; - pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2; + pinentry = if stdenv.isDarwin then pinentry_mac else pinentry-gtk2; }; gnupg22 = callPackage ../tools/security/gnupg/22.nix { guiSupport = stdenv.isDarwin; - pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2; + pinentry = if stdenv.isDarwin then pinentry_mac else pinentry-gtk2; }; gnupg = gnupg22;