From db28ce35357c15a1407eba23715938aa256d120e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 4 Feb 2020 14:00:20 -0800 Subject: [PATCH 01/57] locate: Clarify mlocate warning message Make it clear that the warning is that updatedb will run as root, not that locate will only run as root. Also explain how to silence the warning. Fixes #30864. Signed-off-by: Anders Kaseorg --- nixos/modules/misc/locate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 552535c253e6..e78c37a00134 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -127,7 +127,7 @@ in { { LOCATE_PATH = cfg.output; }; - warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root" + warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support the services.locate.localuser option; updatedb will run as root. (Silence with services.locate.localuser = null.)" ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component" ++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts"; From 408566191148947d5a74e3d649ffc27e72c7294d Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 21 May 2020 14:57:10 -0700 Subject: [PATCH 02/57] opentoonz: Init at 1.4.0 --- .../graphics/opentoonz/default.nix | 51 +++++++++++++++++++ .../graphics/opentoonz/libtiff.nix | 21 ++++++++ .../graphics/opentoonz/source.nix | 16 ++++++ pkgs/top-level/all-packages.nix | 4 ++ 4 files changed, 92 insertions(+) create mode 100644 pkgs/applications/graphics/opentoonz/default.nix create mode 100644 pkgs/applications/graphics/opentoonz/libtiff.nix create mode 100644 pkgs/applications/graphics/opentoonz/source.nix diff --git a/pkgs/applications/graphics/opentoonz/default.nix b/pkgs/applications/graphics/opentoonz/default.nix new file mode 100644 index 000000000000..68830699699e --- /dev/null +++ b/pkgs/applications/graphics/opentoonz/default.nix @@ -0,0 +1,51 @@ +{ boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint +, libpng, libtiff, libusb1, lz4, lzma, lzo, openblas, pkgconfig, qtbase +, qtmultimedia, qtscript, stdenv, superlu, wrapQtAppsHook, }: +let source = import ./source.nix { inherit fetchFromGitHub; }; +in stdenv.mkDerivation rec { + inherit (source) src; + + pname = "opentoonz"; + version = source.versions.opentoonz; + + nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ]; + + buildInputs = [ + boost + freeglut + freetype + glew + libjpeg + libmypaint + libpng + libtiff + libusb1 + lz4 + lzma + lzo + openblas + qtbase + qtmultimedia + qtscript + superlu + ]; + + postUnpack = "sourceRoot=$sourceRoot/toonz"; + + cmakeDir = "../sources"; + cmakeFlags = [ + "-DTIFF_INCLUDE_DIR=${libtiff.dev}/include" + "-DTIFF_LIBRARY=${libtiff.out}/lib/libtiff.so" + ]; + + postInstall = '' + sed -i '/cp -r .*stuff/a\ chmod -R u+w $HOME/.config/OpenToonz/stuff' $out/bin/opentoonz + ''; + + meta = { + description = "Full-featured 2D animation creation software"; + homepage = "https://opentoonz.github.io/"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ chkno ]; + }; +} diff --git a/pkgs/applications/graphics/opentoonz/libtiff.nix b/pkgs/applications/graphics/opentoonz/libtiff.nix new file mode 100644 index 000000000000..6663c47553e3 --- /dev/null +++ b/pkgs/applications/graphics/opentoonz/libtiff.nix @@ -0,0 +1,21 @@ +# Per https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md , +# opentoonz requires its own modified version of libtiff. We still build it as +# a separate package +# 1. For visibility for tools like vulnix, and +# 2. To avoid a diamond-dependency problem with qt linking the normal libtiff +# and opentoonz linking qt and this modified libtiff, we build a qt against +# this modified libtiff as well. + +{ fetchFromGitHub, libtiff }: +let source = import ./source.nix { inherit fetchFromGitHub; }; +in libtiff.overrideAttrs (old: { + inherit (source) src; + version = source.versions.libtiff + "-opentoonz"; + postUnpack = (old.postUnpack or "") + '' + sourceRoot="$sourceRoot/thirdparty/tiff-${source.versions.libtiff}" + ''; + # opentoonz uses internal libtiff headers + postInstall = (old.postInstall or "") + '' + cp libtiff/{tif_config,tif_dir,tiffiop}.h $dev/include + ''; +}) diff --git a/pkgs/applications/graphics/opentoonz/source.nix b/pkgs/applications/graphics/opentoonz/source.nix new file mode 100644 index 000000000000..7378d2f5f965 --- /dev/null +++ b/pkgs/applications/graphics/opentoonz/source.nix @@ -0,0 +1,16 @@ +# opentoonz's source archive contains both opentoonz's source and a modified +# version of libtiff that opentoonz requires. + +{ fetchFromGitHub, }: rec { + versions = { + opentoonz = "1.4.0"; + libtiff = "4.0.3"; + }; + + src = fetchFromGitHub { + owner = "opentoonz"; + repo = "opentoonz"; + rev = "v${versions.opentoonz}"; + sha256 = "0vgclx2yydsm5i2smff3fj8m750nhf35wfhva37kywgws01s189b"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ff526349638..b2ebe62a791d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21227,6 +21227,10 @@ in opentimestamps-client = python3Packages.callPackage ../tools/misc/opentimestamps-client {}; + opentoonz = (qt5.overrideScope' (_: _: { + libtiff = callPackage ../applications/graphics/opentoonz/libtiff.nix { }; + })).callPackage ../applications/graphics/opentoonz { }; + opentx = libsForQt5.callPackage ../applications/misc/opentx { }; opera = callPackage ../applications/networking/browsers/opera {}; From 33e86dd2280b6cd79476639df3e61f9081aef7cc Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Sat, 29 Feb 2020 21:21:24 +0100 Subject: [PATCH 03/57] pcre2: Disable JIT on RISC-V JIT isn't yet supported on RISC-V. JIT was disabled for pcre on RISC-V in 158cf6449c58b559a02dccc40096d4171c8a6589 --- pkgs/development/libraries/pcre2/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix index d39b91355b98..b127eb0a31e2 100644 --- a/pkgs/development/libraries/pcre2/default.nix +++ b/pkgs/development/libraries/pcre2/default.nix @@ -11,8 +11,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-pcre2-16" "--enable-pcre2-32" - "--enable-jit" - ]; + ] ++ stdenv.lib.optional (!stdenv.hostPlatform.isRiscV) "--enable-jit"; outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ]; From 67f989dc5ed9d7ca7265b268bc0037f737318389 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Fri, 7 Aug 2020 15:12:54 +1200 Subject: [PATCH 04/57] jackett: 0.16.175 -> 0.16.998, switch to Mono, adding Darwin support --- pkgs/servers/jackett/default.nix | 42 ++++++++++---------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix index aaa762836bdd..f5b1c547921f 100644 --- a/pkgs/servers/jackett/default.nix +++ b/pkgs/servers/jackett/default.nix @@ -1,39 +1,23 @@ -{ lib, stdenv, fetchurl, makeWrapper, curl, icu60, openssl, zlib }: +{ lib, stdenv, fetchurl, mono, makeWrapper, curl, icu60, openssl, zlib }: stdenv.mkDerivation rec { pname = "jackett"; - version = "0.16.175"; + version = "0.16.998"; - src = { - x86_64-linux = fetchurl { - url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxAMDx64.tar.gz"; - sha512 = "269n84qc8sfrmnidgrjywanbqr65mhkmk24dlqfi17pi0l27wi4fc4qmnjj683xwprz5hqjsmkqf963pbx4k3jaz0rp0jnizan91wij"; - }; - aarch64-linux = fetchurl { - url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxARM64.tar.gz"; - sha512 = "0dmyhprd2vi2z9q5g79psqgsc3w0zdac4s6k20rngi8jxm5jgphzrzcic4rgdijyryap99my619k447w701a08vh9sfcfk0fjg9pgwb"; - }; - }."${stdenv.targetPlatform.system}" or (throw "Missing hash for host system: ${stdenv.targetPlatform.system}"); + src = fetchurl { + url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.Mono.tar.gz"; + sha256 = "16f8ipw4sbdxwv79zjhr5ihd3m6biyhj1gj7cqpjr34ad7zqna3c"; + }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' - mkdir -p $out/{bin,opt/${pname}-${version}} - cp -r * $out/opt/${pname}-${version} + mkdir -p $out/{bin,share/${pname}-${version}} + cp -r * $out/share/${pname}-${version} - makeWrapper "$out/opt/${pname}-${version}/jackett" $out/bin/Jackett \ - --prefix LD_LIBRARY_PATH ':' "${curl.out}/lib:${icu60.out}/lib:${openssl.out}/lib:${zlib.out}/lib" - ''; - - preFixup = let - libPath = lib.makeLibraryPath [ - stdenv.cc.cc.lib # libstdc++.so.6 - ]; - in '' - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${libPath}" \ - $out/opt/${pname}-${version}/jackett + makeWrapper "${mono}/bin/mono" $out/bin/Jackett \ + --add-flags "$out/share/${pname}-${version}/JackettConsole.exe" \ + --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ curl icu60 openssl zlib ]} ''; meta = with stdenv.lib; { @@ -41,6 +25,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/Jackett/Jackett/"; license = licenses.gpl2; maintainers = with maintainers; [ edwtjo nyanloutre ]; - platforms = [ "x86_64-linux" "aarch64-linux" ]; + platforms = platforms.all; }; } From 5d9c31cea7a102c1338d2ad776c42a8701e24471 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 17 Aug 2020 12:14:00 +0200 Subject: [PATCH 05/57] sope: 4.3.2 -> 5.0.0 --- pkgs/development/libraries/sope/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/sope/default.nix b/pkgs/development/libraries/sope/default.nix index 9d0b3bf76b36..2c73ff24df2a 100644 --- a/pkgs/development/libraries/sope/default.nix +++ b/pkgs/development/libraries/sope/default.nix @@ -1,13 +1,13 @@ { gnustep, lib, fetchFromGitHub , libxml2, openssl_1_1 , openldap, mysql, libmysqlclient, postgresql }: with lib; gnustep.stdenv.mkDerivation rec { pname = "sope"; - version = "4.3.2"; + version = "5.0.0"; src = fetchFromGitHub { owner = "inverse-inc"; repo = pname; rev = "SOPE-${version}"; - sha256 = "0ny1ihx38gd25w8f3dfybyswvyjfljvb2fhfmkajgg6hhjrkfar2"; + sha256 = "sha256-7NM9wcyHDSVmjjqu489Ff3iJgl9VM+UBF3XYWoiHHTg="; }; nativeBuildInputs = [ gnustep.make ]; From a0afc29460af23eae8a19c452acd87cb4bf1b6df Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 17 Aug 2020 12:14:51 +0200 Subject: [PATCH 06/57] sogo: 4.3.2 -> 5.0.0 --- pkgs/servers/web-apps/sogo/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix index 3e78b5d9d436..2cd24583e5f7 100644 --- a/pkgs/servers/web-apps/sogo/default.nix +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -1,17 +1,18 @@ { gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python2, lndir -, openssl_1_1, openldap, sope, libmemcached, curl }: with lib; gnustep.stdenv.mkDerivation rec { +, openssl_1_1, openldap, sope, libmemcached, curl, libsodium, libzip, pkgconfig }: +with lib; gnustep.stdenv.mkDerivation rec { pname = "SOGo"; - version = "4.3.2"; + version = "5.0.0"; src = fetchFromGitHub { owner = "inverse-inc"; repo = pname; rev = "SOGo-${version}"; - sha256 = "1xxad23a8zy6w850x5nrrf54db0x73lc9drmc5kpfk870fk2lmr0"; + sha256 = "sha256-SEyyHekUCSkb5rOh7Ty8AhtT4S9KicTRbo9iWhijdGE="; }; nativeBuildInputs = [ gnustep.make makeWrapper python2 ]; - buildInputs = [ gnustep.base sope openssl_1_1 libmemcached (curl.override { openssl = openssl_1_1; }) ] + buildInputs = [ gnustep.base sope openssl_1_1 libmemcached (curl.override { openssl = openssl_1_1; }) libsodium libzip pkgconfig ] ++ optional (openldap != null) openldap; patches = [ From 696357c37651232470ac58b21433f408df5f1988 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 17 Aug 2020 12:15:16 +0200 Subject: [PATCH 07/57] sogo: remove SOGoZipPath sogo links against libzip now --- nixos/modules/services/web-apps/sogo.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/web-apps/sogo.nix b/nixos/modules/services/web-apps/sogo.nix index 5f30124dd68a..4610bb96cb5e 100644 --- a/nixos/modules/services/web-apps/sogo.nix +++ b/nixos/modules/services/web-apps/sogo.nix @@ -77,7 +77,6 @@ in { // Paths WOSendMail = "/run/wrappers/bin/sendmail"; SOGoMailSpoolPath = "/var/lib/sogo/spool"; - SOGoZipPath = "${pkgs.zip}/bin/zip"; // Enable CSRF protection SOGoXSRFValidationEnabled = YES; // Remove dates from log (jornald does that) From 563e56a8a22d91176928a178a011ea62d7ea7a75 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 23 Aug 2020 08:18:29 +0000 Subject: [PATCH 08/57] navi: 2.7.1 -> 2.8.0 --- pkgs/applications/misc/navi/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/navi/default.nix b/pkgs/applications/misc/navi/default.nix index e403ccea0da3..548d49422b52 100644 --- a/pkgs/applications/misc/navi/default.nix +++ b/pkgs/applications/misc/navi/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "navi"; - version = "2.7.1"; + version = "2.8.0"; src = fetchFromGitHub { owner = "denisidoro"; repo = "navi"; rev = "v${version}"; - sha256 = "12p9l41k7isaapr0xbsm7brkjrv7i8826y029i12psz92nsynk29"; + sha256 = "0w63yx4c60r05nfswv61jw3l3zbl5n1s396a6f4ayn52fb6rxwg1"; }; - cargoSha256 = "11dc3gc7fyikbbgacmljhysr2sl7lmq6w3bsfcf2cqny39r25yp0"; + cargoSha256 = "06xpk04nxkm7h4nn235x8a4gi0qhscj8kkl2f9gqphlfmm56kjfn"; nativeBuildInputs = [ makeWrapper ]; From b8b50f7ff6a95470ab19080f6d4e2a5722c16d48 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 24 Aug 2020 04:20:00 +0000 Subject: [PATCH 09/57] vid-stab: 0.98b -> 1.1.0 --- .../libraries/vid-stab/default.nix | 27 ++++++++++--------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/vid-stab/default.nix b/pkgs/development/libraries/vid-stab/default.nix index e22396f8aa39..2921719e7554 100644 --- a/pkgs/development/libraries/vid-stab/default.nix +++ b/pkgs/development/libraries/vid-stab/default.nix @@ -1,22 +1,25 @@ -{ stdenv, fetchurl, cmake }: +{ stdenv, fetchFromGitHub, cmake, openmp }: stdenv.mkDerivation rec { - pname = "vid-stab"; - version = "0.98b"; - - src = fetchurl { - url = "https://github.com/georgmartius/vid.stab/archive/release-${version}.tar.gz"; - sha256 = "09fh6xbd1f5xp3il3dpvr87skmnp2mm2hfmg4s9rvj4y8zvhn3sk"; + pname = "vid.stab"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "georgmartius"; + repo = pname; + rev = "v${version}"; + sha256 = "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"; }; nativeBuildInputs = [ cmake ]; - + + buildInputs = stdenv.lib.optionals stdenv.cc.isClang [ openmp ]; + meta = with stdenv.lib; { description = "Video stabilization library"; - homepage = "http://public.hronopik.de/vid.stab/"; - license = licenses.gpl2; + homepage = "http://public.hronopik.de/vid.stab/"; + license = licenses.gpl2Plus; maintainers = with maintainers; [ codyopel ]; - platforms = platforms.all; + platforms = platforms.all; }; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 694516f80a23..42c4cd62954f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15521,7 +15521,9 @@ in vcg = callPackage ../development/libraries/vcg { }; - vid-stab = callPackage ../development/libraries/vid-stab { }; + vid-stab = callPackage ../development/libraries/vid-stab { + inherit (llvmPackages) openmp; + }; vigra = callPackage ../development/libraries/vigra { }; From c2fe501594d6902e893d95cc01628c175fecfd44 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 24 Aug 2020 04:20:00 -0500 Subject: [PATCH 10/57] vault: 1.5.0 -> 1.5.2 --- pkgs/tools/security/vault/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 50a7844356ff..a9d72f33161f 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { pname = "vault"; - version = "1.5.0"; + version = "1.5.2"; src = fetchFromGitHub { owner = "hashicorp"; repo = "vault"; rev = "v${version}"; - sha256 = "1bdhcsx7hwz4kb68jrrrzlbr7k744g0pym996dq1p5rvz05j3pqc"; + sha256 = "0a16slrg0kx7i1xwixc920lkgbbywvb6wpmkbqjvz1xx72nq9ap4"; }; goPackagePath = "github.com/hashicorp/vault"; From 7b33e80238acb66963e0674c72f8430c774c3f27 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 24 Aug 2020 04:20:00 -0500 Subject: [PATCH 11/57] vault-bin: 1.3.0 -> 1.5.2 --- pkgs/tools/security/vault/vault-bin.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index 6b14a834330d..315cd5ab077a 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -1,30 +1,30 @@ { stdenv, fetchurl, unzip }: let - version = "1.3.0"; + version = "1.5.2"; sources = let base = "https://releases.hashicorp.com/vault/${version}"; in { x86_64-linux = fetchurl { url = "${base}/vault_${version}_linux_amd64.zip"; - sha256 = "1crfj4gd1qwwa2xidd0pjffv0n6hf5hbhv6568m6zc1ig0qqm6yq"; + sha256 = "1m9svs1ncgdwwh16xavwikq4ji9rzkb2wlr59sx61rlz0l18mknd"; }; i686-linux = fetchurl { url = "${base}/vault_${version}_linux_386.zip"; - sha256 = "0pyf0kyvxpmx3fwfvin1r0x30r9byx9lyi81894q06xrhiwbqc0l"; + sha256 = "0hd6gsrmjfly3075kq0rsxhgy927g1462qih0iiwphrhik7l0pwr"; }; x86_64-darwin = fetchurl { url = "${base}/vault_${version}_darwin_amd64.zip"; - sha256 = "113vnpz9n6y7z2k9jqpfpxqxqbrmd9bhny79yaxqzkfdqw8vyv3g"; + sha256 = "092xqjm69ljn70hn9f93qkc0ila0hgj2l14plhsza52d924qnq3l"; }; i686-darwin = fetchurl { url = "${base}/vault_${version}_darwin_386.zip"; - sha256 = "0d191qai0bpl7cyivca26wqgycsj2dz08809z147d1vnrz321v6w"; + sha256 = "161j15n6kfd3m5hakc0qn824kp0nwdghcm81j9vqzpq900sbg6ak"; }; aarch64-linux = fetchurl { url = "${base}/vault_${version}_linux_arm64.zip"; - sha256 = "1bk5y3knc42mh07gnnn6p109qz908014620h1s0348wp4qfdy49w"; + sha256 = "1f6ckfqqj9gsaizwxa7xrjgkkj3nd6m1md7smz0xnxgnc4f7g4z0"; }; }; From 822dcd705bb596577d5c9214f7f95215804d6525 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 24 Aug 2020 11:41:36 +0000 Subject: [PATCH 12/57] topgrade: 5.4.0 -> 5.5.0 --- pkgs/tools/misc/topgrade/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/topgrade/default.nix b/pkgs/tools/misc/topgrade/default.nix index 578d2ba42e53..f009de0a6fce 100644 --- a/pkgs/tools/misc/topgrade/default.nix +++ b/pkgs/tools/misc/topgrade/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "topgrade"; - version = "5.4.0"; + version = "5.5.0"; src = fetchFromGitHub { owner = "r-darwish"; repo = pname; rev = "v${version}"; - sha256 = "1v57dqkrh67cmj1ish650z8yk737hm1qynqr5yv0vlna86gwhrhs"; + sha256 = "1adx029cq30g0qnrvdq2di8bpadzdxrpbsqchxfsda8zg6cprh1j"; }; - cargoSha256 = "00vxrv8lbdwwbdbaqb4rq0w3bc8n9qwk9zgb1j656lyswib7g1d3"; + cargoSha256 = "0jpjn6sb8bkwnq7np487hb8bkm6rv84mihmqwy3ymgdzlqcng6sk"; buildInputs = lib.optional stdenv.isDarwin Foundation; From 9d7a579b2e8fd4c28861e4a3d4082e458bad68bf Mon Sep 17 00:00:00 2001 From: Michael Reilly Date: Sun, 23 Aug 2020 17:00:52 -0400 Subject: [PATCH 13/57] katago: 1.5.0 -> 1.6.0 --- pkgs/games/katago/default.nix | 32 +++++++++++++++++++++++--------- pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/pkgs/games/katago/default.nix b/pkgs/games/katago/default.nix index 492ccbb63abf..c0fe7d282251 100644 --- a/pkgs/games/katago/default.nix +++ b/pkgs/games/katago/default.nix @@ -13,17 +13,25 @@ , opencl-headers ? null , ocl-icd ? null , gperftools ? null +, eigen ? null +, gpuEnabled ? true +, useAVX2 ? false , cudaSupport ? false , useTcmalloc ? true}: +assert !gpuEnabled -> ( + eigen != null && + !cudaSupport); + assert cudaSupport -> ( libGL_driver != null && cudatoolkit != null && cudnn != null); assert !cudaSupport -> ( - opencl-headers != null && - ocl-icd != null); + !gpuEnabled || ( + opencl-headers != null && + ocl-icd != null)); assert useTcmalloc -> ( gperftools != null); @@ -35,13 +43,13 @@ let in env.mkDerivation rec { pname = "katago"; - version = "1.5.0"; + version = "1.6.0"; src = fetchFromGitHub { owner = "lightvector"; repo = "katago"; - rev = "${version}"; - sha256 = "0ajdjdmlzwh7zwk5v0k9zzjawgkf7w30pzqp5bhcsdqz4svvyll2"; + rev = "v${version}"; + sha256 = "1r84ws2rj7j8085v1cqffy9rg65rzrhk6z8jbxivqxsmsgs2zs48"; }; nativeBuildInputs = [ @@ -52,10 +60,12 @@ in env.mkDerivation rec { buildInputs = [ libzip boost - ] ++ lib.optionals cudaSupport [ + ] ++ lib.optionals (!gpuEnabled) [ + eigen + ] ++ lib.optionals (gpuEnabled && cudaSupport) [ cudnn libGL_driver - ] ++ lib.optionals (!cudaSupport) [ + ] ++ lib.optionals (gpuEnabled && !cudaSupport) [ opencl-headers ocl-icd ] ++ lib.optionals useTcmalloc [ @@ -64,9 +74,13 @@ in env.mkDerivation rec { cmakeFlags = [ "-DNO_GIT_REVISION=ON" - ] ++ lib.optionals cudaSupport [ + ] ++ lib.optionals (!gpuEnabled) [ + "-DUSE_BACKEND=EIGEN" + ] ++ lib.optionals useAVX2 [ + "-DUSE_AVX2=ON" + ] ++ lib.optionals (gpuEnabled && cudaSupport) [ "-DUSE_BACKEND=CUDA" - ] ++ lib.optionals (!cudaSupport) [ + ] ++ lib.optionals (gpuEnabled && !cudaSupport) [ "-DUSE_BACKEND=OPENCL" ] ++ lib.optionals useTcmalloc [ "-DUSE_TCMALLOC=ON" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 878615936ce5..65e64e8a85f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24383,6 +24383,10 @@ in cudatoolkit = cudatoolkit_10_2; }; + katagoCPU = katago.override { + gpuEnabled = false; + }; + klavaro = callPackage ../games/klavaro {}; kobodeluxe = callPackage ../games/kobodeluxe { }; From 5d36e00b7df86c6675ff3e81349c6badf5f0a0c1 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Mon, 24 Aug 2020 09:55:22 -0400 Subject: [PATCH 14/57] nixos/sssd: fix the module 'system.nssModules' was not set correctly fix #91242 --- nixos/modules/services/misc/sssd.nix | 4 +++- nixos/tests/all-tests.nix | 1 + nixos/tests/sssd.nix | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 nixos/tests/sssd.nix diff --git a/nixos/modules/services/misc/sssd.nix b/nixos/modules/services/misc/sssd.nix index 3da99a3b38c1..386281e2b7cc 100644 --- a/nixos/modules/services/misc/sssd.nix +++ b/nixos/modules/services/misc/sssd.nix @@ -69,7 +69,7 @@ in { mode = "0400"; }; - system.nssModules = pkgs.sssd; + system.nssModules = [ pkgs.sssd ]; system.nssDatabases = { group = [ "sss" ]; passwd = [ "sss" ]; @@ -92,4 +92,6 @@ in { services.openssh.authorizedKeysCommand = "/etc/ssh/authorized_keys_command"; services.openssh.authorizedKeysCommandUser = "nobody"; })]; + + meta.maintainers = with maintainers; [ bbigras ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fdfe2cfef290..1a8d6a1e9a77 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -320,6 +320,7 @@ in spike = handleTest ./spike.nix {}; sonarr = handleTest ./sonarr.nix {}; sslh = handleTest ./sslh.nix {}; + sssd = handleTestOn ["x86_64-linux"] ./sssd.nix {}; strongswan-swanctl = handleTest ./strongswan-swanctl.nix {}; sudo = handleTest ./sudo.nix {}; switchTest = handleTest ./switch-test.nix {}; diff --git a/nixos/tests/sssd.nix b/nixos/tests/sssd.nix new file mode 100644 index 000000000000..4c6ca86c74c8 --- /dev/null +++ b/nixos/tests/sssd.nix @@ -0,0 +1,17 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +{ + name = "sssd"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ bbigras ]; + }; + machine = { pkgs, ... }: { + services.sssd.enable = true; + }; + + testScript = '' + start_all() + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("sssd.service") + ''; +}) From 6ba9e9c4c36b7a7e4921fe58286fee2ea52fabd6 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 24 Aug 2020 20:46:42 +0200 Subject: [PATCH 15/57] sogo: switch to (hopefully) stable patch url patches were "rewritten" in their repo, that's why the hash changed --- pkgs/servers/web-apps/sogo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/sogo/default.nix b/pkgs/servers/web-apps/sogo/default.nix index 2cd24583e5f7..1ec512ba0ca5 100644 --- a/pkgs/servers/web-apps/sogo/default.nix +++ b/pkgs/servers/web-apps/sogo/default.nix @@ -18,8 +18,8 @@ with lib; gnustep.stdenv.mkDerivation rec { patches = [ # TODO: take a closer look at other patches in https://sources.debian.org/patches/sogo/ and https://github.com/Skrupellos/sogo-patches (fetchpatch { - url = "https://sources.debian.org/data/main/s/sogo/4.3.0-1/debian/patches/0005-Remove-build-date.patch"; - sha256 = "0lrh3bkfj3r0brahfkyb0g7zx7r2jjd5cxzjl43nqla0fs09wsh8"; + url = "https://salsa.debian.org/debian/sogo/-/raw/120ac6390602c811908c7fcb212a79acbc7f7f28/debian/patches/0005-Remove-build-date.patch"; + sha256 = "151i8504kwdlcirgd0pbif7cxnb1q6jsp5j7dbh9p6zw2xgwkp25"; }) ]; From 0fec62c13b39e4be90e9399cba101ddddf96a0c0 Mon Sep 17 00:00:00 2001 From: Louis Tim Larsen Date: Sun, 23 Aug 2020 21:46:37 +0200 Subject: [PATCH 16/57] signal-desktop: Add libdbusmenu support Provides optional menu bar support for various desktop environments. --- .../networking/instant-messengers/signal-desktop/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index 90e2b201ebbe..c210211df6b0 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -2,7 +2,9 @@ , gnome2, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig , dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite , libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib -, cups, expat, systemd, libnotify, libuuid, at-spi2-core, libappindicator-gtk3 +, cups, expat, libuuid, at-spi2-core, libappindicator-gtk3 +# Runtime dependencies: +, systemd, libnotify, libdbusmenu # Unfortunately this also overwrites the UI language (not just the spell # checking language!): , hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE" @@ -81,6 +83,7 @@ in stdenv.mkDerivation rec { runtimeDependencies = [ systemd.lib libnotify + libdbusmenu ]; unpackPhase = "dpkg-deb -x $src ."; From b9fe9be2c670cbf8985699002caee488a02bcad9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 09:58:38 +0000 Subject: [PATCH 17/57] debianutils: 4.11 -> 4.11.1 --- pkgs/tools/misc/debianutils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/debianutils/default.nix b/pkgs/tools/misc/debianutils/default.nix index 930f1f59a8aa..141df3332227 100644 --- a/pkgs/tools/misc/debianutils/default.nix +++ b/pkgs/tools/misc/debianutils/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "debianutils"; - version = "4.11"; + version = "4.11.1"; src = fetchurl { url = "mirror://debian/pool/main/d/${pname}/${pname}_${version}.tar.xz"; - sha256 = "0lbizfnf3qwsiz2ggia6ff7sjjj8gwhys8bm6wixdc4n0qlycp5v"; + sha256 = "0g4qmzb2ff0rqszzpsal465hcslnpdl4nhghv59qvhamkkqnks4b"; }; meta = with stdenv.lib; { From 8e3da733b15a3c835305d0ba99e33ab33b4ce2d1 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Tue, 25 Aug 2020 12:03:29 +0200 Subject: [PATCH 18/57] nixos: wpa_supplicant: warn on unused config --- nixos/modules/services/networking/wpa_supplicant.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 08a17d20ed7f..395139879036 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -233,6 +233,9 @@ in { path = [ pkgs.wpa_supplicant ]; script = '' + if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ] + then echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead." + fi iface_args="-s -u -D${cfg.driver} -c ${configFile}" ${if ifaces == [] then '' for i in $(cd /sys/class/net && echo *); do From 7ec800fda1b1a6cbc6042c1d4cbfd095134b1e5f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 12:42:02 +0000 Subject: [PATCH 19/57] elvish: 0.14.0 -> 0.14.1 --- pkgs/shells/elvish/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/elvish/default.nix b/pkgs/shells/elvish/default.nix index 64dd3cd70c7f..2cb45f33f7bc 100644 --- a/pkgs/shells/elvish/default.nix +++ b/pkgs/shells/elvish/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "elvish"; - version = "0.14.0"; + version = "0.14.1"; excludedPackages = [ "website" ]; @@ -12,7 +12,7 @@ buildGoModule rec { owner = "elves"; repo = pname; rev = "v${version}"; - sha256 = "1jsxhnm82pjzwvcjq7vrlldyjnv5j6c83a13dj6zphlqq99z68l4"; + sha256 = "05wp3cx4s2cjf60yncdpmycs5h4z1dlin56dmljmfwz4z099079b"; }; vendorSha256 = "1f971n17h9bc0qcgs9ipiaw0x9807mz761fqm605br4ch1kp0897"; From 4bb07287605bbe38a868e53892b0868128ab6e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Tue, 25 Aug 2020 14:41:32 +0200 Subject: [PATCH 20/57] papermc: cleanup - Use Nix store path for the shebang to make this work on systems without /bin/sh. - Replace phases by dont*. - Install jar file to $out/share/papermc rather than $out. - License gpl3 -> gpl3Only (couldn't find any evidence that this is gpl3Plus). --- pkgs/games/papermc/default.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/games/papermc/default.nix b/pkgs/games/papermc/default.nix index c0446c4fa5b7..c5f7dc379259 100644 --- a/pkgs/games/papermc/default.nix +++ b/pkgs/games/papermc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jre }: +{ stdenv, fetchurl, bash, jre }: let mcVersion = "1.16.2"; buildNum = "141"; @@ -13,22 +13,23 @@ in stdenv.mkDerivation { preferLocalBuild = true; dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - cp ${jar} $out/papermc.jar - cat > $out/bin/minecraft-server << EOF - #!/bin/sh - exec ${jre}/bin/java \$@ -jar $out/papermc.jar nogui - EOF - chmod +x $out/bin/minecraft-server + dontConfigure = true; + + buildPhase = '' + cat > minecraft-server << EOF + #!${bash}/bin/sh + exec ${jre}/bin/java \$@ -jar $out/share/papermc/papermc.jar nogui ''; - phases = "installPhase"; + installPhase = '' + install -Dm444 ${jar} $out/share/papermc/papermc.jar + install -Dm555 -t $out/bin minecraft-server + ''; meta = { description = "High-performance Minecraft Server"; homepage = "https://papermc.io/"; - license = stdenv.lib.licenses.gpl3; + license = stdenv.lib.licenses.gpl3Only; platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ aaronjanse ]; }; From e34b5375cd9b256ce7030fec4430dde275fe140f Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Tue, 25 Aug 2020 21:03:03 +0800 Subject: [PATCH 21/57] haskellPackages.haskell-language-server: fix typo in update script --- .../development/tools/haskell/haskell-language-server/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/haskell/haskell-language-server/update.sh b/pkgs/development/tools/haskell/haskell-language-server/update.sh index 498859843c4d..002ccab40111 100755 --- a/pkgs/development/tools/haskell/haskell-language-server/update.sh +++ b/pkgs/development/tools/haskell/haskell-language-server/update.sh @@ -26,7 +26,7 @@ ghcide_old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$ghcide_derivati # This is the revision of ghcide used by hls on GitHub. ghcide_new_version=$(curl --silent "https://api.github.com/repos/haskell/haskell-language-server/contents/ghcide" | jq '.sha' --raw-output) -echo "Updating haskell-language-server from old version $ghcide_old_version to new version $ghcide_new_version." +echo "Updating haskell-language-server's ghcide from old version $ghcide_old_version to new version $ghcide_new_version." echo "Running cabal2nix and outputting to ${ghcide_derivation_file}..." cabal2nix --revision "$ghcide_new_version" "https://github.com/wz1000/ghcide" > "$ghcide_derivation_file" From 295612e59a0d6a797bbe57b63fd4edeae23ad75c Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Tue, 25 Aug 2020 07:25:39 -0700 Subject: [PATCH 22/57] open-policy-agent: 0.22.0 -> 0.23.2 --- pkgs/development/tools/open-policy-agent/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/open-policy-agent/default.nix b/pkgs/development/tools/open-policy-agent/default.nix index c91727d6f117..d31a7e3ab60f 100644 --- a/pkgs/development/tools/open-policy-agent/default.nix +++ b/pkgs/development/tools/open-policy-agent/default.nix @@ -2,14 +2,14 @@ buildGoPackage rec { pname = "open-policy-agent"; - version = "0.22.0"; + version = "0.23.2"; goPackagePath = "github.com/open-policy-agent/opa"; src = fetchFromGitHub { owner = "open-policy-agent"; repo = "opa"; rev = "v${version}"; - sha256 = "1kndiiqf6b4j8zhv0ypjr9dfjgck25qiqa2bb0pmpm3j9460zzjs"; + sha256 = "18hpanfrzg6xnq1g0yws6g0lw4y191pnrqphccv13j6kqk3k10ps"; }; goDeps = ./deps.nix; From d7c8a477d05c06de39ff9d8e3e6599733c990663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lio=E6=9D=8E=E6=AC=A7?= Date: Mon, 24 Aug 2020 17:09:55 -0700 Subject: [PATCH 23/57] alloy: enable build on Darwin --- pkgs/development/tools/alloy/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/alloy/default.nix b/pkgs/development/tools/alloy/default.nix index ed91df066c3a..44a6d7329baa 100644 --- a/pkgs/development/tools/alloy/default.nix +++ b/pkgs/development/tools/alloy/default.nix @@ -44,7 +44,7 @@ let generic = { major, version, src }: homepage = "http://alloytools.org/"; downloadPage = "http://alloytools.org/download.html"; license = licenses.mit; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ notbandali ]; }; }; From f9c74c3f4b18bd4cd40935ef2a2e9895949d1efa Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 17:36:34 +0200 Subject: [PATCH 24/57] Revert "tdesktop: Add a temporary workaround to fix the Linux build" This reverts commit e7987936c1b28b0de3d774731bc26cde47c24c44. With 57f05745951 in master this workaround is not required anymore. --- .../instant-messengers/telegram/tdesktop/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 014e22bc5124..7e932d74abc5 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchurl, fetchsvn, stdenv +{ mkDerivation, lib, fetchurl, fetchsvn , pkgconfig, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook , qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash , dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3 @@ -63,8 +63,6 @@ mkDerivation rec { "-DDESKTOP_APP_DISABLE_WEBRTC_INTEGRATION=ON" #"-DDESKTOP_APP_SPECIAL_TARGET=\"\"" # TODO: Error when set to "": Bad special target '""' "-DTDESKTOP_LAUNCHER_BASENAME=telegramdesktop" # Note: This is the default - ] ++ optionals stdenv.isLinux [ # TODO: Remove workaround once #94905 is resolved: - "-DCMAKE_OSX_ARCHITECTURES=" ]; # Note: The following packages could be packaged system-wide, but it's From 31f23ebc1f7765a62140f6d6498ceaf6da927423 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 19:22:51 +0200 Subject: [PATCH 25/57] Revert "nheko: dirty fix to #94942 (#95060)" This reverts commit f8a49ec8dbe3eac1a8f6e4dd8146eae633142808. With 57f05745951 in master this workaround is not required anymore. --- .../networking/instant-messengers/nheko/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/nheko/default.nix b/pkgs/applications/networking/instant-messengers/nheko/default.nix index 5d9963956ed6..2f5316c9fe27 100644 --- a/pkgs/applications/networking/instant-messengers/nheko/default.nix +++ b/pkgs/applications/networking/instant-messengers/nheko/default.nix @@ -54,11 +54,6 @@ mkDerivation rec { qtquickcontrols2 qtgraphicaleffects ] ++ lib.optional stdenv.isDarwin qtmacextras; - # Quick and dirty fix to https://github.com/NixOS/nixpkgs/issues/94952 - # and/or: https://github.com/NixOS/nixpkgs/issues/94905 - cmakeFlags = [ - "-DCMAKE_OSX_ARCHITECTURES=" - ]; meta = with stdenv.lib; { description = "Desktop client for the Matrix protocol"; From 28f2797a81e738234cdc57a688afb136f692672b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 19:29:57 +0200 Subject: [PATCH 26/57] llvm_11: Copy all files from llvmPackages_10 This is simply the result of: cp -r pkgs/development/compilers/llvm/10 pkgs/development/compilers/llvm/11/ --- .../compilers/llvm/11/bintools.nix | 29 ++ .../llvm/11/clang/compiler-rt-baremetal.patch | 53 +++ .../compilers/llvm/11/clang/default.nix | 117 +++++ .../compilers/llvm/11/clang/purity.patch | 30 ++ .../llvm/11/compiler-rt-armv7l.patch | 32 ++ .../llvm/11/compiler-rt-codesign.patch | 33 ++ .../compilers/llvm/11/compiler-rt.nix | 86 ++++ .../development/compilers/llvm/11/default.nix | 196 +++++++++ .../llvm/11/find-darwin-sdk-version.patch | 62 +++ .../compilers/llvm/11/libc++/default.nix | 52 +++ .../compilers/llvm/11/libc++abi.nix | 67 +++ .../llvm/11/libcxxabi-no-threads.patch | 12 + .../compilers/llvm/11/libcxxabi-wasm.patch | 16 + .../compilers/llvm/11/libunwind.nix | 14 + pkgs/development/compilers/llvm/11/lld.nix | 33 ++ .../compilers/llvm/11/lldb-procfs.patch | 31 ++ pkgs/development/compilers/llvm/11/lldb.nix | 101 +++++ .../compilers/llvm/11/llvm-outputs.patch | 26 ++ pkgs/development/compilers/llvm/11/llvm.nix | 188 ++++++++ pkgs/development/compilers/llvm/11/openmp.nix | 26 ++ .../compilers/llvm/11/sanitizers-nongnu.patch | 412 ++++++++++++++++++ 21 files changed, 1616 insertions(+) create mode 100644 pkgs/development/compilers/llvm/11/bintools.nix create mode 100644 pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch create mode 100644 pkgs/development/compilers/llvm/11/clang/default.nix create mode 100644 pkgs/development/compilers/llvm/11/clang/purity.patch create mode 100644 pkgs/development/compilers/llvm/11/compiler-rt-armv7l.patch create mode 100644 pkgs/development/compilers/llvm/11/compiler-rt-codesign.patch create mode 100644 pkgs/development/compilers/llvm/11/compiler-rt.nix create mode 100644 pkgs/development/compilers/llvm/11/default.nix create mode 100644 pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch create mode 100644 pkgs/development/compilers/llvm/11/libc++/default.nix create mode 100644 pkgs/development/compilers/llvm/11/libc++abi.nix create mode 100644 pkgs/development/compilers/llvm/11/libcxxabi-no-threads.patch create mode 100644 pkgs/development/compilers/llvm/11/libcxxabi-wasm.patch create mode 100644 pkgs/development/compilers/llvm/11/libunwind.nix create mode 100644 pkgs/development/compilers/llvm/11/lld.nix create mode 100644 pkgs/development/compilers/llvm/11/lldb-procfs.patch create mode 100644 pkgs/development/compilers/llvm/11/lldb.nix create mode 100644 pkgs/development/compilers/llvm/11/llvm-outputs.patch create mode 100644 pkgs/development/compilers/llvm/11/llvm.nix create mode 100644 pkgs/development/compilers/llvm/11/openmp.nix create mode 100644 pkgs/development/compilers/llvm/11/sanitizers-nongnu.patch diff --git a/pkgs/development/compilers/llvm/11/bintools.nix b/pkgs/development/compilers/llvm/11/bintools.nix new file mode 100644 index 000000000000..53f7941e3369 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/bintools.nix @@ -0,0 +1,29 @@ +{ runCommand, stdenv, llvm, lld, version }: + +let + prefix = + if stdenv.hostPlatform != stdenv.targetPlatform + then "${stdenv.targetPlatform.config}-" + else ""; +in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } '' + mkdir -p $out/bin + for prog in ${lld}/bin/*; do + ln -s $prog $out/bin/${prefix}$(basename $prog) + done + for prog in ${llvm}/bin/*; do + ln -sf $prog $out/bin/${prefix}$(basename $prog) + done + + ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar + ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as + ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp + ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm + ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy + ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump + ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib + ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf + ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size + ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip + + ln -s ${lld}/bin/lld $out/bin/${prefix}ld +'' diff --git a/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch b/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch new file mode 100644 index 000000000000..a4a0f21b0fcd --- /dev/null +++ b/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch @@ -0,0 +1,53 @@ +Index: lib/Driver/ToolChains/BareMetal.cpp +=================================================================== +--- a/lib/Driver/ToolChains/BareMetal.cpp ++++ b/lib/Driver/ToolChains/BareMetal.cpp +@@ -157,7 +157,7 @@ + void BareMetal::AddLinkRuntimeLib(const ArgList &Args, + ArgStringList &CmdArgs) const { + CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" + +- getTriple().getArchName() + ".a")); ++ getTriple().getArchName())); + } + + void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, +Index: test/Driver/baremetal.cpp +=================================================================== +--- a/test/Driver/baremetal.cpp ++++ b/test/Driver/baremetal.cpp +@@ -13,7 +13,7 @@ + // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal" + // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for" +-// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" ++// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" + // CHECK-V6M-C-SAME: "-o" "{{.*}}.o" + + // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +@@ -35,7 +35,7 @@ + // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" + // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind" +-// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" ++// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" + // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o" + + // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +@@ -48,7 +48,7 @@ + // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" + // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind" +-// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" ++// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" + // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o" + + // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +@@ -61,7 +61,7 @@ + // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" + // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind" +-// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" ++// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" + // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o" + + // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix new file mode 100644 index 000000000000..a3d6e7e402ab --- /dev/null +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -0,0 +1,117 @@ +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld +, fixDarwinDylibNames +, enableManpages ? false +}: + +let + self = stdenv.mkDerivation ({ + pname = "clang"; + inherit version; + + src = fetch "clang" "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"; + + unpackPhase = '' + unpackFile $src + mv clang-${version}* clang + sourceRoot=$PWD/clang + unpackFile ${clang-tools-extra_src} + mv clang-tools-extra-* $sourceRoot/tools/extra + ''; + + nativeBuildInputs = [ cmake python3 lld ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + + buildInputs = [ libxml2 llvm ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + + cmakeFlags = [ + "-DCMAKE_CXX_FLAGS=-std=c++14" + "-DCLANGD_BUILD_XPC=OFF" + "-DLLVM_ENABLE_RTTI=ON" + ] ++ stdenv.lib.optionals enableManpages [ + "-DCLANG_INCLUDE_DOCS=ON" + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" + ]; + + patches = [ + ./purity.patch + # https://reviews.llvm.org/D51899 + ./compiler-rt-baremetal.patch + ]; + + postPatch = '' + sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \ + -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \ + lib/Driver/ToolChains/*.cpp + + # Patch for standalone doc building + sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp + '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace tools/extra/clangd/CMakeLists.txt \ + --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE + ''; + + outputs = [ "out" "lib" "python" ]; + + # Clang expects to find LLVMgold in its own prefix + postInstall = '' + if [ -e ${llvm}/lib/LLVMgold.so ]; then + ln -sv ${llvm}/lib/LLVMgold.so $out/lib + fi + + ln -sv $out/bin/clang $out/bin/cpp + + # Move libclang to 'lib' output + moveToOutput "lib/libclang.*" "$lib" + moveToOutput "lib/libclang-cpp.*" "$lib" + substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \ + --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \ + --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp." + + mkdir -p $python/bin $python/share/clang/ + mv $out/bin/{git-clang-format,scan-view} $python/bin + if [ -e $out/bin/set-xcode-analyzer ]; then + mv $out/bin/set-xcode-analyzer $python/bin + fi + mv $out/share/clang/*.py $python/share/clang + rm $out/bin/c-index-test + ''; + + enableParallelBuilding = true; + + passthru = { + isClang = true; + inherit llvm; + }; + + meta = { + description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler"; + homepage = "https://llvm.org/"; + license = stdenv.lib.licenses.ncsa; + platforms = stdenv.lib.platforms.all; + }; + } // stdenv.lib.optionalAttrs enableManpages { + pname = "clang-manpages"; + + buildPhase = '' + make docs-clang-man + ''; + + installPhase = '' + mkdir -p $out/share/man/man1 + # Manually install clang manpage + cp docs/man/*.1 $out/share/man/man1/ + ''; + + outputs = [ "out" ]; + + doCheck = false; + + meta.description = "man page for Clang ${version}"; + }); +in self diff --git a/pkgs/development/compilers/llvm/11/clang/purity.patch b/pkgs/development/compilers/llvm/11/clang/purity.patch new file mode 100644 index 000000000000..a6729a9b004e --- /dev/null +++ b/pkgs/development/compilers/llvm/11/clang/purity.patch @@ -0,0 +1,30 @@ +From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 +From: Will Dietz +Date: Thu, 18 May 2017 11:56:12 -0500 +Subject: [PATCH] "purity" patch for 5.0 + +--- + lib/Driver/ToolChains/Gnu.cpp | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp +index fe3c0191bb..c6a482bece 100644 +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, + if (!IsStatic) { + if (Args.hasArg(options::OPT_rdynamic)) + CmdArgs.push_back("-export-dynamic"); +- +- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) { +- const std::string Loader = +- D.DyldPrefix + ToolChain.getDynamicLinker(Args); +- CmdArgs.push_back("-dynamic-linker"); +- CmdArgs.push_back(Args.MakeArgString(Loader)); +- } + } + + CmdArgs.push_back("-o"); +-- +2.11.0 + diff --git a/pkgs/development/compilers/llvm/11/compiler-rt-armv7l.patch b/pkgs/development/compilers/llvm/11/compiler-rt-armv7l.patch new file mode 100644 index 000000000000..120cfe6feb2a --- /dev/null +++ b/pkgs/development/compilers/llvm/11/compiler-rt-armv7l.patch @@ -0,0 +1,32 @@ +diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake +--- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900 ++++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900 +@@ -24,7 +24,7 @@ + + + set(ARM64 aarch64) +-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k) ++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l) + set(HEXAGON hexagon) + set(X86 i386) + set(X86_64 x86_64) +diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt +--- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900 ++++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900 +@@ -474,6 +474,7 @@ + set(armv7_SOURCES ${arm_SOURCES}) + set(armv7s_SOURCES ${arm_SOURCES}) + set(armv7k_SOURCES ${arm_SOURCES}) ++set(armv7l_SOURCES ${arm_SOURCES}) + set(arm64_SOURCES ${aarch64_SOURCES}) + + # macho_embedded archs +@@ -595,7 +596,7 @@ + foreach (arch ${BUILTIN_SUPPORTED_ARCH}) + if (CAN_TARGET_${arch}) + # For ARM archs, exclude any VFP builtins if VFP is not supported +- if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$") ++ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$") + string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}") + check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP) + if(NOT COMPILER_RT_HAS_${arch}_VFP) diff --git a/pkgs/development/compilers/llvm/11/compiler-rt-codesign.patch b/pkgs/development/compilers/llvm/11/compiler-rt-codesign.patch new file mode 100644 index 000000000000..3cc12b94b200 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/compiler-rt-codesign.patch @@ -0,0 +1,33 @@ +From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001 +From: Will Dietz +Date: Tue, 19 Sep 2017 13:13:06 -0500 +Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that + needs it + +--- + cmake/Modules/AddCompilerRT.cmake | 8 ------ + test/asan/CMakeLists.txt | 52 --------------------------------------- + test/tsan/CMakeLists.txt | 47 ----------------------------------- + 3 files changed, 107 deletions(-) + +diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake +index bc5fb9ff7..b64eb4246 100644 +--- a/cmake/Modules/AddCompilerRT.cmake ++++ b/cmake/Modules/AddCompilerRT.cmake +@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type) + set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") + set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") + endif() +- if(APPLE) +- # Ad-hoc sign the dylibs +- add_custom_command(TARGET ${libname} +- POST_BUILD +- COMMAND codesign --sign - $ +- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} +- ) +- endif() + endif() + install(TARGETS ${libname} + ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} +2.14.1 + diff --git a/pkgs/development/compilers/llvm/11/compiler-rt.nix b/pkgs/development/compilers/llvm/11/compiler-rt.nix new file mode 100644 index 000000000000..47bbe808ac20 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/compiler-rt.nix @@ -0,0 +1,86 @@ +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: + +let + + useLLVM = stdenv.hostPlatform.useLLVM or false; + bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none"; + inherit (stdenv.hostPlatform) isMusl; + +in + +stdenv.mkDerivation rec { + pname = "compiler-rt"; + inherit version; + src = fetch pname "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"; + + nativeBuildInputs = [ cmake python3 llvm ]; + buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; + + NIX_CFLAGS_COMPILE = [ + "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" + ]; + + cmakeFlags = [ + "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" + "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" + "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" + ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [ + "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" + "-DCOMPILER_RT_BUILD_XRAY=OFF" + "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" + "-DCOMPILER_RT_BUILD_PROFILE=OFF" + ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [ + "-DCMAKE_C_COMPILER_WORKS=ON" + "-DCMAKE_CXX_COMPILER_WORKS=ON" + "-DCOMPILER_RT_BAREMETAL_BUILD=ON" + "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}" + ] ++ stdenv.lib.optionals (useLLVM) [ + "-DCOMPILER_RT_BUILD_BUILTINS=ON" + "-DCMAKE_C_FLAGS=-nodefaultlibs" + #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program + "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY" + ] ++ stdenv.lib.optionals (bareMetal) [ + "-DCOMPILER_RT_OS_DIR=baremetal" + ]; + + outputs = [ "out" "dev" ]; + + patches = [ + ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory + ./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15 + ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch + ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.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 + # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd + # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by + # a flag and turn the flag off during the stdenv build. + postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace cmake/config-ix.cmake \ + --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' + '' + stdenv.lib.optionalString (useLLVM) '' + substituteInPlace lib/builtins/int_util.c \ + --replace "#include " "" + substituteInPlace lib/builtins/clear_cache.c \ + --replace "#include " "" + substituteInPlace lib/builtins/cpu_model.c \ + --replace "#include " "" + ''; + + # Hack around weird upsream RPATH bug + postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) '' + ln -s "$out/lib"/*/* "$out/lib" + '' + stdenv.lib.optionalString (useLLVM) '' + ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o + ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o + ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o + ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o + ''; + + enableParallelBuilding = true; +} diff --git a/pkgs/development/compilers/llvm/11/default.nix b/pkgs/development/compilers/llvm/11/default.nix new file mode 100644 index 000000000000..37ab89a5a315 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/default.nix @@ -0,0 +1,196 @@ +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages +, buildLlvmTools # tools, but from the previous stage, for cross +, targetLlvmLibraries # libraries, but from the next stage, for cross +}: + +let + release_version = "10.0.1"; + version = release_version; # differentiating these (variables) is important for RCs + targetConfig = stdenv.targetPlatform.config; + + fetch = name: sha256: fetchurl { + url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz"; + inherit sha256; + }; + + clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh"; + + tools = stdenv.lib.makeExtensible (tools: let + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); + mkExtraBuildCommands = cc: '' + rsrc="$out/resource-root" + mkdir "$rsrc" + ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" + ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" + echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags + ''; + in { + + llvm = callPackage ./llvm.nix { }; + + clang-unwrapped = callPackage ./clang { + inherit (tools) lld; + inherit clang-tools-extra_src; + }; + + # disabled until recommonmark supports sphinx 3 + #Llvm-manpages = lowPrio (tools.llvm.override { + # enableManpages = true; + # python3 = pkgs.python3; # don't use python-boot + #}); + + clang-manpages = lowPrio (tools.clang-unwrapped.override { + enableManpages = true; + python3 = pkgs.python3; # don't use python-boot + }); + + # disabled until recommonmark supports sphinx 3 + # lldb-manpages = lowPrio (tools.lldb.override { + # enableManpages = true; + # python3 = pkgs.python3; # don't use python-boot + # }); + + libclang = tools.clang-unwrapped.lib; + + clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang; + + libstdcxxClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; + extraPackages = [ + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = mkExtraBuildCommands cc; + }; + + libcxxClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = targetLlvmLibraries.libcxx; + extraPackages = [ + targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = mkExtraBuildCommands cc; + }; + + lld = callPackage ./lld.nix {}; + + lldb = callPackage ./lldb.nix {}; + + # Below, is the LLVM bootstrapping logic. It handles building a + # fully LLVM toolchain from scratch. No GCC toolchain should be + # pulled in. As a consequence, it is very quick to build different + # targets provided by LLVM and we can also build for what GCC + # doesn’t support like LLVM. Probably we should move to some other + # file. + + bintools = callPackage ./bintools.nix {}; + + lldClang = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = targetLlvmLibraries.libcxx; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + }; + extraPackages = [ + targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [ + targetLlvmLibraries.libunwind + ]; + extraBuildCommands = '' + echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags + echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) '' + echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm '' + echo "-fno-exceptions" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + lldClangNoLibcxx = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + }; + extraPackages = [ + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = '' + echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags + echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags + echo "-nostdlib++" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + lldClangNoLibc = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + libc = null; + }; + extraPackages = [ + targetLlvmLibraries.compiler-rt + ]; + extraBuildCommands = '' + echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags + echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + lldClangNoCompilerRt = wrapCCWith { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = wrapBintoolsWith { + inherit (tools) bintools; + libc = null; + }; + extraPackages = [ ]; + extraBuildCommands = '' + echo "-nostartfiles" >> $out/nix-support/cc-cflags + ''; + }; + + }); + + libraries = stdenv.lib.makeExtensible (libraries: let + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); + in { + + compiler-rt = callPackage ./compiler-rt.nix ({} // + (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt; + })); + + stdenv = overrideCC stdenv buildLlvmTools.clang; + + libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; + + libcxx = callPackage ./libc++ ({} // + (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; + })); + + libcxxabi = callPackage ./libc++abi.nix ({} // + (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; + libunwind = libraries.libunwind; + })); + + openmp = callPackage ./openmp.nix {}; + + libunwind = callPackage ./libunwind.nix ({} // + (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) { + stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx; + })); + + }); + +in { inherit tools libraries; } // libraries // tools diff --git a/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch b/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch new file mode 100644 index 000000000000..fc16ddda76b7 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch @@ -0,0 +1,62 @@ +--- a/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:13:55.000000000 +0100 ++++ b/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:19:37.000000000 +0100 +@@ -43,41 +43,6 @@ + set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE) + endfunction() + +-function(find_darwin_sdk_version var sdk_name) +- # We deliberately don't cache the result here because +- # CMake's caching causes too many problems. +- set(result_process 1) +- if(NOT DARWIN_PREFER_PUBLIC_SDK) +- # Let's first try the internal SDK, otherwise use the public SDK. +- execute_process( +- COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version +- RESULT_VARIABLE result_process +- OUTPUT_VARIABLE var_internal +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ERROR_FILE /dev/null +- ) +- endif() +- if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}") +- execute_process( +- COMMAND xcrun --sdk ${sdk_name} --show-sdk-version +- RESULT_VARIABLE result_process +- OUTPUT_VARIABLE var_internal +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ERROR_FILE /dev/null +- ) +- endif() +- if(NOT result_process EQUAL 0) +- message(FATAL_ERROR +- "Failed to determine SDK version for \"${sdk_name}\" SDK") +- endif() +- # Check reported version looks sane. +- if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$") +- message(FATAL_ERROR +- "Reported SDK version \"${var_internal}\" does not look like a version") +- endif() +- set(${var} ${var_internal} PARENT_SCOPE) +-endfunction() +- + # There isn't a clear mapping of what architectures are supported with a given + # target platform, but ld's version output does list the architectures it can + # link for. +@@ -119,17 +84,6 @@ + foreach(flag ${DARWIN_${os}_LINK_FLAGS}) + set(os_linker_flags "${os_linker_flags} ${flag}") + endforeach() +- +- # Disable building for i386 for macOS SDK >= 10.15. The SDK doesn't support +- # linking for i386 and the corresponding OS doesn't allow running macOS i386 +- # binaries. +- if ("${os}" STREQUAL "osx") +- find_darwin_sdk_version(macosx_sdk_version "macosx") +- if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15) +- message(STATUS "Disabling i386 slice for ${valid_archs}") +- list(REMOVE_ITEM archs "i386") +- endif() +- endif() + endif() + + # The simple program will build for x86_64h on the simulator because it is diff --git a/pkgs/development/compilers/llvm/11/libc++/default.nix b/pkgs/development/compilers/llvm/11/libc++/default.nix new file mode 100644 index 000000000000..651f1887553d --- /dev/null +++ b/pkgs/development/compilers/llvm/11/libc++/default.nix @@ -0,0 +1,52 @@ +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version +, enableShared ? true }: + +stdenv.mkDerivation { + pname = "libc++"; + inherit version; + + src = fetch "libcxx" "0v78bfr6h2zifvdqnj2wlfk4pvxzrqn3hg1v6lqk3y12bx9p9xny"; + + postUnpack = '' + unpackFile ${libcxxabi.src} + export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include" + ''; + + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch; + + preConfigure = '' + # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package + cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR") + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + patchShebangs utils/cat_files.py + ''; + nativeBuildInputs = [ cmake ] + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; + + buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + + cmakeFlags = [ + "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" + "-DLIBCXX_LIBCPPABI_VERSION=2" + "-DLIBCXX_CXX_ABI=libcxxabi" + ] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" + ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" + ++ stdenv.lib.optional stdenv.hostPlatform.isWasm [ + "-DLIBCXX_ENABLE_THREADS=OFF" + "-DLIBCXX_ENABLE_FILESYSTEM=OFF" + "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" + ] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; + + enableParallelBuilding = true; + + passthru = { + isLLVM = true; + }; + + meta = { + homepage = "https://libcxx.llvm.org/"; + description = "A new implementation of the C++ standard library, targeting C++11"; + license = with stdenv.lib.licenses; [ ncsa mit ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/11/libc++abi.nix b/pkgs/development/compilers/llvm/11/libc++abi.nix new file mode 100644 index 000000000000..00371b862adb --- /dev/null +++ b/pkgs/development/compilers/llvm/11/libc++abi.nix @@ -0,0 +1,67 @@ +{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version +, enableShared ? true }: + +stdenv.mkDerivation { + pname = "libc++abi"; + inherit version; + + src = fetch "libcxxabi" "0yqs722y76cwvmfsq0lb917r9m3fci7bf5z3yzl71yz9n88ghzm9"; + + nativeBuildInputs = [ cmake ]; + buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; + + cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [ + "-DLLVM_ENABLE_LIBCXX=ON" + "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [ + "-DLIBCXXABI_ENABLE_THREADS=OFF" + "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" + ] ++ stdenv.lib.optionals (!enableShared) [ + "-DLIBCXXABI_ENABLE_SHARED=OFF" + ]; + + patches = [ ./libcxxabi-no-threads.patch ]; + + postUnpack = '' + unpackFile ${libcxx.src} + unpackFile ${llvm.src} + cmakeFlags+=" -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + export TRIPLE=x86_64-apple-darwin + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch} + '' + stdenv.lib.optionalString stdenv.hostPlatform.isWasm '' + patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch} + ''; + + installPhase = if stdenv.isDarwin + then '' + for file in lib/*.dylib; do + # this should be done in CMake, but having trouble figuring out + # the magic combination of necessary CMake variables + # if you fancy a try, take a look at + # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling + install_name_tool -id $out/$file $file + done + make install + install -d 755 $out/include + install -m 644 ../include/*.h $out/include + '' + else '' + install -d -m 755 $out/include $out/lib + install -m 644 lib/libc++abi.a $out/lib + install -m 644 ../include/cxxabi.h $out/include + '' + stdenv.lib.optionalString enableShared '' + install -m 644 lib/libc++abi.so.1.0 $out/lib + ln -s libc++abi.so.1.0 $out/lib/libc++abi.so + ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1 + ''; + + meta = { + homepage = "https://libcxxabi.llvm.org/"; + description = "A new implementation of low level support for a standard C++ library"; + license = with stdenv.lib.licenses; [ ncsa mit ]; + maintainers = with stdenv.lib.maintainers; [ vlstill ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/11/libcxxabi-no-threads.patch b/pkgs/development/compilers/llvm/11/libcxxabi-no-threads.patch new file mode 100644 index 000000000000..787f3e16500e --- /dev/null +++ b/pkgs/development/compilers/llvm/11/libcxxabi-no-threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4138acf..41b4763 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS) + " is also set to ON.") + endif() + add_definitions(-D_LIBCXXABI_HAS_NO_THREADS) ++ add_definitions(-D_LIBCPP_HAS_NO_THREADS) + endif() + + if (LIBCXXABI_HAS_EXTERNAL_THREAD_API) diff --git a/pkgs/development/compilers/llvm/11/libcxxabi-wasm.patch b/pkgs/development/compilers/llvm/11/libcxxabi-wasm.patch new file mode 100644 index 000000000000..4ebfe46aa813 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/libcxxabi-wasm.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake +index 15497d405e0..33f7f18193a 100644 +--- a/cmake/modules/HandleLLVMOptions.cmake ++++ b/cmake/modules/HandleLLVMOptions.cmake +@@ -127,7 +127,10 @@ else(WIN32) + set(LLVM_HAVE_LINK_VERSION_SCRIPT 1) + endif() + else(FUCHSIA OR UNIX) +- MESSAGE(SEND_ERROR "Unable to determine platform") ++ if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi") ++ else() ++ MESSAGE(SEND_ERROR "Unable to determine platform") ++ endif() + endif(FUCHSIA OR UNIX) + endif(WIN32) + diff --git a/pkgs/development/compilers/llvm/11/libunwind.nix b/pkgs/development/compilers/llvm/11/libunwind.nix new file mode 100644 index 000000000000..b13bacb36380 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/libunwind.nix @@ -0,0 +1,14 @@ +{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }: + +stdenv.mkDerivation rec { + pname = "libunwind"; + inherit version; + + src = fetch pname "09syx66idnm2pr46x2vmk0jn3iwdv0lkd04xy4zjbwmz3vn066bl"; + + nativeBuildInputs = [ cmake ]; + + enableParallelBuilding = true; + + cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; +} diff --git a/pkgs/development/compilers/llvm/11/lld.nix b/pkgs/development/compilers/llvm/11/lld.nix new file mode 100644 index 000000000000..5d513462820e --- /dev/null +++ b/pkgs/development/compilers/llvm/11/lld.nix @@ -0,0 +1,33 @@ +{ stdenv +, fetch +, cmake +, libxml2 +, llvm +, version +}: + +stdenv.mkDerivation rec { + pname = "lld"; + inherit version; + + src = fetch pname "0ynzi35r4fckvp6842alpd43qr810j3728yfslc66fk2mbh4j52r"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ llvm libxml2 ]; + + outputs = [ "out" "dev" ]; + + enableParallelBuilding = true; + + postInstall = '' + moveToOutput include "$dev" + moveToOutput lib "$dev" + ''; + + meta = { + description = "The LLVM Linker"; + homepage = "https://lld.llvm.org/"; + license = stdenv.lib.licenses.ncsa; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/11/lldb-procfs.patch b/pkgs/development/compilers/llvm/11/lldb-procfs.patch new file mode 100644 index 000000000000..b075dbaeee0a --- /dev/null +++ b/pkgs/development/compilers/llvm/11/lldb-procfs.patch @@ -0,0 +1,31 @@ +--- a/source/Plugins/Process/Linux/Procfs.h ++++ b/source/Plugins/Process/Linux/Procfs.h +@@ -11,21 +11,12 @@ + // sys/procfs.h on Android/Linux for all supported architectures. + + #include ++#include + +-#ifdef __ANDROID__ +-#if defined(__arm64__) || defined(__aarch64__) +-typedef unsigned long elf_greg_t; +-typedef elf_greg_t +- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; +-typedef struct user_fpsimd_state elf_fpregset_t; +-#ifndef NT_FPREGSET +-#define NT_FPREGSET NT_PRFPREG +-#endif // NT_FPREGSET +-#elif defined(__mips__) +-#ifndef NT_FPREGSET +-#define NT_FPREGSET NT_PRFPREG +-#endif // NT_FPREGSET +-#endif +-#else // __ANDROID__ ++#if !defined(__GLIBC__) && defined(__powerpc__) ++#define pt_regs musl_pt_regs ++#include ++#undef pt_regs ++#else + #include +-#endif // __ANDROID__ ++#endif diff --git a/pkgs/development/compilers/llvm/11/lldb.nix b/pkgs/development/compilers/llvm/11/lldb.nix new file mode 100644 index 000000000000..47215caa53e3 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/lldb.nix @@ -0,0 +1,101 @@ +{ stdenv +, fetch +, cmake +, zlib +, ncurses +, swig +, which +, libedit +, libxml2 +, llvm +, clang-unwrapped +, python3 +, version +, darwin +, lit +, enableManpages ? false +}: + +stdenv.mkDerivation (rec { + pname = "lldb"; + inherit version; + + src = fetch pname "051p5b04y6z3g730rmc2n2v71lipbw7k69riww3a6sl74myfiaq7"; + + patches = [ ./lldb-procfs.patch ]; + + nativeBuildInputs = [ cmake python3 which swig lit ] + ++ stdenv.lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; + + buildInputs = [ + ncurses + zlib + libedit + libxml2 + llvm + ] + ++ stdenv.lib.optionals stdenv.isDarwin [ + darwin.libobjc + darwin.apple_sdk.libs.xpc + darwin.apple_sdk.frameworks.Foundation + darwin.bootstrap_cmds + darwin.apple_sdk.frameworks.Carbon + darwin.apple_sdk.frameworks.Cocoa + ]; + + CXXFLAGS = "-fno-rtti"; + hardeningDisable = [ "format" ]; + + cmakeFlags = [ + "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic + "-DClang_DIR=${clang-unwrapped}/lib/cmake" + "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON" + ] ++ stdenv.lib.optionals enableManpages [ + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + ] +; + + enableParallelBuilding = true; + + postInstall = '' + # Editor support + # vscode: + install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json + mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin + ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin + ''; + + meta = with stdenv.lib; { + description = "A next-generation high-performance debugger"; + homepage = "https://lldb.llvm.org"; + license = licenses.ncsa; + platforms = platforms.all; + }; +} // stdenv.lib.optionalAttrs enableManpages { + pname = "lldb-manpages"; + + buildPhase = '' + make docs-lldb-man + ''; + + propagatedBuildInputs = []; + + installPhase = '' + # manually install lldb man page + mkdir -p $out/share/man/man1 + install docs/man/lldb.1 -t $out/share/man/man1/ + ''; + + postPatch = null; + postInstall = null; + + outputs = [ "out" ]; + + doCheck = false; + + meta.description = "man pages for LLDB ${version}"; +}) diff --git a/pkgs/development/compilers/llvm/11/llvm-outputs.patch b/pkgs/development/compilers/llvm/11/llvm-outputs.patch new file mode 100644 index 000000000000..40096fa3497f --- /dev/null +++ b/pkgs/development/compilers/llvm/11/llvm-outputs.patch @@ -0,0 +1,26 @@ +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 94d426b..37f7794 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -333,6 +333,21 @@ int main(int argc, char **argv) { + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + ++ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared ++ if (!IsInDevelopmentTree) { ++ bool WantShared = true; ++ for (int i = 1; i < argc; ++i) { ++ StringRef Arg = argv[i]; ++ if (Arg == "--link-shared") ++ WantShared = true; ++ else if (Arg == "--link-static") ++ WantShared = false; // the last one wins ++ } ++ ++ if (WantShared) ++ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX; ++ } ++ + /// We only use `shared library` mode in cases where the static library form + /// of the components provided are not available; note however that this is + /// skipped if we're run from within the build dir. However, once installed, diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix new file mode 100644 index 000000000000..7394d4033d21 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/llvm.nix @@ -0,0 +1,188 @@ +{ stdenv +, fetch +, cmake +, python3 +, libffi +, libbfd +, libpfm +, libxml2 +, ncurses +, version +, release_version +, zlib +, buildPackages +, debugVersion ? false +, enableManpages ? false +, enableSharedLibraries ? true +, enablePFM ? !(stdenv.isDarwin + || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 + || stdenv.isAarch32 # broken for the armv7l builder +) +, enablePolly ? true +}: + +let + inherit (stdenv.lib) optional optionals optionalString; + + # Used when creating a version-suffixed symlink of libLLVM.dylib + shortVersion = with stdenv.lib; + concatStringsSep "." (take 1 (splitString "." release_version)); + +in stdenv.mkDerivation (rec { + pname = "llvm"; + inherit version; + + src = fetch pname "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"; + polly_src = fetch "polly" "0nm2d8niz47yjsa3r17v3p13b70igkd338ib8191znr1dfw0pyyj"; + + unpackPhase = '' + unpackFile $src + mv llvm-${version}* llvm + sourceRoot=$PWD/llvm + '' + optionalString enablePolly '' + unpackFile $polly_src + mv polly-* $sourceRoot/tools/polly + ''; + + outputs = [ "out" "python" ] + ++ optional enableSharedLibraries "lib"; + + nativeBuildInputs = [ cmake python3 ] + ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; + + buildInputs = [ libxml2 libffi ] + ++ optional enablePFM libpfm; # exegesis + + propagatedBuildInputs = [ ncurses zlib ]; + + postPatch = optionalString stdenv.isDarwin '' + substituteInPlace cmake/modules/AddLLVM.cmake \ + --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ + --replace 'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" + '' + # Patch llvm-config to return correct library path based on --link-{shared,static}. + + optionalString (enableSharedLibraries) '' + substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib + patch -p1 < ./llvm-outputs.patch + '' + '' + # FileSystem permissions tests fail with various special bits + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "Path.cpp" "" + rm unittests/Support/Path.cpp + '' + optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -i ${../TLI-musl.patch} + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "add_subdirectory(DynamicLibrary)" "" + rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp + # valgrind unhappy with musl or glibc, but fails w/musl only + rm test/CodeGen/AArch64/wineh4.mir + '' + optionalString stdenv.hostPlatform.isAarch32 '' + # skip failing X86 test cases on 32-bit ARM + rm test/DebugInfo/X86/convert-debugloc.ll + rm test/DebugInfo/X86/convert-inlined.ll + rm test/DebugInfo/X86/convert-linked.ll + rm test/DebugInfo/X86/debug_addr.ll + rm test/tools/dsymutil/X86/op-convert.test + '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' + # Seems to require certain floating point hardware (NEON?) + rm test/ExecutionEngine/frem.ll + '' + '' + patchShebangs test/BugPoint/compile-custom.ll.py + ''; + + # hacky fix: created binaries need to be run before installation + preBuild = '' + mkdir -p $out/ + ln -sv $PWD/lib $out + ''; + + cmakeFlags = with stdenv; [ + "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" + "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc + "-DLLVM_BUILD_TESTS=ON" + "-DLLVM_ENABLE_FFI=ON" + "-DLLVM_ENABLE_RTTI=ON" + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_ENABLE_DUMP=ON" + ] ++ optionals enableSharedLibraries [ + "-DLLVM_LINK_LLVM_DYLIB=ON" + ] ++ optionals enableManpages [ + "-DLLVM_BUILD_DOCS=ON" + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" + ] ++ optionals (!isDarwin) [ + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" + ] ++ optionals isDarwin [ + "-DLLVM_ENABLE_LIBCXX=ON" + "-DCAN_TARGET_i386=false" + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DCMAKE_CROSSCOMPILING=True" + "-DLLVM_TABLEGEN=${buildPackages.llvm_10}/bin/llvm-tblgen" + ]; + + postBuild = '' + rm -fR $out + ''; + + preCheck = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib + ''; + + postInstall = '' + mkdir -p $python/share + mv $out/share/opt-viewer $python/share/opt-viewer + '' + + optionalString enableSharedLibraries '' + moveToOutput "lib/libLLVM-*" "$lib" + moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib" + '' + + optionalString (enableSharedLibraries && (!stdenv.isDarwin)) '' + substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ + --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-" + '' + + 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 + ''; + + doCheck = stdenv.isLinux && (!stdenv.isx86_32); + + checkTarget = "check-all"; + + enableParallelBuilding = true; + + requiredSystemFeatures = [ "big-parallel" ]; + meta = { + description = "Collection of modular and reusable compiler and toolchain technologies"; + homepage = "https://llvm.org/"; + license = stdenv.lib.licenses.ncsa; + maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ]; + platforms = stdenv.lib.platforms.all; + }; +} // stdenv.lib.optionalAttrs enableManpages { + pname = "llvm-manpages"; + + buildPhase = '' + make docs-llvm-man + ''; + + propagatedBuildInputs = []; + + installPhase = '' + make -C docs install + ''; + + postPatch = null; + postInstall = null; + + outputs = [ "out" ]; + + doCheck = false; + + meta.description = "man pages for LLVM ${version}"; +}) diff --git a/pkgs/development/compilers/llvm/11/openmp.nix b/pkgs/development/compilers/llvm/11/openmp.nix new file mode 100644 index 000000000000..0927448d2b49 --- /dev/null +++ b/pkgs/development/compilers/llvm/11/openmp.nix @@ -0,0 +1,26 @@ +{ stdenv +, fetch +, cmake +, llvm +, perl +, version +}: + +stdenv.mkDerivation rec { + pname = "openmp"; + inherit version; + + src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ llvm ]; + + enableParallelBuilding = true; + + meta = { + description = "Components required to build an executable OpenMP program"; + homepage = "https://openmp.llvm.org/"; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/11/sanitizers-nongnu.patch b/pkgs/development/compilers/llvm/11/sanitizers-nongnu.patch new file mode 100644 index 000000000000..1f2ac97818eb --- /dev/null +++ b/pkgs/development/compilers/llvm/11/sanitizers-nongnu.patch @@ -0,0 +1,412 @@ +From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001 +From: Will Dietz +Date: Mon, 24 Sep 2018 11:17:25 -0500 +Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project. + +------ +Ported to compiler-rt-sanitizers-5.0.0. Taken from + +https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch +Signed-off-by: Jory A. Pratt + +Taken from gentoo-musl project, with a few additional minor fixes. +--- + lib/asan/asan_linux.cc | 4 +- + lib/interception/interception_linux.cc | 2 +- + lib/interception/interception_linux.h | 2 +- + lib/msan/msan_linux.cc | 2 +- + lib/sanitizer_common/sanitizer_allocator.cc | 2 +- + .../sanitizer_common_interceptors_ioctl.inc | 4 +- + .../sanitizer_common_syscalls.inc | 2 +- + lib/sanitizer_common/sanitizer_linux.cc | 8 +++- + .../sanitizer_linux_libcdep.cc | 10 ++--- + lib/sanitizer_common/sanitizer_platform.h | 6 +++ + .../sanitizer_platform_interceptors.h | 4 +- + .../sanitizer_platform_limits_posix.cc | 37 +++++++++++-------- + lib/tsan/rtl/tsan_platform_linux.cc | 2 +- + 13 files changed, 51 insertions(+), 34 deletions(-) + +diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc +index 625f32d40..73cf77aca 100644 +--- a/lib/asan/asan_linux.cc ++++ b/lib/asan/asan_linux.cc +@@ -46,7 +46,7 @@ + #include + #endif + +-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS ++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU + #include + extern "C" void* _DYNAMIC; + #elif SANITIZER_NETBSD +@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { + UNIMPLEMENTED(); + } + +-#if SANITIZER_ANDROID ++#if SANITIZER_ANDROID || SANITIZER_NONGNU + // FIXME: should we do anything for Android? + void AsanCheckDynamicRTPrereqs() {} + void AsanCheckIncompatibleRT() {} +diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc +index 26bfcd8f6..529b234f7 100644 +--- a/lib/interception/interception_linux.cc ++++ b/lib/interception/interception_linux.cc +@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, + } + + // Android and Solaris do not have dlvsym +-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD ++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + void *GetFuncAddrVer(const char *func_name, const char *ver) { + return dlvsym(RTLD_NEXT, func_name, ver); + } +diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h +index 942c25609..24a4d5080 100644 +--- a/lib/interception/interception_linux.h ++++ b/lib/interception/interception_linux.h +@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver); + (::__interception::uptr) & WRAP(func)) + + // Android, Solaris and OpenBSD do not have dlvsym +-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD ++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \ + (::__interception::real_##func = (func##_f)( \ + unsigned long)::__interception::GetFuncAddrVer(#func, symver)) +diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc +index 385a650c4..6e30a8ce9 100644 +--- a/lib/msan/msan_linux.cc ++++ b/lib/msan/msan_linux.cc +@@ -13,7 +13,7 @@ + //===----------------------------------------------------------------------===// + + #include "sanitizer_common/sanitizer_platform.h" +-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD ++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD + + #include "msan.h" + #include "msan_report.h" +diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc +index 6bfd5e5ee..048f6154f 100644 +--- a/lib/sanitizer_common/sanitizer_allocator.cc ++++ b/lib/sanitizer_common/sanitizer_allocator.cc +@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator"; + + // ThreadSanitizer for Go uses libc malloc/free. + #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC) +-# if SANITIZER_LINUX && !SANITIZER_ANDROID ++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + extern "C" void *__libc_malloc(uptr size); + # if !SANITIZER_GO + extern "C" void *__libc_memalign(uptr alignment, uptr size); +diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 2d633c173..b6eb23116 100644 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -104,7 +104,7 @@ static void ioctl_table_fill() { + _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); + #endif + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + // Conflicting request ids. + // _(CDROMAUDIOBUFSIZ, NONE, 0); + // _(SNDCTL_TMR_CONTINUE, NONE, 0); +@@ -365,7 +365,7 @@ static void ioctl_table_fill() { + _(VT_WAITACTIVE, NONE, 0); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE + _(CYGETDEFTHRESH, WRITE, sizeof(int)); + _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc +index 469c8eb7e..24f87867d 100644 +--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc ++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc +@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { + } + } + +-#if !SANITIZER_ANDROID ++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU + PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, + void *old_rlim) { + if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); +diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc +index 96d6c1eff..9e2b7fb9d 100644 +--- a/lib/sanitizer_common/sanitizer_linux.cc ++++ b/lib/sanitizer_common/sanitizer_linux.cc +@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) { + #endif + } + +-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD ++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU + extern "C" { + SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end; + } + #endif + +-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \ ++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \ + !SANITIZER_OPENBSD + static void ReadNullSepFileToArray(const char *path, char ***arr, + int arr_size) { +@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) { + #elif SANITIZER_NETBSD + *argv = __ps_strings->ps_argvstr; + *envp = __ps_strings->ps_envstr; ++#elif SANITIZER_NONGNU ++ static const int kMaxArgv = 2000, kMaxEnvp = 2000; ++ ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv); ++ ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp); + #else // SANITIZER_FREEBSD + #if !SANITIZER_GO + if (&__libc_stack_end) { +diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc +index 4962ff832..438f94dbe 100644 +--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc ++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc +@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor, + } + + #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && \ +- !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS ++ !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU + static uptr g_tls_size; + + #ifdef __i386__ +@@ -261,7 +261,7 @@ void InitTlsSize() { } + #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) || \ + defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) || \ + defined(__arm__)) && \ +- SANITIZER_LINUX && !SANITIZER_ANDROID ++ SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // sizeof(struct pthread) from glibc. + static atomic_uintptr_t thread_descriptor_size; + +@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) { + + #if !SANITIZER_GO + static void GetTls(uptr *addr, uptr *size) { +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + # if defined(__x86_64__) || defined(__i386__) || defined(__s390__) + *addr = ThreadSelf(); + *size = GetTlsSize(); +@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) { + #elif SANITIZER_OPENBSD + *addr = 0; + *size = 0; +-#elif SANITIZER_ANDROID ++#elif SANITIZER_ANDROID || SANITIZER_NONGNU + *addr = 0; + *size = 0; + #elif SANITIZER_SOLARIS +@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) { + #if !SANITIZER_GO + uptr GetTlsSize() { + #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD || \ +- SANITIZER_OPENBSD || SANITIZER_SOLARIS ++ SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU + uptr addr, size; + GetTls(&addr, &size); + return size; +diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h +index d81e25580..e10680ac8 100644 +--- a/lib/sanitizer_common/sanitizer_platform.h ++++ b/lib/sanitizer_common/sanitizer_platform.h +@@ -208,6 +208,12 @@ + # define SANITIZER_SOLARIS32 0 + #endif + ++#if defined(__linux__) && !defined(__GLIBC__) ++# define SANITIZER_NONGNU 1 ++#else ++# define SANITIZER_NONGNU 0 ++#endif ++ + #if defined(__myriad2__) + # define SANITIZER_MYRIAD2 1 + #else +diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h +index f95539a73..6c53b3415 100644 +--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h ++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h +@@ -39,7 +39,7 @@ + # include "sanitizer_platform_limits_solaris.h" + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + # define SI_LINUX_NOT_ANDROID 1 + #else + # define SI_LINUX_NOT_ANDROID 0 +@@ -322,7 +322,7 @@ + #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID) + #define SANITIZER_INTERCEPT_SHMCTL \ + (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \ +- ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \ ++ ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \ + SANITIZER_WORDSIZE == 64)) // NOLINT + #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID + #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index 54da635d7..2f6ff69c3 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -14,6 +14,9 @@ + + #include "sanitizer_platform.h" + ++// Workaround musl <--> linux conflicting definition of 'struct sysinfo' ++#define _LINUX_SYSINFO_H ++ + #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC + // Tests in this file assume that off_t-dependent data structures match the + // libc ABI. For example, struct dirent here is what readdir() function (as +@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t; + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + #include +-#include ++# if !SANITIZER_NONGNU ++# include ++# endif + #include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + #if HAVE_RPC_XDR_H + # include + #elif HAVE_TIRPC_RPC_XDR_H +@@ -251,7 +256,7 @@ namespace __sanitizer { + unsigned struct_itimerspec_sz = sizeof(struct itimerspec); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. + #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ +@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); + unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + int glob_nomatch = GLOB_NOMATCH; + int glob_altdirfunc = GLOB_ALTDIRFUNC; + #endif +@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned struct_termios_sz = sizeof(struct termios); + unsigned struct_winsize_sz = sizeof(struct winsize); + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + unsigned struct_arpreq_sz = sizeof(struct arpreq); + unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); + unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); +@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned struct_vt_mode_sz = sizeof(struct vt_mode); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); + unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) +@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; + unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; + unsigned IOCTL_CYGETMON = CYGETMON; +@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); + CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + CHECK_TYPE_SIZE(glob_t); + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); +@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec); + CHECK_SIZE_AND_OFFSET(iovec, iov_base); + CHECK_SIZE_AND_OFFSET(iovec, iov_len); + ++#if !SANITIZER_NONGNU + CHECK_TYPE_SIZE(msghdr); + CHECK_SIZE_AND_OFFSET(msghdr, msg_name); + CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); +@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); ++#endif + + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 +@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); + + CHECK_TYPE_SIZE(ether_addr); + +-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID ++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU + CHECK_TYPE_SIZE(ipc_perm); + # if SANITIZER_FREEBSD + CHECK_SIZE_AND_OFFSET(ipc_perm, key); +@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); + CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); + #endif + +-#if SANITIZER_LINUX ++#if SANITIZER_LINUX && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); + #endif + +@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); + COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); + CHECK_SIZE_AND_OFFSET(FILE, _flags); + CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); +@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); + CHECK_SIZE_AND_OFFSET(FILE, _fileno); + #endif + +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); + CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); + CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); +diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc +index de989b780..51a97b554 100644 +--- a/lib/tsan/rtl/tsan_platform_linux.cc ++++ b/lib/tsan/rtl/tsan_platform_linux.cc +@@ -294,7 +294,7 @@ void InitializePlatform() { + // This is required to properly "close" the fds, because we do not see internal + // closes within glibc. The code is a pure hack. + int ExtractResolvFDs(void *state, int *fds, int nfd) { +-#if SANITIZER_LINUX && !SANITIZER_ANDROID ++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU + int cnt = 0; + struct __res_state *statp = (struct __res_state*)state; + for (int i = 0; i < MAXNS && cnt < nfd; i++) { +-- +2.19.0 + From 0a8334d5a0097d7235edfc12ff216cce87aa5a2c Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Tue, 25 Aug 2020 19:32:46 +0200 Subject: [PATCH 27/57] llvm_11: init at 11.0.0rc1 http://lists.llvm.org/pipermail/release-testers/2020-July/001305.html TODO: Enable Polly. Co-authored-by: conferno --- .../llvm/11/clang/compiler-rt-baremetal.patch | 53 ---------------- .../compilers/llvm/11/clang/default.nix | 6 +- .../compilers/llvm/11/clang/purity.patch | 8 +-- .../compilers/llvm/11/compiler-rt.nix | 3 +- .../development/compilers/llvm/11/default.nix | 19 +++--- .../llvm/11/find-darwin-sdk-version.patch | 62 ------------------- .../compilers/llvm/11/libc++/default.nix | 2 +- .../compilers/llvm/11/libc++abi.nix | 2 +- .../compilers/llvm/11/libunwind.nix | 2 +- pkgs/development/compilers/llvm/11/lld.nix | 2 +- pkgs/development/compilers/llvm/11/lldb.nix | 2 +- pkgs/development/compilers/llvm/11/llvm.nix | 7 +-- pkgs/development/compilers/llvm/11/openmp.nix | 2 +- pkgs/top-level/all-packages.nix | 12 ++++ 14 files changed, 37 insertions(+), 145 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch delete mode 100644 pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch diff --git a/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch b/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch deleted file mode 100644 index a4a0f21b0fcd..000000000000 --- a/pkgs/development/compilers/llvm/11/clang/compiler-rt-baremetal.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: lib/Driver/ToolChains/BareMetal.cpp -=================================================================== ---- a/lib/Driver/ToolChains/BareMetal.cpp -+++ b/lib/Driver/ToolChains/BareMetal.cpp -@@ -157,7 +157,7 @@ - void BareMetal::AddLinkRuntimeLib(const ArgList &Args, - ArgStringList &CmdArgs) const { - CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" + -- getTriple().getArchName() + ".a")); -+ getTriple().getArchName())); - } - - void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, -Index: test/Driver/baremetal.cpp -=================================================================== ---- a/test/Driver/baremetal.cpp -+++ b/test/Driver/baremetal.cpp -@@ -13,7 +13,7 @@ - // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" - // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal" - // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for" --// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" -+// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" - // CHECK-V6M-C-SAME: "-o" "{{.*}}.o" - - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -@@ -35,7 +35,7 @@ - // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" - // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" - // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind" --// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" -+// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" - // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o" - - // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -@@ -48,7 +48,7 @@ - // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" - // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" - // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind" --// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" -+// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" - // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o" - - // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -@@ -61,7 +61,7 @@ - // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" - // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" - // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind" --// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a" -+// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m" - // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o" - - // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \ diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index a3d6e7e402ab..90cf830ead88 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -8,7 +8,7 @@ let pname = "clang"; inherit version; - src = fetch "clang" "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"; + src = fetch "clang" "0jfgxn0xck73zgv3kral27ccynchfwiqg6b4r1r39wzfzm8drb0f"; unpackPhase = '' unpackFile $src @@ -27,7 +27,6 @@ let cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++14" "-DCLANGD_BUILD_XPC=OFF" - "-DLLVM_ENABLE_RTTI=ON" ] ++ stdenv.lib.optionals enableManpages [ "-DCLANG_INCLUDE_DOCS=ON" "-DLLVM_ENABLE_SPHINX=ON" @@ -39,7 +38,6 @@ let patches = [ ./purity.patch # https://reviews.llvm.org/D51899 - ./compiler-rt-baremetal.patch ]; postPatch = '' @@ -87,6 +85,8 @@ let passthru = { isClang = true; inherit llvm; + } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { + gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/11/clang/purity.patch b/pkgs/development/compilers/llvm/11/clang/purity.patch index a6729a9b004e..deb230a36c5b 100644 --- a/pkgs/development/compilers/llvm/11/clang/purity.patch +++ b/pkgs/development/compilers/llvm/11/clang/purity.patch @@ -11,20 +11,18 @@ diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp index fe3c0191bb..c6a482bece 100644 --- a/lib/Driver/ToolChains/Gnu.cpp +++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, +@@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!IsStatic) { if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); - - if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) { -- const std::string Loader = -- D.DyldPrefix + ToolChain.getDynamicLinker(Args); - CmdArgs.push_back("-dynamic-linker"); -- CmdArgs.push_back(Args.MakeArgString(Loader)); +- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + +- ToolChain.getDynamicLinker(Args))); - } } CmdArgs.push_back("-o"); -- 2.11.0 - diff --git a/pkgs/development/compilers/llvm/11/compiler-rt.nix b/pkgs/development/compilers/llvm/11/compiler-rt.nix index 47bbe808ac20..a5ae6fd66023 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt.nix @@ -11,7 +11,7 @@ in stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; - src = fetch pname "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"; + src = fetch pname "050p46f37cz4a8rzhjnq3lyfvii2790spkcrr3b79yrcwzbym1n6"; nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; @@ -47,7 +47,6 @@ stdenv.mkDerivation rec { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - ./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15 ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch; diff --git a/pkgs/development/compilers/llvm/11/default.nix b/pkgs/development/compilers/llvm/11/default.nix index 37ab89a5a315..c24dfdbe12df 100644 --- a/pkgs/development/compilers/llvm/11/default.nix +++ b/pkgs/development/compilers/llvm/11/default.nix @@ -1,21 +1,21 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs +{ lowPrio, newScope, pkgs, stdenv, cmake , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith -, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: let - release_version = "10.0.1"; - version = release_version; # differentiating these (variables) is important for RCs + release_version = "11.0.0"; + candidate = "rc1"; + version = "${release_version}${candidate}"; # differentiating these (variables) is important for RCs targetConfig = stdenv.targetPlatform.config; fetch = name: sha256: fetchurl { - url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz"; + url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}-${candidate}/${name}-${version}.src.tar.xz"; inherit sha256; }; - clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh"; + clang-tools-extra_src = fetch "clang-tools-extra" "1ja4mdal3ixjhiwwyw7yb1a1abw783drqq0135k9lig1gbfc67q0"; tools = stdenv.lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); @@ -25,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags ''; in { @@ -60,8 +60,7 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. - libcxx = null; + libcxx = null; # libstdcxx is smuggled in with clang.gcc extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch b/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch deleted file mode 100644 index fc16ddda76b7..000000000000 --- a/pkgs/development/compilers/llvm/11/find-darwin-sdk-version.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- a/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:13:55.000000000 +0100 -+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake 2020-01-25 23:19:37.000000000 +0100 -@@ -43,41 +43,6 @@ - set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE) - endfunction() - --function(find_darwin_sdk_version var sdk_name) -- # We deliberately don't cache the result here because -- # CMake's caching causes too many problems. -- set(result_process 1) -- if(NOT DARWIN_PREFER_PUBLIC_SDK) -- # Let's first try the internal SDK, otherwise use the public SDK. -- execute_process( -- COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version -- RESULT_VARIABLE result_process -- OUTPUT_VARIABLE var_internal -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ERROR_FILE /dev/null -- ) -- endif() -- if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}") -- execute_process( -- COMMAND xcrun --sdk ${sdk_name} --show-sdk-version -- RESULT_VARIABLE result_process -- OUTPUT_VARIABLE var_internal -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ERROR_FILE /dev/null -- ) -- endif() -- if(NOT result_process EQUAL 0) -- message(FATAL_ERROR -- "Failed to determine SDK version for \"${sdk_name}\" SDK") -- endif() -- # Check reported version looks sane. -- if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$") -- message(FATAL_ERROR -- "Reported SDK version \"${var_internal}\" does not look like a version") -- endif() -- set(${var} ${var_internal} PARENT_SCOPE) --endfunction() -- - # There isn't a clear mapping of what architectures are supported with a given - # target platform, but ld's version output does list the architectures it can - # link for. -@@ -119,17 +84,6 @@ - foreach(flag ${DARWIN_${os}_LINK_FLAGS}) - set(os_linker_flags "${os_linker_flags} ${flag}") - endforeach() -- -- # Disable building for i386 for macOS SDK >= 10.15. The SDK doesn't support -- # linking for i386 and the corresponding OS doesn't allow running macOS i386 -- # binaries. -- if ("${os}" STREQUAL "osx") -- find_darwin_sdk_version(macosx_sdk_version "macosx") -- if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15) -- message(STATUS "Disabling i386 slice for ${valid_archs}") -- list(REMOVE_ITEM archs "i386") -- endif() -- endif() - endif() - - # The simple program will build for x86_64h on the simulator because it is diff --git a/pkgs/development/compilers/llvm/11/libc++/default.nix b/pkgs/development/compilers/llvm/11/libc++/default.nix index 651f1887553d..dae5d86257e7 100644 --- a/pkgs/development/compilers/llvm/11/libc++/default.nix +++ b/pkgs/development/compilers/llvm/11/libc++/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++"; inherit version; - src = fetch "libcxx" "0v78bfr6h2zifvdqnj2wlfk4pvxzrqn3hg1v6lqk3y12bx9p9xny"; + src = fetch "libcxx" "0rxqix45gwwfc98gfrx3jbhhp24la3i47lagqv0g0lg7sdw8vmn4"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/11/libc++abi.nix b/pkgs/development/compilers/llvm/11/libc++abi.nix index 00371b862adb..39b8ba029764 100644 --- a/pkgs/development/compilers/llvm/11/libc++abi.nix +++ b/pkgs/development/compilers/llvm/11/libc++abi.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++abi"; inherit version; - src = fetch "libcxxabi" "0yqs722y76cwvmfsq0lb917r9m3fci7bf5z3yzl71yz9n88ghzm9"; + src = fetch "libcxxabi" "1hz19nmxi3kjz5fjf51v80aji7r609ckjzw759yxwjrwkxx48lhx"; nativeBuildInputs = [ cmake ]; buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; diff --git a/pkgs/development/compilers/llvm/11/libunwind.nix b/pkgs/development/compilers/llvm/11/libunwind.nix index b13bacb36380..ad8320413e67 100644 --- a/pkgs/development/compilers/llvm/11/libunwind.nix +++ b/pkgs/development/compilers/llvm/11/libunwind.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "libunwind"; inherit version; - src = fetch pname "09syx66idnm2pr46x2vmk0jn3iwdv0lkd04xy4zjbwmz3vn066bl"; + src = fetch pname "0qras7ls393pc8zmm4qkpw0vkarkf5i5281s9pfbnc90dmnv4x69"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/compilers/llvm/11/lld.nix b/pkgs/development/compilers/llvm/11/lld.nix index 5d513462820e..eb3404abbeaf 100644 --- a/pkgs/development/compilers/llvm/11/lld.nix +++ b/pkgs/development/compilers/llvm/11/lld.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "lld"; inherit version; - src = fetch pname "0ynzi35r4fckvp6842alpd43qr810j3728yfslc66fk2mbh4j52r"; + src = fetch pname "0g5w88mpa0ppfajxdpbqi5dzrxw6c22hzjmljv0kn93kmiwdrjcy"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/11/lldb.nix b/pkgs/development/compilers/llvm/11/lldb.nix index 47215caa53e3..37324a20defd 100644 --- a/pkgs/development/compilers/llvm/11/lldb.nix +++ b/pkgs/development/compilers/llvm/11/lldb.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (rec { pname = "lldb"; inherit version; - src = fetch pname "051p5b04y6z3g730rmc2n2v71lipbw7k69riww3a6sl74myfiaq7"; + src = fetch pname "1vzbfb356psrcczx9a5g29pic4qr6vmbdbrsyaakl6q2ax0prkvh"; patches = [ ./lldb-procfs.patch ]; diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix index 7394d4033d21..f24c9f31cc33 100644 --- a/pkgs/development/compilers/llvm/11/llvm.nix +++ b/pkgs/development/compilers/llvm/11/llvm.nix @@ -18,7 +18,7 @@ || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 || stdenv.isAarch32 # broken for the armv7l builder ) -, enablePolly ? true +, enablePolly ? false }: let @@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec { pname = "llvm"; inherit version; - src = fetch pname "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"; - polly_src = fetch "polly" "0nm2d8niz47yjsa3r17v3p13b70igkd338ib8191znr1dfw0pyyj"; + src = fetch pname "11nym1bycy2ynr3z9frifbhqf82jjby2jk4xni6kx9zdqxjfz7q3"; + polly_src = fetch "polly" "1zq14njfmxgyncy8lwwm72l4338m3q3hwl5gnl4732cc1daaxvyh"; unpackPhase = '' unpackFile $src @@ -81,7 +81,6 @@ in stdenv.mkDerivation (rec { rm test/DebugInfo/X86/convert-debugloc.ll rm test/DebugInfo/X86/convert-inlined.ll rm test/DebugInfo/X86/convert-linked.ll - rm test/DebugInfo/X86/debug_addr.ll rm test/tools/dsymutil/X86/op-convert.test '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' # Seems to require certain floating point hardware (NEON?) diff --git a/pkgs/development/compilers/llvm/11/openmp.nix b/pkgs/development/compilers/llvm/11/openmp.nix index 0927448d2b49..f83bbc9904d0 100644 --- a/pkgs/development/compilers/llvm/11/openmp.nix +++ b/pkgs/development/compilers/llvm/11/openmp.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "openmp"; inherit version; - src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi"; + src = fetch pname "1qg6chhfhp0fv9k5vzmqbn14snbzwh3y6810a60mk77m4jlijnbc"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53d78398a6c2..484c612c2a9c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8373,6 +8373,7 @@ in }; }; + clang_11 = llvmPackages_11.clang; clang_10 = llvmPackages_10.clang; clang_9 = llvmPackages_9.clang; clang_8 = llvmPackages_8.clang; @@ -9187,6 +9188,7 @@ in lld_8 = llvmPackages_8.lld; lld_9 = llvmPackages_9.lld; lld_10 = llvmPackages_10.lld; + lld_11 = llvmPackages_11.lld; lldb = llvmPackages.lldb; lldb_5 = llvmPackages_5.lldb; @@ -9195,10 +9197,12 @@ in lldb_8 = llvmPackages_8.lldb; lldb_9 = llvmPackages_9.lldb; lldb_10 = llvmPackages_10.lldb; + lldb_11 = llvmPackages_11.lldb; llvm = llvmPackages.llvm; llvm-manpages = llvmPackages.llvm-manpages; + llvm_11 = llvmPackages_11.llvm; llvm_10 = llvmPackages_10.llvm; llvm_9 = llvmPackages_9.llvm; llvm_8 = llvmPackages_8.llvm; @@ -9244,6 +9248,14 @@ in targetLlvmLibraries = targetPackages.llvmPackages_10.libraries; }; + llvmPackages_11 = callPackage ../development/compilers/llvm/11 ({ + inherit (stdenvAdapters) overrideCC; + buildLlvmTools = buildPackages.llvmPackages_11.tools; + targetLlvmLibraries = targetPackages.llvmPackages_11.libraries; + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { + stdenv = gcc7Stdenv; + }); + llvmPackages_latest = llvmPackages_10; llvmPackages_rocm = callPackage ../development/compilers/llvm/rocm { }; From df267a4cca6814261e10e9e3cb87fb706519307d Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 21 Aug 2020 22:28:37 +0200 Subject: [PATCH 28/57] llvm_11: 11.0.0rc1 -> 11.0.0rc2 http://lists.llvm.org/pipermail/release-testers/2020-August/001321.html --- pkgs/development/compilers/llvm/11/clang/default.nix | 2 +- pkgs/development/compilers/llvm/11/compiler-rt.nix | 2 +- pkgs/development/compilers/llvm/11/default.nix | 4 ++-- pkgs/development/compilers/llvm/11/libc++/default.nix | 2 +- pkgs/development/compilers/llvm/11/libc++abi.nix | 2 +- pkgs/development/compilers/llvm/11/libunwind.nix | 2 +- pkgs/development/compilers/llvm/11/lld.nix | 2 +- pkgs/development/compilers/llvm/11/lldb.nix | 2 +- pkgs/development/compilers/llvm/11/llvm.nix | 4 ++-- pkgs/development/compilers/llvm/11/openmp.nix | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index 90cf830ead88..08f9339dc8e5 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -8,7 +8,7 @@ let pname = "clang"; inherit version; - src = fetch "clang" "0jfgxn0xck73zgv3kral27ccynchfwiqg6b4r1r39wzfzm8drb0f"; + src = fetch "clang" "18rv5nxk04fgk4ziix7z4s2cargdpqgvqrk3lnp3wvd6yb5g5p98"; unpackPhase = '' unpackFile $src diff --git a/pkgs/development/compilers/llvm/11/compiler-rt.nix b/pkgs/development/compilers/llvm/11/compiler-rt.nix index a5ae6fd66023..133db3659424 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt.nix @@ -11,7 +11,7 @@ in stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; - src = fetch pname "050p46f37cz4a8rzhjnq3lyfvii2790spkcrr3b79yrcwzbym1n6"; + src = fetch pname "0qfgap6acxffm01hzk38pmzq8ac3isk90531dz0qf7fd5015jvvg"; nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; diff --git a/pkgs/development/compilers/llvm/11/default.nix b/pkgs/development/compilers/llvm/11/default.nix index c24dfdbe12df..cbb3df9f687e 100644 --- a/pkgs/development/compilers/llvm/11/default.nix +++ b/pkgs/development/compilers/llvm/11/default.nix @@ -6,7 +6,7 @@ let release_version = "11.0.0"; - candidate = "rc1"; + candidate = "rc2"; version = "${release_version}${candidate}"; # differentiating these (variables) is important for RCs targetConfig = stdenv.targetPlatform.config; @@ -15,7 +15,7 @@ let inherit sha256; }; - clang-tools-extra_src = fetch "clang-tools-extra" "1ja4mdal3ixjhiwwyw7yb1a1abw783drqq0135k9lig1gbfc67q0"; + clang-tools-extra_src = fetch "clang-tools-extra" "0bg2a9nmkdbj5qfd0vvqj8bgchcx1yzmylxxgvh8y5hhj4fz13fs"; tools = stdenv.lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); diff --git a/pkgs/development/compilers/llvm/11/libc++/default.nix b/pkgs/development/compilers/llvm/11/libc++/default.nix index dae5d86257e7..a2ea7e299185 100644 --- a/pkgs/development/compilers/llvm/11/libc++/default.nix +++ b/pkgs/development/compilers/llvm/11/libc++/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++"; inherit version; - src = fetch "libcxx" "0rxqix45gwwfc98gfrx3jbhhp24la3i47lagqv0g0lg7sdw8vmn4"; + src = fetch "libcxx" "0aaci7iblfczv1jb22zjrwzxcrcx6x7klvjivmxm2zni0n2x3bd4"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/11/libc++abi.nix b/pkgs/development/compilers/llvm/11/libc++abi.nix index 39b8ba029764..bf7b3fd001d5 100644 --- a/pkgs/development/compilers/llvm/11/libc++abi.nix +++ b/pkgs/development/compilers/llvm/11/libc++abi.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "libc++abi"; inherit version; - src = fetch "libcxxabi" "1hz19nmxi3kjz5fjf51v80aji7r609ckjzw759yxwjrwkxx48lhx"; + src = fetch "libcxxabi" "04gqdzs13sw7f7a06h5zm5917d9f1k79l4rcm096grgvf0r7lnqx"; nativeBuildInputs = [ cmake ]; buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; diff --git a/pkgs/development/compilers/llvm/11/libunwind.nix b/pkgs/development/compilers/llvm/11/libunwind.nix index ad8320413e67..03b58ca8d1d3 100644 --- a/pkgs/development/compilers/llvm/11/libunwind.nix +++ b/pkgs/development/compilers/llvm/11/libunwind.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "libunwind"; inherit version; - src = fetch pname "0qras7ls393pc8zmm4qkpw0vkarkf5i5281s9pfbnc90dmnv4x69"; + src = fetch pname "1ch4a2yp821lgzxh9898f7nw2fnkrn3wh25sqg05hlks45znv30y"; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/compilers/llvm/11/lld.nix b/pkgs/development/compilers/llvm/11/lld.nix index eb3404abbeaf..74d18a444fc2 100644 --- a/pkgs/development/compilers/llvm/11/lld.nix +++ b/pkgs/development/compilers/llvm/11/lld.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "lld"; inherit version; - src = fetch pname "0g5w88mpa0ppfajxdpbqi5dzrxw6c22hzjmljv0kn93kmiwdrjcy"; + src = fetch pname "0lqz5cfids0rrl02p0qq5s18p8ikaa9r5gwa2yvj3bismdhvmar8"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/11/lldb.nix b/pkgs/development/compilers/llvm/11/lldb.nix index 37324a20defd..c0b7f267f750 100644 --- a/pkgs/development/compilers/llvm/11/lldb.nix +++ b/pkgs/development/compilers/llvm/11/lldb.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (rec { pname = "lldb"; inherit version; - src = fetch pname "1vzbfb356psrcczx9a5g29pic4qr6vmbdbrsyaakl6q2ax0prkvh"; + src = fetch pname "0hb582kvhxp3kcckz7imrihs0kszdaz09z22xfymyi4vgmcy62q3"; patches = [ ./lldb-procfs.patch ]; diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix index f24c9f31cc33..9cd0da4f4f99 100644 --- a/pkgs/development/compilers/llvm/11/llvm.nix +++ b/pkgs/development/compilers/llvm/11/llvm.nix @@ -32,8 +32,8 @@ in stdenv.mkDerivation (rec { pname = "llvm"; inherit version; - src = fetch pname "11nym1bycy2ynr3z9frifbhqf82jjby2jk4xni6kx9zdqxjfz7q3"; - polly_src = fetch "polly" "1zq14njfmxgyncy8lwwm72l4338m3q3hwl5gnl4732cc1daaxvyh"; + src = fetch pname "151c7nphn18dcw04yxyp6qdj8w19psb8nigf26djf7rhpi1fn0sh"; + polly_src = fetch "polly" "0caxfpaxhf38nam4gkb9xqlrw20v29cm8jf95ykkbngqw64rmgij"; unpackPhase = '' unpackFile $src diff --git a/pkgs/development/compilers/llvm/11/openmp.nix b/pkgs/development/compilers/llvm/11/openmp.nix index f83bbc9904d0..f4f9bbf2292f 100644 --- a/pkgs/development/compilers/llvm/11/openmp.nix +++ b/pkgs/development/compilers/llvm/11/openmp.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "openmp"; inherit version; - src = fetch pname "1qg6chhfhp0fv9k5vzmqbn14snbzwh3y6810a60mk77m4jlijnbc"; + src = fetch pname "1025dwn68iw664df831zbkxy8bxilvjkbc6mw4nhv6p5ff7dcw7f"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; From 90db9641cb072c48e2558a592b3c74f912213a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Tue, 25 Aug 2020 20:13:45 +0200 Subject: [PATCH 29/57] qt5.qtwebengine: fix build with bison-3.7 (#96295) --- .../libraries/qt-5/modules/qtwebengine.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index c0db5915b947..40b2d6837c53 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -15,7 +15,7 @@ , gn , cups, darwin, openbsm, runCommand, xcbuild, writeScriptBin , ffmpeg_3 ? null -, lib, stdenv +, lib, stdenv, fetchpatch }: with stdenv.lib; @@ -38,6 +38,17 @@ qtModule { # which cannot be set at the same time as -Wformat-security hardeningDisable = [ "format" ]; + patches = [ + # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 + (fetchpatch { + name = "qtwebengine-bison-3.7-build.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; + sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + ]; + postPatch = # Patch Chromium build tools '' From bd5b6cb3b7a297a34240bfc549a68e0fe5883bc4 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 18:14:02 +0000 Subject: [PATCH 30/57] iosevka-bin: 3.4.1 -> 3.4.6 --- pkgs/data/fonts/iosevka/bin.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/iosevka/bin.nix b/pkgs/data/fonts/iosevka/bin.nix index ee1bd74faf5d..0f88aa05e4cf 100644 --- a/pkgs/data/fonts/iosevka/bin.nix +++ b/pkgs/data/fonts/iosevka/bin.nix @@ -1,7 +1,7 @@ { stdenv, fetchzip }: let - version = "3.4.1"; + version = "3.4.6"; in fetchzip { name = "iosevka-bin-${version}"; @@ -12,7 +12,7 @@ in fetchzip { unzip -j $downloadedFile \*.ttc -d $out/share/fonts/truetype ''; - sha256 = "0qqzgfplib6jdn1fra7fwx25jkzlw21brj45q8gn3gxvndvqabvd"; + sha256 = "1nab49gkpxahwvvw39xcc32q425qkccr7ffmz87jbcdv71qy7pp9"; meta = with stdenv.lib; { homepage = "https://be5invis.github.io/Iosevka/"; From 28945790d05bf78ae7979d68736b657736d9370e Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Tue, 25 Aug 2020 20:26:10 +0200 Subject: [PATCH 31/57] helm: compile with gcc9 (#95862) To make using MESA libraries that are compiled with gcc9 work, refs #95806 --- pkgs/applications/audio/helm/default.nix | 25 +++++++++++++++++++++--- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/helm/default.nix b/pkgs/applications/audio/helm/default.nix index 8459967a363c..145ba68b08b1 100644 --- a/pkgs/applications/audio/helm/default.nix +++ b/pkgs/applications/audio/helm/default.nix @@ -1,5 +1,16 @@ -{ stdenv, fetchFromGitHub , xorg, freetype, alsaLib, curl, libjack2 -, lv2, pkgconfig, libGLU, libGL }: +{ stdenv +, fetchFromGitHub +, fetchpatch +, xorg +, freetype +, alsaLib +, curl +, libjack2 +, lv2 +, pkgconfig +, libGLU +, libGL +}: stdenv.mkDerivation { version = "0.9.0"; @@ -20,7 +31,15 @@ CXXFLAGS = "-DHAVE_LROUND"; - patchPhase = '' + patches = [ + # gcc9 compatibility https://github.com/mtytel/helm/pull/233 + (fetchpatch { + url = "https://github.com/mtytel/helm/commit/cb611a80bd5a36d31bfc31212ebbf79aa86c6f08.patch"; + sha256 = "1i2289srcfz17c3zzab6f51aznzdj62kk53l4afr32bkjh9s4ixk"; + }) + ]; + + prePatch = '' sed -i 's|usr/||g' Makefile ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da8cc3b2dd42..0ee91ac59ab3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26493,9 +26493,7 @@ in hatari = callPackage ../misc/emulators/hatari { }; - helm = callPackage ../applications/audio/helm { - stdenv = gcc8Stdenv; - }; + helm = callPackage ../applications/audio/helm { }; helmfile = callPackage ../applications/networking/cluster/helmfile { }; From 35d908a875fbdb00056f64e5ad37bc58395cad83 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 18:44:01 +0000 Subject: [PATCH 32/57] fio: 3.21 -> 3.22 --- pkgs/tools/system/fio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index 80789681fc47..77a85e014734 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "fio"; - version = "3.21"; + version = "3.22"; src = fetchFromGitHub { owner = "axboe"; repo = "fio"; rev = "fio-${version}"; - sha256 = "0v8bq79n2nfnrs8pw2f3a93f8k691dnfzd5qxb5srwak4y2za7hn"; + sha256 = "16p17l1xbqqkgppvwmfaywknhk4ybafnx8hm56ffd8bls9vaqw5m"; }; buildInputs = [ python zlib ] From 27b77e9a49f511d316c9f42d38a84fb6b3f9b7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Tue, 25 Aug 2020 08:49:16 +0200 Subject: [PATCH 33/57] lutris: add harfbuzz to fhsenv libpango needs harfbuff --- pkgs/applications/misc/lutris/fhsenv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/lutris/fhsenv.nix b/pkgs/applications/misc/lutris/fhsenv.nix index 6fad8b23d33e..2b656775ab5c 100644 --- a/pkgs/applications/misc/lutris/fhsenv.nix +++ b/pkgs/applications/misc/lutris/fhsenv.nix @@ -97,7 +97,7 @@ in buildFHSUserEnv { libcap libtiff libva libgphoto2 libxslt libsndfile giflib zlib glib alsaLib zziplib bash dbus keyutils zip cabextract freetype unzip coreutils readline gcc SDL SDL2 curl graphite2 gtk2 gtk3 udev ncurses wayland libglvnd - vulkan-loader xdg_utils sqlite gnutls p11-kit libbsd + vulkan-loader xdg_utils sqlite gnutls p11-kit libbsd harfbuzz # PCSX2 // TODO: "libgobject-2.0.so.0: wrong ELF class: ELFCLASS64" From 3acc2a638ab5fda810669ebd47187355c774ac3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sat, 1 Feb 2020 18:26:37 +0100 Subject: [PATCH 34/57] xcowsay: Init at 1.4 --- pkgs/games/xcowsay/default.nix | 40 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/games/xcowsay/default.nix diff --git a/pkgs/games/xcowsay/default.nix b/pkgs/games/xcowsay/default.nix new file mode 100644 index 000000000000..dd95bf1e5a16 --- /dev/null +++ b/pkgs/games/xcowsay/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchurl, makeWrapper, pkg-config +, dbus, dbus-glib, gtk3, gdk-pixbuf, librsvg +, fortune +}: + +stdenv.mkDerivation rec { + pname = "xcowsay"; + version = "1.5"; + + src = fetchurl { + url = "http://www.nickg.me.uk/files/xcowsay-${version}.tar.gz"; + sha256 = "0pyaa062z1ag26dhkm1yzp2hivnlmhlpqn5xg7mx9r1m652mm91y"; + }; + + buildInputs = [ + dbus + dbus-glib + gtk3 + gdk-pixbuf # loading cow images + librsvg # dreaming SVG images + ]; + nativeBuildInputs = [ makeWrapper pkg-config ]; + + configureFlags = [ "--enable-dbus" ]; + + postInstall = '' + for tool in xcowdream xcowsay xcowthink xcowfortune; do + wrapProgram $out/bin/$tool \ + --prefix PATH : $out/bin:${fortune}/bin + done + ''; + + meta = with stdenv.lib; { + homepage = "http://www.doof.me.uk/xcowsay"; + description = + "A program based on cowsay that displays a cute cow and message on your desktop"; + license = licenses.gpl3; + maintainers = with maintainers; [ das_j ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53d78398a6c2..f27cba535b58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25025,6 +25025,8 @@ in tk = tk-8_5; }; + xcowsay = callPackage ../games/xcowsay { }; + xjump = callPackage ../games/xjump { }; # TODO: the corresponding nix file is missing # xracer = callPackage ../games/xracer { }; From a26ffb006b8d3c2d1f3c52345783a8d043b828cd Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 25 Aug 2020 22:06:00 +0200 Subject: [PATCH 35/57] vagrant: 2.2.9 -> 2.2.10 ChangeLog: https://github.com/hashicorp/vagrant/blob/v2.2.10/CHANGELOG.md#2210-august-24-2020 Apart from the usual `gemset`-update the following patches were altered: * Deprecation fix on ruby 2.6.5: was removed since the underlying issue was fixed upstream. * 0004-Support-system-installed-plugins.patch: re-downloaded the rebased version from `salsa.debian.org`[1] where we originally obtained the patch from. * use-system-bundler-version: re-applied on top of Vagrant 2.2.10. [1] https://salsa.debian.org/ruby-team/vagrant/-/blob/9d86f222/debian/patches/0004-Support-system-installed-plugins.patch --- ...004-Support-system-installed-plugins.patch | 10 ++--- pkgs/development/tools/vagrant/default.nix | 11 +---- pkgs/development/tools/vagrant/gemset.nix | 44 ++++++++++++------- .../vagrant/use-system-bundler-version.patch | 10 ++--- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/pkgs/development/tools/vagrant/0004-Support-system-installed-plugins.patch b/pkgs/development/tools/vagrant/0004-Support-system-installed-plugins.patch index f87ff5135b3f..fa6555c594ef 100644 --- a/pkgs/development/tools/vagrant/0004-Support-system-installed-plugins.patch +++ b/pkgs/development/tools/vagrant/0004-Support-system-installed-plugins.patch @@ -1,7 +1,7 @@ From: Antonio Terceiro Date: Wed, 27 May 2015 09:36:17 -0300 Subject: Support system-installed plugins -Source: https://salsa.debian.org/ruby-team/vagrant/blob/cb672c6dc0c63f6552c5ec4d6d7d22929d353503/debian/patches/0004-Support-system-installed-plugins.patch +Source: https://salsa.debian.org/ruby-team/vagrant/-/blob/9d86f222/debian/patches/0004-Support-system-installed-plugins.patch Plugins must be installed as regular Ruby libraries, and they must contain /usr/share/vagrant-plugins/plugins.d/$PLUGINNAME.json with the @@ -22,7 +22,7 @@ following content: 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/plugin/manager.rb b/lib/vagrant/plugin/manager.rb -index 567347d..d9d76a0 100644 +index 9058e68..2772131 100644 --- a/lib/vagrant/plugin/manager.rb +++ b/lib/vagrant/plugin/manager.rb @@ -18,7 +18,7 @@ module Vagrant @@ -80,17 +80,13 @@ index c6872d4..935d431 100644 end # Add a plugin that is installed to the state file. -@@ -107,6 +123,14 @@ module Vagrant +@@ -107,6 +123,10 @@ module Vagrant f.close FileUtils.mv(f.path, @path) end + rescue Errno::EACCES + # Ignore permission denied against system-installed plugins; regular + # users are not supposed to write there. -+ raise unless @system -+ rescue Errno::EROFS -+ # Ignore read-only filesystem against system-installed plugins; regular -+ # users are not supposed to write there. + raise unless @system end diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 338e8f68d355..4e2930f97a28 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -5,9 +5,9 @@ let # NOTE: bumping the version and updating the hash is insufficient; # you must use bundix to generate a new gemset.nix in the Vagrant source. - version = "2.2.9"; + version = "2.2.10"; url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz"; - sha256 = "0fbickjjliaw3cpkh3pl9bp56b2gcqn87c5ag67amc450ah43rdq"; + sha256 = "07wlj4m79m9li3za1jkk4imdhqwpca86qz3c0h706s0w8cmv4bbj"; deps = bundlerEnv rec { name = "${pname}-${version}"; @@ -54,13 +54,6 @@ in buildRubyGem rec { ./unofficial-installation-nowarn.patch ./use-system-bundler-version.patch ./0004-Support-system-installed-plugins.patch - - # fix deprecation warning on ruby 2.6.5. - # See also https://github.com/hashicorp/vagrant/pull/11307 - (fetchpatch { - url = "https://github.com/hashicorp/vagrant/commit/d18ed567aaa5da23c9e91ab87f360e7bf6760f13.patch"; - sha256 = "0f61qj41rc3fdggmnha4jrqg4pzmfiriwpsz4fcgf7c0bx6qha7q"; - }) ]; postPatch = '' diff --git a/pkgs/development/tools/vagrant/gemset.nix b/pkgs/development/tools/vagrant/gemset.nix index 00838c6e0c55..3c22b74efed0 100644 --- a/pkgs/development/tools/vagrant/gemset.nix +++ b/pkgs/development/tools/vagrant/gemset.nix @@ -24,20 +24,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"; + sha256 = "08hd3d2lfi19cns4d6wkq51scasn17l83fgbzbjjk3dqccz4rg3j"; type = "gem"; }; - version = "3.0.0"; + version = "4.0.0"; }; concurrent-ruby = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "094387x4yasb797mv07cs3g6f08y56virc2rjcpb1k79rzaj3nhl"; + sha256 = "1vnxrbhi7cq3p4y2v9iwd10v1c7l15is4var14hwnb2jip4fyjzz"; type = "gem"; }; - version = "1.1.6"; + version = "1.1.7"; }; domain_name = { dependencies = ["unf"]; @@ -149,21 +149,21 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "10nq1xjqvkhngiygji831qx9bryjwws95r4vrnlq9142bzkg670s"; + sha256 = "153sx77p16vawrs4qpkv7qlzf9v5fks4g7xqcj1dwk40i6g7rfzk"; type = "gem"; }; - version = "1.8.3"; + version = "1.8.5"; }; listen = { - dependencies = ["rb-fsevent" "rb-inotify" "ruby_dep"]; + dependencies = ["rb-fsevent" "rb-inotify"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "01v5mrnfqm6sgm8xn2v5swxsn1wlmq7rzh2i48d4jzjsc7qvb6mx"; + sha256 = "1w923wmdi3gyiky0asqdw5dnh3gcjs2xyn82ajvjfjwh6sn0clgi"; type = "gem"; }; - version = "3.1.5"; + version = "3.2.1"; }; little-plugger = { groups = ["default"]; @@ -191,10 +191,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06j6iaj89h9jhkx1x3hlswqrfnqds8br05xb1qra69dpvbdmjcwn"; + sha256 = "0pkmhcxi8lp74bq5gz9lxrvaiv5w0745kk7s4bw2b1x07qqri0n9"; type = "gem"; }; - version = "2.2.2"; + version = "2.3.0"; + }; + mime = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0nskys7brz2bylhxiknl0z9i19w3wb1knf0h93in6mjq70jdw5cr"; + type = "gem"; + }; + version = "0.4.4"; }; mime-types = { dependencies = ["mime-types-data"]; @@ -222,10 +232,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0xy54mjf7xg41l8qrg1bqri75agdqmxap9z466fjismc1rn2jwfr"; + sha256 = "0pb1g1y3dsiahavspyzkdy39j4q377009f6ix0bh1ag4nqw43l0z"; type = "gem"; }; - version = "1.14.1"; + version = "1.15.0"; }; net-scp = { dependencies = ["net-ssh"]; @@ -244,20 +254,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "04674g4n6mryjajlcd82af8g8k95la4b1bj712dh71hw1c9vhw1y"; + sha256 = "185vsybznqgqbb4i2qnxvf1gam8lb634nqcrq7r3i2zy1g6xd8mi"; type = "gem"; }; - version = "2.1.2"; + version = "3.0.0"; }; net-ssh = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "101wd2px9lady54aqmkibvy4j62zk32w0rjz4vnigyg974fsga40"; + sha256 = "0jp3jgcn8cij407xx9ldb5h9c6jv13jc4cf6kk2idclz43ww21c9"; type = "gem"; }; - version = "5.2.0"; + version = "6.1.0"; }; netrc = { groups = ["default"]; diff --git a/pkgs/development/tools/vagrant/use-system-bundler-version.patch b/pkgs/development/tools/vagrant/use-system-bundler-version.patch index c386acf4a1c7..8262220140a6 100644 --- a/pkgs/development/tools/vagrant/use-system-bundler-version.patch +++ b/pkgs/development/tools/vagrant/use-system-bundler-version.patch @@ -1,8 +1,8 @@ -diff --git i/lib/vagrant/bundler.rb w/lib/vagrant/bundler.rb -index 301e40e37..e361ab510 100644 ---- i/lib/vagrant/bundler.rb -+++ w/lib/vagrant/bundler.rb -@@ -217,7 +217,7 @@ module Vagrant +diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb +index 336ac1e05..1bfd84c0d 100644 +--- a/lib/vagrant/bundler.rb ++++ b/lib/vagrant/bundler.rb +@@ -470,7 +470,7 @@ module Vagrant source_list = {} system_plugins = plugins.map do |plugin_name, plugin_info| plugin_name if plugin_info["system"] From 7db58b93d0d1d3ae0afba9b5aec67d9bd722b2f2 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Tue, 25 Aug 2020 22:29:22 +0200 Subject: [PATCH 36/57] nixos/tests: use ::1 instead of anycast address (#96250) According to RFC4291[1], 2001:db8:: is the anycast address for the prefix and will be answered by all routers responsible for this prefix. This means that before the iputils bump, the ping from client to isp was answered by the router and not by the ISP machine. Switching away from the anycast address fixes this issue. Credits for finding this go to @primeos. [1]: https://tools.ietf.org/html/rfc4291#section-2.6.1 Fixes #96188 --- nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix b/nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix index 99cd341eec15..99395fe3023f 100644 --- a/nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix +++ b/nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix @@ -31,7 +31,7 @@ import ./make-test-python.nix ({pkgs, ...}: { firewall.enable = false; interfaces.eth1.ipv4.addresses = lib.mkForce []; # no need for legacy IP interfaces.eth1.ipv6.addresses = lib.mkForce [ - { address = "2001:DB8::"; prefixLength = 64; } + { address = "2001:DB8::1"; prefixLength = 64; } ]; }; @@ -260,7 +260,7 @@ import ./make-test-python.nix ({pkgs, ...}: { client.wait_until_succeeds("ping -6 -c 1 FD42::1") # the global IP of the ISP router should still not be a reachable - router.fail("ping -6 -c 1 2001:DB8::") + router.fail("ping -6 -c 1 2001:DB8::1") # Once we have internal connectivity boot up the ISP isp.start() @@ -273,11 +273,11 @@ import ./make-test-python.nix ({pkgs, ...}: { # wait until the uplink interface has a good status router.wait_for_unit("network-online.target") - router.wait_until_succeeds("ping -6 -c1 2001:DB8::") + router.wait_until_succeeds("ping -6 -c1 2001:DB8::1") # shortly after that the client should have received it's global IPv6 # address and thus be able to ping the ISP - client.wait_until_succeeds("ping -6 -c1 2001:DB8::") + client.wait_until_succeeds("ping -6 -c1 2001:DB8::1") # verify that we got a globally scoped address in eth1 from the # documentation prefix From df686f82a09fd927735de6ddbf7410b8baae3141 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 21:35:31 +0000 Subject: [PATCH 37/57] flow: 0.131.0 -> 0.132.0 --- pkgs/development/tools/analysis/flow/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index 60a7499c72d4..a9ea826e2f63 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "flow"; - version = "0.131.0"; + version = "0.132.0"; src = fetchFromGitHub { owner = "facebook"; repo = "flow"; rev = "refs/tags/v${version}"; - sha256 = "13a7gfsnfyssyi3b48s0d9k34rim493rarxd2rdyxyr4ir7jnb1p"; + sha256 = "1080kf2zxhbgz1zhm54w3hqbbvwpfllapcq4pgwahfyvf6zb86d7"; }; installPhase = '' From d01dbfbc6d05a7200f5ebfd23719764eef675195 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 21:43:23 +0000 Subject: [PATCH 38/57] fluent-bit: 1.5.3 -> 1.5.4 --- pkgs/tools/misc/fluent-bit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix index 28c005b7abb4..2f49d0e57eb1 100644 --- a/pkgs/tools/misc/fluent-bit/default.nix +++ b/pkgs/tools/misc/fluent-bit/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "fluent-bit"; - version = "1.5.3"; + version = "1.5.4"; src = fetchFromGitHub { owner = "fluent"; repo = "fluent-bit"; rev = "v${version}"; - sha256 = "153c7hafmzwxa24h923irfhzaqqd8wbr2aaab6l3hjhgx5q8s5bf"; + sha256 = "0w96f86i2jlzjk2plf8jbdw4q748khbhhjkbzfb8dkq2lhc9i80h"; }; nativeBuildInputs = [ cmake flex bison ]; From 98e07165124f8f84cc6b5de7d4c9f5c2367408bb Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Sat, 18 Jul 2020 17:11:24 -0700 Subject: [PATCH 39/57] libappindicator: 12.10.0 -> 12.10.1+20.10.20200706.1 This moves libappindicator to use a different upstream source. Rather than use the 8 year old (!) version displayed on its homepage (https://launchpad.net/libappindicator), this switches us to the maintained lp:libappindicator branch, browseable over here: https://code.launchpad.net/~indicator-applet-developers/libappindicator/trunk. This includes numerous fixes, remains updated, and matches what ubuntu uses. Due to a personal preference for git over bzr, I have the package using ubuntu's git mirror of the package for the source rather than the bzr repo where I _think_ development actually takes place. This also removes the no-python patch, because per revision 292 (https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk/revision/292), that has been dropped from upstream already, so the patch is no longer needed. The primary motivation behind this change is to fix a crash with libappindicator (reported https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1867996 and in various other places). The relevant patch for that should be included in this version. --- .../libraries/libappindicator/default.nix | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/libappindicator/default.nix b/pkgs/development/libraries/libappindicator/default.nix index dc0542c21267..7a7ad22756c7 100644 --- a/pkgs/development/libraries/libappindicator/default.nix +++ b/pkgs/development/libraries/libappindicator/default.nix @@ -1,11 +1,11 @@ # TODO: Resolve the issues with the Mono bindings. -{ stdenv, fetchurl, fetchpatch, lib +{ stdenv, fetchgit, lib , pkgconfig, autoreconfHook , glib, dbus-glib, gtkVersion ? "3" , gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null , gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null -, vala, gobject-introspection +, gtk-doc, vala, gobject-introspection , monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null }: @@ -15,18 +15,17 @@ with lib; stdenv.mkDerivation rec { name = let postfix = if gtkVersion == "2" && monoSupport then "sharp" else "gtk${gtkVersion}"; in "libappindicator-${postfix}-${version}"; - version = "${versionMajor}.${versionMinor}"; - versionMajor = "12.10"; - versionMinor = "0"; + version = "12.10.1+20.10.20200706.1"; outputs = [ "out" "dev" ]; - src = fetchurl { - url = "${meta.homepage}/${versionMajor}/${version}/+download/libappindicator-${version}.tar.gz"; - sha256 = "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"; + src = fetchgit { + url = "https://git.launchpad.net/ubuntu/+source/libappindicator"; + rev = "fe25e53bc7e39cd59ad6b3270cd7a6a9c78c4f44"; + sha256 = "0xjvbl4gn7ra2fs6gn2g9s787kzb5cg9hv79iqsz949rxh4iw32d"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook vala gobject-introspection ]; + nativeBuildInputs = [ pkgconfig autoreconfHook vala gobject-introspection gtk-doc ]; propagatedBuildInputs = if gtkVersion == "2" @@ -39,14 +38,9 @@ stdenv.mkDerivation rec { then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ] else [ libindicator-gtk3 ]); - patches = [ - # Remove python2 from libappindicator. - (fetchpatch { - name = "no-python.patch"; - url = "https://src.fedoraproject.org/rpms/libappindicator/raw/8508f7a52437679fd95a79b4630373f08315f189/f/nopython.patch"; - sha256 = "18b1xzvwsbhhfpbzf5zragij4g79pa04y1dk6v5ci1wsjvii725s"; - }) - ]; + preAutoreconf = '' + gtkdocize + ''; configureFlags = [ "CFLAGS=-Wno-error" From e6ec21dfa3feaafccf90a5234d4f0b5c3a48cddb Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 25 Aug 2020 09:00:17 +1000 Subject: [PATCH 40/57] podman: 2.0.4 -> 2.0.5 https://github.com/containers/podman/releases/tag/v2.0.5 --- pkgs/applications/virtualization/podman/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index b6656ea50bd7..7d214b4abd3f 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -16,13 +16,13 @@ buildGoModule rec { pname = "podman"; - version = "2.0.4"; + version = "2.0.5"; src = fetchFromGitHub { owner = "containers"; repo = "podman"; rev = "v${version}"; - sha256 = "0rnli16nh5m3a8jjkkm1k4f896yk1k1rg48rjiajqhfrr98qwr0f"; + sha256 = "0db0q52va9w8aprzx08xnv6y84l4x4lc113sd97hjgjnhknp8d3m"; }; vendorSha256 = null; From ba9f3e80d7a2bdd672850182348843d1a86bf70b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 22:56:39 +0000 Subject: [PATCH 41/57] fossil: 2.11.1 -> 2.12.1 --- pkgs/applications/version-management/fossil/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/fossil/default.nix b/pkgs/applications/version-management/fossil/default.nix index d23728a060f9..b34220c26352 100644 --- a/pkgs/applications/version-management/fossil/default.nix +++ b/pkgs/applications/version-management/fossil/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { pname = "fossil"; - version = "2.11.1"; + version = "2.12.1"; src = fetchurl { urls = @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { "https://www.fossil-scm.org/index.html/uv/fossil-src-${version}.tar.gz" ]; name = "${pname}-${version}.tar.gz"; - sha256 = "1sxq1hn87fdikhbg9y3v4sjy4gxaifnx4dig8nx6xwd5mm7z74dk"; + sha256 = "00v6gmn2wpfms5jzf103hkm5s8i3bfs5mzacmznlhdzdrzzjc8w2"; }; buildInputs = [ zlib openssl readline sqlite which ed ] From 59e13f65fb71f33c74ca972b8251be87136d04a3 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 13 Aug 2020 09:47:01 -0400 Subject: [PATCH 42/57] python3Packages.pylatexenc: 2.4 -> 2.7 --- pkgs/development/python-modules/pylatexenc/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pylatexenc/default.nix b/pkgs/development/python-modules/pylatexenc/default.nix index 02a0f8758369..6b56a42246f1 100644 --- a/pkgs/development/python-modules/pylatexenc/default.nix +++ b/pkgs/development/python-modules/pylatexenc/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "pylatexenc"; - version = "2.4"; + version = "2.7"; src = fetchFromGitHub { owner = "phfaist"; repo = "pylatexenc"; rev = "v${version}"; - sha256 = "0i4frypbv90mjir8bkp03cwkvwhgvc9p3fw6q2jz1dn7fw94v2rv"; + sha256 = "1hpcwbknfah3mky2m4asw15b9qdvv4k5ni0js764n1jpi83m1zgk"; }; pythonImportsCheck = [ "pylatexenc" ]; @@ -26,4 +26,4 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ drewrisinger ]; }; -} \ No newline at end of file +} From 1e8b74f393c8492b2667f8a80bc805804d230dfe Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:31:36 -0400 Subject: [PATCH 43/57] muparserx: init at 4.0.8 --- .../libraries/muparserx/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/muparserx/default.nix diff --git a/pkgs/development/libraries/muparserx/default.nix b/pkgs/development/libraries/muparserx/default.nix new file mode 100644 index 000000000000..2c5bde316b4a --- /dev/null +++ b/pkgs/development/libraries/muparserx/default.nix @@ -0,0 +1,42 @@ +{ stdenv +, fetchFromGitHub +, cmake +}: + +stdenv.mkDerivation rec { + pname = "muparserx"; + version = "4.0.8"; + + src = fetchFromGitHub { + owner = "beltoforion"; + repo = "muparserx"; + rev = "v${version}"; + sha256 = "097pkdffv0phr0345hy06mjm5pfy259z13plsvbxvcmds80wl48v"; + }; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + ]; + + doCheck = true; + checkPhase = '' + echo "***Muparserx self-test***" + echo "quit" | ./example > test_result.log + cat test_result.log + if grep -Fqi "failed" test_result.log; then + echo ">=1 muparserx tests failed" + exit 1 + else + echo -e "\nmuparserx tests succeeded" + fi + ''; + + meta = with stdenv.lib; { + description = "A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more."; + homepage = "https://beltoforion.de/en/muparserx/"; + license = licenses.bsd2; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 08e3fe0cf6f5..aa1165985a2b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14317,6 +14317,8 @@ in inherit (darwin.stubs) setfile; }; + muparserx = callPackage ../development/libraries/muparserx { }; + mutest = callPackage ../development/libraries/mutest { }; mygpoclient = pythonPackages.mygpoclient; From 5c60872dfbb0e23982cd5807ed6e96eb9cabbd99 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Fri, 14 Aug 2020 18:22:50 -0400 Subject: [PATCH 44/57] python3Packages.retworkx: 0.3.4 -> 0.4.0 Also compile from source using Rust. Now possible b/c pyo3/maturin work on Rust stable. --- .../python-modules/retworkx/default.nix | 81 ++++++++++--------- pkgs/top-level/python-packages.nix | 3 +- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/pkgs/development/python-modules/retworkx/default.nix b/pkgs/development/python-modules/retworkx/default.nix index 309f3532cfc9..49e4b1c2fc34 100644 --- a/pkgs/development/python-modules/retworkx/default.nix +++ b/pkgs/development/python-modules/retworkx/default.nix @@ -1,53 +1,60 @@ { lib -, buildPythonPackage -, pythonOlder -, pythonAtLeast +, rustPlatform , python +, fetchpatch , fetchFromGitHub -, fetchPypi +, pipInstallHook +, maturin +, pip # Check inputs , pytestCheckHook +, numpy }: -let - rx-version = "0.3.4"; - wheel-hashes = { - "3.7" = { python = "cp37"; sha256 = "1hfrdj8svkfdraa299gcj18a601l4zn646fkgq7m56brpagssf9l"; }; - "3.8" = { python = "cp38"; sha256 = "0jm10ywaqr0b456pcp01pb7035nawlndfi998jv8p1a2f5xwjgiq"; }; - }; - lookup = set: key: default: if (builtins.hasAttr key set) then (builtins.getAttr key set) else default; - wheel-args = lookup - wheel-hashes - python.pythonVersion - (throw "retworkx python version & hash not included. Override attribute `wheel-args` with version & hash at https://pypi.org/project/retworkx"); +rustPlatform.buildRustPackage rec { + pname = "retworkx"; + version = "0.4.0"; - github-source = fetchFromGitHub { + src = fetchFromGitHub { owner = "Qiskit"; repo = "retworkx"; - rev = rx-version; - sha256 = "0cd3x64y49q9a3jrkiknlfkiccxkxgl624x5pqk7gm34s1lnzl8h"; - }; -in -buildPythonPackage rec { - pname = "retworkx"; - version = rx-version; - format = "wheel"; - - disabled = pythonOlder "3.5" || pythonAtLeast "3.9"; # compiled versions only included for 3.5 <= py <= 3.8 - - src = fetchPypi { - inherit pname version format; - inherit (wheel-args) python sha256; - abi = if pythonOlder "3.8" then "${wheel-args.python}m" else wheel-args.python; - platform = "manylinux2010_x86_64"; # i686, aarch64, and ppc64 also available, restricting to x86 for simplicity + rev = version; + sha256 = "1xqp6d39apkjvd0ad9vw81cp2iqzhpagfa4p171xqm3bwfn2imdc"; }; - pythonImportsCheck = [ "retworkx" ]; + cargoSha256 = "0bma0l14jv5qhcsxck7vw3ak1w3c8v84cq4hii86i4iqk523zns5"; + cargoPatches = [ + ( fetchpatch { + name = "retworkx-cargo-lock.patch"; + url = "https://github.com/Qiskit/retworkx/commit/a02fd33d357a92dbe9530696a6d85aa59fe8a5b9.patch"; + sha256 = "0gvxr1nqp9ll4skfks4p4d964pshal25kb1nbfzhpyipnzddizr5"; + } ) + ]; - checkInputs = [ pytestCheckHook ]; + propagatedBuildInputs = [ python ]; + + nativeBuildInputs = [ pipInstallHook maturin pip ]; + + # Need to check AFTER python wheel is installed (b/c using Rust Build, not buildPythonPackage) + doCheck = false; + doInstallCheck = true; + + buildPhase = '' + runHook preBuild + maturin build --release --manylinux off --strip --interpreter ${python.interpreter} + runHook postBuild + ''; + + installPhase = '' + install -Dm644 -t dist target/wheels/*.whl + pipInstallPhase + ''; + + installCheckInputs = [ pytestCheckHook numpy ]; preCheck = '' - pushd $(mktemp -d) - cp -r ${github-source}/$sourceRoot/tests . + export TESTDIR=$(mktemp -d) + cp -r $TMP/$sourceRoot/tests $TESTDIR + pushd $TESTDIR ''; postCheck = "popd"; @@ -55,8 +62,8 @@ buildPythonPackage rec { description = "A python graph library implemented in Rust."; homepage = "https://retworkx.readthedocs.io/en/latest/index.html"; downloadPage = "https://github.com/Qiskit/retworkx/releases"; + changelog = "https://github.com/Qiskit/retworkx/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; - platforms = platforms.x86_64; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ca643bf6efd..06539d1feb13 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5936,7 +5936,8 @@ in { readchar = callPackage ../development/python-modules/readchar { }; - retworkx = callPackage ../development/python-modules/retworkx { }; + retworkx = disabledIf (pythonOlder "3.5") + (toPythonModule (callPackage ../development/python-modules/retworkx { } )); rivet = disabledIf (!isPy3k) (toPythonModule (pkgs.rivet.override { python3 = python; From a9987f8053aabfeb0bb91f2b3de00401f69c3fcd Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:37:07 -0400 Subject: [PATCH 45/57] python3Packages.qiskit-terra: 0.14.2 -> 0.15.1 --- .../python-modules/qiskit-terra/default.nix | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index c1c0dd928378..aad0370c3d7c 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -8,12 +8,11 @@ , fastjsonschema , jsonschema , numpy -, marshmallow -, marshmallow-polyfield , networkx , ply , psutil , python-constraint +, python-dateutil , retworkx , scipy , sympy @@ -36,7 +35,7 @@ buildPythonPackage rec { pname = "qiskit-terra"; - version = "0.14.2"; + version = "0.15.1"; disabled = pythonOlder "3.5"; @@ -44,7 +43,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = pname; rev = version; - sha256 = "0p5wapjvy81pnks100xbb23kbs2wyys9ykyc8z4968wl487lq4g5"; + sha256 = "1p7y36gj3675dmp05nwi0m9nc7h0bwyimir3ncf9wbkx3crrh99c"; }; nativeBuildInputs = [ cython ]; @@ -54,13 +53,12 @@ buildPythonPackage rec { fastjsonschema jsonschema numpy - marshmallow - marshmallow-polyfield matplotlib networkx ply psutil python-constraint + python-dateutil retworkx scipy sympy @@ -74,10 +72,6 @@ buildPythonPackage rec { seaborn ]; - postPatch = '' - # Fix relative imports in tests - touch test/python/dagcircuit/__init__.py - ''; # *** Tests *** checkInputs = [ @@ -94,9 +88,6 @@ buildPythonPackage rec { "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial" ]; - disabledTests = [ - "test_random_clifford_valid" # random test, fails at least once when testing locally. - ]; pytestFlagsArray = [ "--ignore=test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency ]; @@ -106,9 +97,9 @@ buildPythonPackage rec { preCheck = '' export PACKAGEDIR=$out/${python.sitePackages} echo "Moving Qiskit test files to package directory" - cp -r $TMP/source/test $PACKAGEDIR - cp -r $TMP/source/examples $PACKAGEDIR - cp -r $TMP/source/qiskit/schemas/examples $PACKAGEDIR/qiskit/schemas/ + cp -r $TMP/$sourceRoot/test $PACKAGEDIR + cp -r $TMP/$sourceRoot/examples $PACKAGEDIR + cp -r $TMP/$sourceRoot/qiskit/schemas/examples $PACKAGEDIR/qiskit/schemas/ # run pytest from Nix's $out path pushd $PACKAGEDIR @@ -127,6 +118,7 @@ buildPythonPackage rec { ''; homepage = "https://qiskit.org/terra"; downloadPage = "https://github.com/QISKit/qiskit-terra/releases"; + changelog = "https://qiskit.org/documentation/release_notes.html"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; }; From 9e8218bb25d9764a8e959ef7b1db04ccfb8a46aa Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:39:45 -0400 Subject: [PATCH 46/57] python3Packages.multitasking: init at 0.0.9 Dependency for python3Packages.yfinance --- .../python-modules/multitasking/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/python-modules/multitasking/default.nix diff --git a/pkgs/development/python-modules/multitasking/default.nix b/pkgs/development/python-modules/multitasking/default.nix new file mode 100644 index 000000000000..8ea4d633f662 --- /dev/null +++ b/pkgs/development/python-modules/multitasking/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "multitasking"; + version = "0.0.9"; + + # GitHub source releases aren't tagged + src = fetchPypi { + inherit pname version; + sha256 = "b59d99f709d2e17d60ccaa2be09771b6e9ed9391c63f083c0701e724f624d2e0"; + }; + + doCheck = false; # No tests included + pythonImportsCheck = [ "multitasking" ]; + + meta = with lib; { + description = "Non-blocking Python methods using decorators"; + homepage = "https://github.com/ranaroussi/multitasking"; + license = licenses.asl20; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 06539d1feb13..9722739aded0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4903,6 +4903,8 @@ in { multiprocess = callPackage ../development/python-modules/multiprocess { }; + multitasking = callPackage ../development/python-modules/multitasking { }; + munkres = callPackage ../development/python-modules/munkres { }; musicbrainzngs = callPackage ../development/python-modules/musicbrainzngs { }; From 886a9bced5a4017b1f22ce8b02930f6abe5126ea Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:40:57 -0400 Subject: [PATCH 47/57] python3Packages.yfinance: init at 0.1.54 --- .../python-modules/yfinance/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/yfinance/default.nix diff --git a/pkgs/development/python-modules/yfinance/default.nix b/pkgs/development/python-modules/yfinance/default.nix new file mode 100644 index 000000000000..55068d3d5e69 --- /dev/null +++ b/pkgs/development/python-modules/yfinance/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, multitasking +, numpy +, pandas +, requests +}: + +buildPythonPackage rec { + pname = "yfinance"; + version = "0.1.54"; + + # GitHub source releases aren't tagged + src = fetchPypi { + inherit pname version; + sha256 = "cee223cbd31e14955869f7978bcf83776d644345c7dea31ba5d41c309bfb0d3d"; + }; + + propagatedBuildInputs = [ + multitasking + numpy + pandas + requests + ]; + + doCheck = false; # Tests require internet access + pythonImportsCheck = [ "yfinance" ]; + + meta = with lib; { + description = "Yahoo! Finance market data downloader (+faster Pandas Datareader)"; + homepage = "https://aroussi.com/post/python-yahoo-finance"; + license = licenses.asl20; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9722739aded0..bde2da684f82 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7734,6 +7734,8 @@ in { yattag = callPackage ../development/python-modules/yattag { }; + yfinance = callPackage ../development/python-modules/yfinance { }; + xenomapper = disabledIf (!isPy3k) (callPackage ../applications/science/biology/xenomapper { }); z3 = (toPythonModule (pkgs.z3.override { From d0c96f2cbea67bd93445d81c9010070ffe5737aa Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:41:37 -0400 Subject: [PATCH 48/57] python3Packages.qiskit-aer: 0.5.2 -> 0.6.1 --- .../python-modules/qiskit-aer/default.nix | 34 ++++------ .../qiskit-aer/remove-conan-install.patch | 63 +++++++++++++++++++ 2 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch diff --git a/pkgs/development/python-modules/qiskit-aer/default.nix b/pkgs/development/python-modules/qiskit-aer/default.nix index 3f0439efc7a8..8e73e942be92 100644 --- a/pkgs/development/python-modules/qiskit-aer/default.nix +++ b/pkgs/development/python-modules/qiskit-aer/default.nix @@ -6,6 +6,9 @@ , cmake , cvxpy , cython +, muparserx +, ninja +, nlohmann_json , numpy , openblas , pybind11 @@ -19,7 +22,7 @@ buildPythonPackage rec { pname = "qiskit-aer"; - version = "0.5.2"; + version = "0.6.1"; disabled = pythonOlder "3.5"; @@ -27,18 +30,20 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-aer"; rev = version; - fetchSubmodules = true; # fetch muparserx and other required libraries - sha256 = "0vw6b69h8pvzxhaz3k8sg9ac792gz3kklfv0izs6ra83y1dfwhjz"; + sha256 = "1fnv11diis0as8zcc57mamz0gbjd6vj7nw3arxzvwa77ja803sr4"; }; nativeBuildInputs = [ cmake + ninja scikit-build ]; buildInputs = [ openblas spdlog + nlohmann_json + muparserx ]; propagatedBuildInputs = [ @@ -48,10 +53,10 @@ buildPythonPackage rec { pybind11 ]; - postPatch = '' - # remove dependency on PyPi cmake package, which isn't in Nixpkgs - substituteInPlace setup.py --replace "'cmake!=3.17,!=3.17.0'" "" - ''; + patches = [ + # TODO: remove in favor of qiskit-aer PR #877 patch once accepted/stable + ./remove-conan-install.patch + ]; dontUseCmakeConfigure = true; @@ -60,11 +65,6 @@ buildPythonPackage rec { "-DAER_THRUST_BACKEND=OMP" ]; - # Needed to find qiskit.providers.aer modules in cython. This exists in GitHub, don't know why it isn't copied by default - postFixup = '' - touch $out/${python.sitePackages}/qiskit/__init__.pxd - ''; - # *** Testing *** pythonImportsCheck = [ @@ -77,11 +77,6 @@ buildPythonPackage rec { pytestCheckHook ]; dontUseSetuptoolsCheck = true; # Otherwise runs tests twice - disabledTests = [ - # broken with cvxpy >= 1.1.0, see https://github.com/Qiskit/qiskit-aer/issues/779. - # TODO: Remove once resolved, probably next qiskit-aer version - "test_clifford" - ]; preCheck = '' # Tests include a compiled "circuit" which is auto-built in $HOME @@ -100,11 +95,8 @@ buildPythonPackage rec { description = "High performance simulators for Qiskit"; homepage = "https://qiskit.org/aer"; downloadPage = "https://github.com/QISKit/qiskit-aer/releases"; + changelog = "https://qiskit.org/documentation/release_notes.html"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; - # Doesn't build on aarch64 (libmuparserx issue). - # Can fix by building muparserx from source (https://github.com/beltoforion/muparserx) - # or in future updates (e.g. Raspberry Pi enabled via https://github.com/Qiskit/qiskit-aer/pull/651 & https://github.com/Qiskit/qiskit-aer/pull/660) - platforms = platforms.x86_64; }; } diff --git a/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch b/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch new file mode 100644 index 000000000000..1c5ae87b082f --- /dev/null +++ b/pkgs/development/python-modules/qiskit-aer/remove-conan-install.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index efeacfc..77bd6bd 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,7 +121,11 @@ endif() + # Looking for external libraries + # + +-setup_conan() ++find_package(muparserx REQUIRED) ++find_package(nlohmann_json REQUIRED) ++find_package(spdlog REQUIRED) ++# for tests only ++find_package(catch2) + + # If we do not set them with a space CMake fails afterwards if nothing is set for this vars! + set(AER_LINKER_FLAGS " ") +@@ -269,16 +273,16 @@ endif() + set(AER_LIBRARIES + ${AER_LIBRARIES} + ${BLAS_LIBRARIES} +- CONAN_PKG::nlohmann_json ++ nlohmann_json + Threads::Threads +- CONAN_PKG::spdlog ++ spdlog + ${DL_LIB} + ${THRUST_DEPENDANT_LIBS}) + + set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} ${CONAN_DEFINES}) + # Cython build is only enabled if building through scikit-build. + if(SKBUILD) # Terra Addon build +- set(AER_LIBRARIES ${AER_LIBRARIES} CONAN_PKG::muparserx) ++ set(AER_LIBRARIES ${AER_LIBRARIES} muparserx) + add_subdirectory(qiskit/providers/aer/pulse/qutip_extra_lite/cy) + add_subdirectory(qiskit/providers/aer/backends/wrappers) + add_subdirectory(src/open_pulse) +diff --git a/setup.py b/setup.py +index fd71e9f..1561cc4 100644 +--- a/setup.py ++++ b/setup.py +@@ -11,12 +11,6 @@ import inspect + + PACKAGE_NAME = os.getenv('QISKIT_AER_PACKAGE_NAME', 'qiskit-aer') + +-try: +- from conans import client +-except ImportError: +- subprocess.call([sys.executable, '-m', 'pip', 'install', 'conan']) +- from conans import client +- + try: + from skbuild import setup + except ImportError: +@@ -46,8 +40,6 @@ common_requirements = [ + + setup_requirements = common_requirements + [ + 'scikit-build', +- 'cmake!=3.17,!=3.17.0', +- 'conan>=1.22.2' + ] + + requirements = common_requirements + ['qiskit-terra>=0.12.0'] From 1a8d96e6420ec6c33463588071308c7dd4d6752d Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:42:10 -0400 Subject: [PATCH 49/57] python3Packages.qiskit-ibmq-provider: 0.7.2 -> 0.8.0 --- .../python-modules/qiskit-ibmq-provider/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix b/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix index 02cdb8397cb1..eaf10fd60829 100644 --- a/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix +++ b/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "qiskit-ibmq-provider"; - version = "0.7.2"; + version = "0.8.0"; disabled = pythonOlder "3.6"; @@ -34,7 +34,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = pname; rev = version; - sha256 = "11h1ca4v11pajzn1cxqhim1hfziqzj27xzakwln13g8zmiqx3csp"; + sha256 = "0rrpwr4a82j69j5ibl2g0nw8wbpg201cfz6f234k2v6pj500x9nl"; }; propagatedBuildInputs = [ @@ -85,6 +85,7 @@ buildPythonPackage rec { meta = with lib; { description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ"; homepage = "https://github.com/Qiskit/qiskit-ibmq-provider"; + changelog = "https://qiskit.org/documentation/release_notes.html"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; }; From ec94311dfcb78a38cfb2dcce831754155ec15af5 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:42:31 -0400 Subject: [PATCH 50/57] python3Packages.qiskit-ignis: 0.3.3 -> 0.4.0 --- .../python-modules/qiskit-ignis/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index bfd2bffbf470..d40afe43f9e7 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -9,14 +9,15 @@ , scikitlearn , scipy # Check Inputs -, ddt , pytestCheckHook +, ddt +, pyfakefs , qiskit-aer }: buildPythonPackage rec { pname = "qiskit-ignis"; - version = "0.3.3"; + version = "0.4.0"; disabled = pythonOlder "3.6"; @@ -25,7 +26,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-ignis"; rev = version; - sha256 = "0sy9qpw0jqirsk9y61j5kr18jrw1wa812n7y98fjj6w668rrv560"; + sha256 = "07mxhaknkp121xm6mgrpcrbj9qw6j924ra3k0s6vr8qgvfcxvh0y"; }; propagatedBuildInputs = [ @@ -41,18 +42,21 @@ buildPythonPackage rec { dontUseSetuptoolsCheck = true; preCheck = "export HOME=$TMPDIR"; checkInputs = [ - ddt pytestCheckHook + ddt + pyfakefs qiskit-aer ]; - # Test is in test/verification/test_entanglemet.py. test fails due to out-of-date calls & bad logic with this file since qiskit-ignis#328 - # see qiskit-ignis#386 for all issues. Should be able to re-enable in future. - disabledTests = [ "TestEntanglement" ]; + disabledTests = [ + "test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds + "test_qv_fitter" # execution hangs, ran for several minutes + ]; meta = with lib; { description = "Qiskit tools for quantum hardware verification, noise characterization, and error correction"; homepage = "https://qiskit.org/ignis"; downloadPage = "https://github.com/QISKit/qiskit-ignis/releases"; + changelog = "https://qiskit.org/documentation/release_notes.html"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; }; From b5070a4fd6d68e9b80edc02c2effd8cb09471977 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:42:50 -0400 Subject: [PATCH 51/57] python3Packages.qiskit-aqua: 0.7.3 -> 0.7.5 --- .../python-modules/qiskit-aqua/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-aqua/default.nix b/pkgs/development/python-modules/qiskit-aqua/default.nix index fe90ee63e001..c90f9ddf2e2c 100644 --- a/pkgs/development/python-modules/qiskit-aqua/default.nix +++ b/pkgs/development/python-modules/qiskit-aqua/default.nix @@ -2,6 +2,7 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub +, fetchpatch # , cplex , cvxpy , dlx @@ -16,6 +17,7 @@ , qiskit-terra , quandl , scikitlearn +, yfinance # Check Inputs , ddt , pytestCheckHook @@ -24,7 +26,7 @@ buildPythonPackage rec { pname = "qiskit-aqua"; - version = "0.7.3"; + version = "0.7.5"; disabled = pythonOlder "3.5"; @@ -33,9 +35,18 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-aqua"; rev = version; - sha256 = "04zcnrc0vi6dfjahp1019h2ngdgi7l7jvfs9aw0y306nd9g6qgjc"; + sha256 = "19sdv7lnc4b1c86rd1dv7pjpi8cmrpzbv7nav0fb899ki8ldqdwq"; }; + # TODO: remove in next release + patches = [ + (fetchpatch { + name = "qiskit-aqua-fix-test-issue-1214.patch"; + url = "https://github.com/Qiskit/qiskit-aqua/commit/284a4323192ac85787b22cbe5f344996fae16f7d.patch"; + sha256 = "0zl8hqa2fq9ng793x4dhh0ny67nnbjcd8l1cdsaaab4ca1y0xcfr"; + }) + ]; + # Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed. propagatedBuildInputs = [ # cplex @@ -51,6 +62,7 @@ buildPythonPackage rec { qiskit-ignis quandl scikitlearn + yfinance ]; # *** NOTE *** @@ -105,8 +117,9 @@ buildPythonPackage rec { # Disabled due to missing pyscf "test_validate" # test/chemistry/test_inputparser.py - "test_binary" # in SklearnSVM, seems to have trouble with eigenvectors converging - "test_pauli_expect_single" # fails for unknown reason, 3e-3 out of tolerance + # Online tests + "test_exchangedata" + "test_yahoo" # Disabling slow tests > 10 seconds "TestVQE" @@ -119,7 +132,6 @@ buildPythonPackage rec { "TestQGAN" "test_evaluate_qasm_mode" "test_measurement_error_mitigation_auto_refresh" - "test_exchangedata" "test_wikipedia" "test_shor_factoring_1__15___qasm_simulator____3__5__" "test_readme_sample" @@ -138,11 +150,13 @@ buildPythonPackage rec { "test_oh" "test_confidence_intervals_00001" "test_eoh" + "test_qasm_5" ]; meta = with lib; { description = "An extensible library of quantum computing algorithms"; homepage = "https://github.com/QISKit/qiskit-aqua"; + changelog = "https://qiskit.org/documentation/release_notes.html"; license = licenses.asl20; maintainers = with maintainers; [ drewrisinger ]; }; From 4dee731f4a4175d28db91cdd02e92ba066c49c8b Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Mon, 10 Aug 2020 18:43:13 -0400 Subject: [PATCH 52/57] python3Packages.qiskit: 0.19.6 -> 0.20.0 --- .../python-modules/qiskit/default.nix | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/qiskit/default.nix b/pkgs/development/python-modules/qiskit/default.nix index 81468da30fbe..46fcf4985974 100644 --- a/pkgs/development/python-modules/qiskit/default.nix +++ b/pkgs/development/python-modules/qiskit/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "qiskit"; # NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history - version = "0.19.6"; + version = "0.20.0"; disabled = pythonOlder "3.5"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit"; rev = version; - sha256 = "0liby6ffgrla6wr4k742qkg8m80im372p6hmr4gkz47nmc76zy1i"; + sha256 = "1r23pjnql49gczf4k4m6ir5rr95gqdxjrks60p8a93d243mxx3c9"; }; propagatedBuildInputs = [ @@ -36,14 +36,21 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; dontUseSetuptoolsCheck = true; - # following doesn't work b/c they are distributed across different nix sitePackages dirs. Tested with pytest though. - pythonImportsCheck = [ "qiskit" "qiskit.circuit" "qiskit.ignis" "qiskit.providers.aer" "qiskit.aqua" ]; - meta = { + pythonImportsCheck = [ + "qiskit" + "qiskit.aqua" + "qiskit.circuit" + "qiskit.ignis" + "qiskit.providers.aer" + ]; + + meta = with lib; { description = "Software for developing quantum computing programs"; homepage = "https://qiskit.org"; downloadPage = "https://github.com/QISKit/qiskit/releases"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ drewrisinger pandaman ]; + changelog = "https://qiskit.org/documentation/release_notes.html"; + license = licenses.asl20; + maintainers = with maintainers; [ drewrisinger pandaman ]; }; } From f190d0fdda6f529da757dc711b57c29490b2d2f1 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 25 Aug 2020 20:20:20 -0500 Subject: [PATCH 53/57] recursive: 1.057 -> 1.059 https://github.com/arrowtype/recursive/releases/tag/1.059 --- pkgs/data/fonts/recursive/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/recursive/default.nix b/pkgs/data/fonts/recursive/default.nix index 7f3b9562e89b..441a51033b60 100644 --- a/pkgs/data/fonts/recursive/default.nix +++ b/pkgs/data/fonts/recursive/default.nix @@ -1,7 +1,7 @@ { lib, fetchzip }: let - version = "1.057"; + version = "1.059"; in fetchzip { name = "recursive-${version}"; @@ -15,7 +15,7 @@ fetchzip { unzip -j $downloadedFile \*.woff2 -d $out/share/fonts/woff2 ''; - sha256 = "0qsqldnhgl93h1izminjajjymvyxsw91ngdbxlhgbqvadg77325y"; + sha256 = "0dlv8nrcqdn5vn3s918in5ph6kx6rg607kgp66p6ibpbg2s8ljy7"; meta = with lib; { homepage = "https://recursive.design/"; From c5dc3692b8ce0037c7004f9e7aec3af206056244 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 26 Aug 2020 12:24:22 +1000 Subject: [PATCH 54/57] .github/workflow/pending-{set,clear}: check hash --- .github/workflows/pending-clear.yml | 5 +++++ .github/workflows/pending-set.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/pending-clear.yml b/.github/workflows/pending-clear.yml index d888a414506c..e9eb9395bc4d 100644 --- a/.github/workflows/pending-clear.yml +++ b/.github/workflows/pending-clear.yml @@ -13,10 +13,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GSU_VERSION: "0.5.0" + GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6" GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download" run: | curl -sSf -O -L -C - \ "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ + if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then + echo "checksum mismatch" + exit 1 + fi chmod +x github-status-updater_linux_amd64 && \ ./github-status-updater_linux_amd64 \ -action update_state \ diff --git a/.github/workflows/pending-set.yml b/.github/workflows/pending-set.yml index ee1d537295c7..36104706b6fe 100644 --- a/.github/workflows/pending-set.yml +++ b/.github/workflows/pending-set.yml @@ -12,10 +12,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GSU_VERSION: "0.5.0" + GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6" GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download" run: | curl -sSf -O -L -C - \ "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ + if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then + echo "checksum mismatch" + exit 1 + fi chmod +x github-status-updater_linux_amd64 && \ ./github-status-updater_linux_amd64 \ -action update_state \ From 61f639c1ff3aad4c482fac038c7894f11e7d4d1a Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Wed, 26 Aug 2020 15:35:47 +1200 Subject: [PATCH 55/57] maintainers: add purcell (#96329) --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/servers/jackett/default.nix | 2 +- pkgs/servers/jellyfin/default.nix | 2 +- pkgs/servers/radarr/default.nix | 2 +- pkgs/servers/sonarr/default.nix | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fe06e428ff05..da063d95e066 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6749,6 +6749,12 @@ githubId = 37715; name = "Brian McKenna"; }; + purcell = { + email = "steve@sanityinc.com"; + github = "purcell"; + githubId = 5636; + name = "Steve Purcell"; + }; puzzlewolf = { email = "nixos@nora.pink"; github = "puzzlewolf"; diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix index f5b1c547921f..0306fb4dfab2 100644 --- a/pkgs/servers/jackett/default.nix +++ b/pkgs/servers/jackett/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { description = "API Support for your favorite torrent trackers."; homepage = "https://github.com/Jackett/Jackett/"; license = licenses.gpl2; - maintainers = with maintainers; [ edwtjo nyanloutre ]; + maintainers = with maintainers; [ edwtjo nyanloutre purcell ]; platforms = platforms.all; }; } diff --git a/pkgs/servers/jellyfin/default.nix b/pkgs/servers/jellyfin/default.nix index 5ae355ab8b28..3e0533fc9bd2 100644 --- a/pkgs/servers/jellyfin/default.nix +++ b/pkgs/servers/jellyfin/default.nix @@ -56,6 +56,6 @@ in stdenv.mkDerivation rec { description = "The Free Software Media System"; homepage = "https://jellyfin.org/"; license = licenses.gpl2; - maintainers = with maintainers; [ nyanloutre minijackson ]; + maintainers = with maintainers; [ nyanloutre minijackson purcell ]; }; } diff --git a/pkgs/servers/radarr/default.nix b/pkgs/servers/radarr/default.nix index a76c45c19598..e39e0bf76470 100644 --- a/pkgs/servers/radarr/default.nix +++ b/pkgs/servers/radarr/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { description = "A Usenet/BitTorrent movie downloader"; homepage = "https://radarr.video/"; license = licenses.gpl3; - maintainers = with maintainers; [ edwtjo ]; + maintainers = with maintainers; [ edwtjo purcell ]; platforms = platforms.all; }; } diff --git a/pkgs/servers/sonarr/default.nix b/pkgs/servers/sonarr/default.nix index d18e9fb7f586..a1c854b77235 100644 --- a/pkgs/servers/sonarr/default.nix +++ b/pkgs/servers/sonarr/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { description = "Smart PVR for newsgroup and bittorrent users"; homepage = "https://sonarr.tv/"; license = stdenv.lib.licenses.gpl3; - maintainers = [ stdenv.lib.maintainers.fadenb ]; + maintainers = with stdenv.lib.maintainers; [ fadenb purcell ]; platforms = stdenv.lib.platforms.all; }; } From 1b4c4193c6e2fd5384ba7362c185c15e5e43e3d1 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 25 Aug 2020 10:32:11 -0300 Subject: [PATCH 56/57] viw: init at 20171029 --- pkgs/applications/editors/viw/default.nix | 30 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/applications/editors/viw/default.nix diff --git a/pkgs/applications/editors/viw/default.nix b/pkgs/applications/editors/viw/default.nix new file mode 100644 index 000000000000..4025bf252b30 --- /dev/null +++ b/pkgs/applications/editors/viw/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, ncurses }: + +stdenv.mkDerivation rec { + pname = "viw"; + version = "unstable-20171029"; + + src = fetchFromGitHub { + owner = "lpan"; + repo = pname; + rev = "2cf317f6d82a6fa58f284074400297b6dc0f44c2"; + sha256 = "0bnkh57v01zay6ggk0rbddaf75i48h8z06xsv33wfbjldclaljp1"; + }; + + buildInputs = [ ncurses ]; + + makeFlags = [ "CC=cc" ]; + checkFlags = [ "test-command" "test-buffer" "test-state" ]; + + installPhase = '' + install -Dm 755 -t $out/bin viw + install -Dm 644 -t $out/share/doc/${pname} README.md + ''; + + meta = with stdenv.lib; { + description = "VI Worsened, a fun and light clone of VI"; + homepage = "https://github.com/lpan/viw"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ AndersonTorres ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f421922b0e9a..e65a486b7e05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23406,6 +23406,8 @@ in inherit (lua52Packages) lpeg; }; + viw = callPackage ../applications/editors/viw { }; + virt-viewer = callPackage ../applications/virtualization/virt-viewer { }; virt-top = callPackage ../applications/virtualization/virt-top { }; From f6286dea8881e446f33a9b2faca8db43ec55aa45 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 26 Aug 2020 08:39:01 +0200 Subject: [PATCH 57/57] extra-utils: build a full lvm2 without udev support, fixes #96197 dmsetup was missing symbols. https://github.com/NixOS/nixpkgs/pull/96290#issuecomment-680252830 --- nixos/modules/system/boot/stage-1.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index eee510d2c951..fe10972b2afd 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -87,7 +87,9 @@ let # copy what we need. Instead of using statically linked binaries, # we just copy what we need from Glibc and use patchelf to make it # work. - extraUtils = pkgs.runCommandCC "extra-utils" + extraUtils = let + # Use lvm2 without udev support, which is the same lvm2 we already have in the closure anyways + lvm2 = pkgs.lvm2.override { udev = null; }; in pkgs.runCommandCC "extra-utils" { nativeBuildInputs = [pkgs.buildPackages.nukeReferences]; allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd } @@ -111,8 +113,8 @@ let copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid # Copy dmsetup and lvm. - copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup - copy_bin_and_libs ${getBin pkgs.lvm2}/bin/lvm + copy_bin_and_libs ${getBin lvm2}/bin/dmsetup + copy_bin_and_libs ${getBin lvm2}/bin/lvm # Add RAID mdadm tool. copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm