diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-08 17:57:14 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-13 11:31:47 +0000 |
commit | ee7984efa14902a2ddd820c937457667a4f40c6a (patch) | |
tree | c9c1d046733cefe5e21fdd8a52104175d47b2443 /nixpkgs/pkgs/development/compilers | |
parent | ffc9d4ba381da62fd08b361bacd1e71e2a3d934d (diff) | |
parent | b3c692172e5b5241b028a98e1977f9fb12eeaf42 (diff) | |
download | nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.gz nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.bz2 nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.lz nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.xz nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.zst nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.zip |
Merge commit 'b3c692172e5b5241b028a98e1977f9fb12eeaf42'
Diffstat (limited to 'nixpkgs/pkgs/development/compilers')
176 files changed, 6894 insertions, 1793 deletions
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix index bcd3309fc398..ef3e4b7219e4 100644 --- a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix +++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix @@ -26,6 +26,9 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name; mv $sourceRoot $out + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/Contents/Home/include/darwin/*_md.h $out/Contents/Home/include/ + rm -rf $out/Home/demo # Remove some broken manpages. diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index f61d925036c0..39685131edd3 100644 --- a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -66,6 +66,9 @@ let result = stdenv.mkDerivation rec { mv $sourceRoot $out + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + rm -rf $out/demo # Remove some broken manpages. diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix index d062c8605b66..88aa7f306691 100644 --- a/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix +++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "adoptopenjdk-icedtea-web"; - version = "1.8.6"; + version = "1.8.7"; src = fetchFromGitHub { owner = "AdoptOpenJDK"; repo = "IcedTea-Web"; rev = "icedtea-web-${version}"; - sha256 = "sha256-meqbFLGwCMpFoOVAfvtriRAS8ZWr374eSN3m0CdC2aM="; + sha256 = "sha256-XY6S1IvDqPxkYgFs7kB9AR0zQ4n3COVbS2lUT5mhTVc="; }; nativeBuildInputs = [ autoreconfHook pkg-config bc ]; diff --git a/nixpkgs/pkgs/development/compilers/aldor/default.nix b/nixpkgs/pkgs/development/compilers/aldor/default.nix index 3799f2c92127..1b87b508b6a1 100644 --- a/nixpkgs/pkgs/development/compilers/aldor/default.nix +++ b/nixpkgs/pkgs/development/compilers/aldor/default.nix @@ -2,7 +2,8 @@ , autoconf, automake, libtool, jdk, perl }: stdenv.mkDerivation { - name = "aldor-1.2.0"; + pname = "aldor"; + version = "1.2.0"; src = fetchgit { url = "https://github.com/pippijn/aldor"; diff --git a/nixpkgs/pkgs/development/compilers/algol68g/0001-plotutils-png-support.diff b/nixpkgs/pkgs/development/compilers/algol68g/0001-plotutils-png-support.diff new file mode 100644 index 000000000000..14e7ccd56244 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/algol68g/0001-plotutils-png-support.diff @@ -0,0 +1,27 @@ +diff -Naur algol68g-2.8.4-old/source/plotutils.c algol68g-2.8.4-new/source/plotutils.c +--- algol68g-2.8.4-old/source/plotutils.c 2016-10-11 18:14:48.000000000 -0300 ++++ algol68g-2.8.4-new/source/plotutils.c 2021-07-30 02:42:29.762627511 -0300 +@@ -1026,10 +1026,10 @@ + X_COORD (&DEVICE (f)) = 0; + Y_COORD (&DEVICE (f)) = 0; + return (PLOTTER (&DEVICE (f))); +- } else if (!strcmp (device_type, "gif")) { +-/*------------------------------------+ +-| Supported plotter type - pseudo GIF | +-+------------------------------------*/ ++ } else if (!strcmp (device_type, "gif") || !strcmp (device_type, "png")) { ++/*-------------------------------------------+ ++| Supported plotter type - pseudo GIF or PNG | +++-------------------------------------------*/ + char *z = DEREF (char, &A68_PAGE_SIZE (&DEVICE (f))), size[BUFFER_SIZE]; + /* Establish page size */ + if (!scan_int (&z, &(WINDOW_X_SIZE (&DEVICE (f))))) { +@@ -1067,7 +1067,7 @@ + (void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BITMAPSIZE", size); + (void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BG_COLOR", (void *) "black"); + (void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "GIF_ANIMATION", (void *) "no"); +- PLOTTER (&DEVICE (f)) = pl_newpl_r ("gif", NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f))); ++ PLOTTER (&DEVICE (f)) = pl_newpl_r (device_type, NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f))); + if (PLOTTER (&DEVICE (f)) == NULL) { + diagnostic_node (A68_RUNTIME_ERROR, p, ERROR_DEVICE_CANNOT_OPEN); + exit_genie (p, A68_RUNTIME_ERROR); diff --git a/nixpkgs/pkgs/development/compilers/algol68g/default.nix b/nixpkgs/pkgs/development/compilers/algol68g/default.nix new file mode 100644 index 000000000000..88210ca5b72e --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/algol68g/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, fetchurl +, gsl +, plotutils +, postgresql +}: + +stdenv.mkDerivation rec { + pname = "algol68g"; + version = "2.8.4"; + + src = fetchurl { + url = "https://jmvdveer.home.xs4all.nl/${pname}-${version}.tar.gz"; + hash = "sha256-WCPM0MGP4Qo2ihF8w5JHSMSl0P6N/w2dgY/3PDQlZfA="; + }; + + patches = [ + # add PNG support + ./0001-plotutils-png-support.diff + ]; + + buildInputs = [ + gsl + plotutils + postgresql + ]; + + postInstall = let + pdfdoc = fetchurl { + url = "https://jmvdveer.home.xs4all.nl/learning-algol-68-genie.pdf"; + hash = "sha256-QCwn1e/lVfTYTeolCFErvfMhvwCgsBnASqq2K+NYmlU="; + }; + in + '' + install -m644 ${pdfdoc} $out/share/doc/${pname}/learning-algol-68-genie.pdf + ''; + + meta = with lib; { + homepage = "https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html"; + description = "Algol 68 Genie compiler-interpreter"; + longDescription = '' + Algol 68 Genie (a68g) is a recent checkout hybrid compiler-interpreter, + written from scratch by Marcel van der Veer. It ranks among the most + complete Algol 68 implementations. It implements for example arbitrary + precision arithmetic, complex numbers, parallel processing, partial + parametrisation and formatted transput, as well as support for curses, + regular expressions and sounds. It can be linked to GNU plotutils, the GNU + scientific library and PostgreSQL. + ''; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/aliceml/default.nix b/nixpkgs/pkgs/development/compilers/aliceml/default.nix index 8f560ef61981..55a35176e7bb 100644 --- a/nixpkgs/pkgs/development/compilers/aliceml/default.nix +++ b/nixpkgs/pkgs/development/compilers/aliceml/default.nix @@ -1,7 +1,8 @@ {lib, stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkg-config, perl, gnome2, gtk2, pango, sqlite, libxml2, zlib, gmp, smlnj }: stdenv.mkDerivation { - name = "aliceml-1.4-7d44dc8e"; + pname = "aliceml"; + version = "1.4-7d44dc8e"; src = fetchgit { url = "https://github.com/aliceml/aliceml"; diff --git a/nixpkgs/pkgs/development/compilers/avra/default.nix b/nixpkgs/pkgs/development/compilers/avra/default.nix index 9d360780053c..30fd5f52d116 100644 --- a/nixpkgs/pkgs/development/compilers/avra/default.nix +++ b/nixpkgs/pkgs/development/compilers/avra/default.nix @@ -1,9 +1,10 @@ { lib, stdenv, fetchurl, autoconf, automake }: stdenv.mkDerivation rec { - name = "avra-1.3.0"; + pname = "avra"; + version = "1.3.0"; src = fetchurl { - url = "mirror://sourceforge/avra/${name}.tar.bz2"; + url = "mirror://sourceforge/avra/avra-${version}.tar.bz2"; sha256 = "04lp0k0h540l5pmnaai07637f0p4zi766v6sfm7cryfaca3byb56"; }; diff --git a/nixpkgs/pkgs/development/compilers/bigloo/default.nix b/nixpkgs/pkgs/development/compilers/bigloo/default.nix index a4f4287523f4..c4fa5712ea63 100644 --- a/nixpkgs/pkgs/development/compilers/bigloo/default.nix +++ b/nixpkgs/pkgs/development/compilers/bigloo/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "bigloo"; - version = "4.3h"; + version = "4.4b"; src = fetchurl { url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz"; - sha256 = "0fw08096sf8ma2cncipnidnysxii0h0pc7kcqkjhkhdchknp8vig"; + sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488="; }; nativeBuildInputs = [ autoconf automake libtool ]; diff --git a/nixpkgs/pkgs/development/compilers/binaryen/default.nix b/nixpkgs/pkgs/development/compilers/binaryen/default.nix index ee47ebd98887..533be220633f 100644 --- a/nixpkgs/pkgs/development/compilers/binaryen/default.nix +++ b/nixpkgs/pkgs/development/compilers/binaryen/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "binaryen"; - version = "99"; + version = "101"; src = fetchFromGitHub { owner = "WebAssembly"; repo = "binaryen"; rev = "version_${version}"; - sha256 = "1a6ixxm1f8mrr9mn6a0pimajdzsdr4w1qhr92skxq67168vvc1ic"; + sha256 = "sha256-rNiZQIQqNbc1P2A6UTn0dRHeT3BS+nv1o81aPaJy+5U="; }; nativeBuildInputs = [ cmake python3 ]; diff --git a/nixpkgs/pkgs/development/compilers/bluespec/default.nix b/nixpkgs/pkgs/development/compilers/bluespec/default.nix index 7a76d4948e73..d89ed3e0d49f 100644 --- a/nixpkgs/pkgs/development/compilers/bluespec/default.nix +++ b/nixpkgs/pkgs/development/compilers/bluespec/default.nix @@ -1,66 +1,45 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub -, fetchpatch , autoconf , automake , fontconfig -, gmp-static -, gperf , libX11 -, libpoly , perl , flex , bison , pkg-config -, itktcl -, incrtcl , tcl , tk -, verilog , xorg , yices , zlib , ghc -}: +, gmp-static +, verilog +, asciidoctor +, tex }: let - ghcWithPackages = ghc.withPackages (g: (with g; [old-time regex-compat syb split ])); + ghcWithPackages = ghc.withPackages (g: (with g; [ old-time regex-compat syb split ])); + in stdenv.mkDerivation rec { pname = "bluespec"; - version = "unstable-2021.03.29"; + version = "2021.07"; src = fetchFromGitHub { - owner = "B-Lang-org"; - repo = "bsc"; - rev = "00185f7960bd1bd5554a1167be9f37e1f18ac454"; - sha256 = "1bcdhql4cla137d8xr8m2h21dyxv0jpjpalpr5mgj2jxqfsmkbrn"; - }; + owner = "B-Lang-org"; + repo = "bsc"; + rev = version; + sha256 = "0gw8wyp65lpkyfhv3laazz9qypdl8qkp1j7cqp0gv11592a9p5qw"; + }; enableParallelBuilding = true; - patches = [ ./libstp_stub_makefile.patch ]; - - buildInputs = yices.buildInputs ++ [ - zlib - tcl tk - libX11 # tcltk - xorg.libXft - fontconfig - ]; - - nativeBuildInputs = [ - automake autoconf - perl - flex - bison - pkg-config - ghcWithPackages - ]; - - checkInputs = [ - verilog - ]; + outputs = [ "out" "doc" ]; + # https://github.com/B-Lang-org/bsc/pull/278 + patches = [ ./libstp_stub_makefile.patch ]; postUnpack = '' mkdir -p $sourceRoot/src/vendor/yices/v2.6/yices2 @@ -79,25 +58,65 @@ in stdenv.mkDerivation rec { substituteInPlace src/comp/Makefile \ --replace 'BINDDIR' 'BINDIR' \ --replace 'install-bsc install-bluetcl' 'install-bsc install-bluetcl $(UTILEXES) install-utils' + # allow running bsc to bootstrap - export LD_LIBRARY_PATH=/build/source/inst/lib/SAT + export LD_LIBRARY_PATH=$PWD/inst/lib/SAT ''; + buildInputs = yices.buildInputs ++ [ + fontconfig + libX11 # tcltk + tcl + tk + xorg.libXft + zlib + ]; + + nativeBuildInputs = [ + automake + autoconf + asciidoctor + bison + flex + ghcWithPackages + perl + pkg-config + tex + ]; + makeFlags = [ + "release" "NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices.src instead of the subrepo) "NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12 "LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43 "STP_STUB=1" ]; - installPhase = "mv inst $out"; - doCheck = true; + checkInputs = [ + gmp-static + verilog + ]; + + checkTarget = "check-smoke"; + + installPhase = '' + mkdir -p $out + mv inst/bin $out + mv inst/lib $out + + # fragile, I know.. + mkdir -p $doc/share/doc/bsc + mv inst/README $doc/share/doc/bsc + mv inst/ReleaseNotes.* $doc/share/doc/bsc + mv inst/doc/*.pdf $doc/share/doc/bsc + ''; + meta = { description = "Toolchain for the Bluespec Hardware Definition Language"; - homepage = "https://github.com/B-Lang-org/bsc"; - license = lib.licenses.bsd3; + homepage = "https://github.com/B-Lang-org/bsc"; + license = lib.licenses.bsd3; platforms = [ "x86_64-linux" ]; # darwin fails at https://github.com/B-Lang-org/bsc/pull/35#issuecomment-583731562 # aarch64 fails, as GHC fails with "ghc: could not execute: opt" diff --git a/nixpkgs/pkgs/development/compilers/bupc/default.nix b/nixpkgs/pkgs/development/compilers/bupc/default.nix index 9b3a291a1a08..94256ed43735 100644 --- a/nixpkgs/pkgs/development/compilers/bupc/default.nix +++ b/nixpkgs/pkgs/development/compilers/bupc/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, perl, coreutils }: stdenv.mkDerivation rec { - name = "berkeley_upc-2.22.0"; + pname = "berkeley_upc"; + version = "2.22.0"; src = fetchurl { - url = "http://upc.lbl.gov/download/release/${name}.tar.gz"; + url = "http://upc.lbl.gov/download/release/berkeley_upc-${version}.tar.gz"; sha256 = "041l215x8z1cvjcx7kwjdgiaf9rl2d778k6kiv8q09bc68nwd44m"; }; diff --git a/nixpkgs/pkgs/development/compilers/c3c/default.nix b/nixpkgs/pkgs/development/compilers/c3c/default.nix new file mode 100644 index 000000000000..2fa280fc898c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/c3c/default.nix @@ -0,0 +1,47 @@ +{ llvmPackages +, lib +, fetchFromGitHub +, cmake +, python3 +}: + +llvmPackages.stdenv.mkDerivation rec { + pname = "c3c"; + version = "unstable-2021-07-30"; + + src = fetchFromGitHub { + owner = "c3lang"; + repo = pname; + rev = "2246b641b16e581aec9059c8358858e10a548d94"; + sha256 = "VdMKdQsedDQCnsmTxO4HnBj5GH/EThspnotvrAscSqE="; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + llvmPackages.llvm + llvmPackages.lld + ]; + + checkInputs = [ python3 ]; + + doCheck = true; + + checkPhase = '' + ( cd ../resources/testproject; ../../build/c3c build ) + ( cd ../test; python src/tester.py ../build/c3c test_suite ) + ''; + + installPhase = '' + install -Dm755 c3c $out/bin/c3c + cp -r lib $out + ''; + + meta = with lib; { + description = "Compiler for the C3 language"; + homepage = "https://github.com/c3lang/c3c"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ luc65r ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/clasp/default.nix b/nixpkgs/pkgs/development/compilers/clasp/default.nix index 3aa7063f5513..0113a9aebc08 100644 --- a/nixpkgs/pkgs/development/compilers/clasp/default.nix +++ b/nixpkgs/pkgs/development/compilers/clasp/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, fetchFromGitLab , llvmPackages , cmake, boehmgc, gmp, zlib, ncurses, boost, libelf -, python, git, sbcl +, python3, git, sbcl , wafHook }: let @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ cmake python git sbcl wafHook ] ++ + nativeBuildInputs = [ cmake python3 git sbcl wafHook ] ++ (with llvmPackages; [ llvm clang ]); buildInputs = with llvmPackages; diff --git a/nixpkgs/pkgs/development/compilers/closure/default.nix b/nixpkgs/pkgs/development/compilers/closure/default.nix index b5ac2e187d8c..eb8c898e09ed 100644 --- a/nixpkgs/pkgs/development/compilers/closure/default.nix +++ b/nixpkgs/pkgs/development/compilers/closure/default.nix @@ -2,21 +2,21 @@ stdenv.mkDerivation rec { pname = "closure-compiler"; - version = "20200719"; + version = "20210808"; src = fetchurl { - url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz"; - sha256 = "18095i98mk5kc1vpaf6gvmvhiyl2x4zrcwd7ix5l98jydldiz7wx"; + url = "https://repo1.maven.org/maven2/com/google/javascript/closure-compiler/v${version}/closure-compiler-v${version}.jar"; + sha256 = "1cvibvm8l4mp64ml6lpsh3w62bgbr42pi3i7ga8ss0prhr0dsk3y"; }; - sourceRoot = "."; + dontUnpack = true; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ jre ]; installPhase = '' mkdir -p $out/share/java $out/bin - cp closure-compiler-v${version}.jar $out/share/java + cp ${src} $out/share/java/closure-compiler-v${version}.jar makeWrapper ${jre}/bin/java $out/bin/closure-compiler \ --add-flags "-jar $out/share/java/closure-compiler-v${version}.jar" ''; diff --git a/nixpkgs/pkgs/development/compilers/cmdstan/default.nix b/nixpkgs/pkgs/development/compilers/cmdstan/default.nix index c52ffa0bafdb..a41f836e10ca 100644 --- a/nixpkgs/pkgs/development/compilers/cmdstan/default.nix +++ b/nixpkgs/pkgs/development/compilers/cmdstan/default.nix @@ -1,10 +1,11 @@ { lib, stdenv, fetchurl, python3, runtimeShell }: -stdenv.mkDerivation { - name = "cmdstan-2.17.1"; +stdenv.mkDerivation rec { + pname = "cmdstan"; + version = "2.17.1"; src = fetchurl { - url = "https://github.com/stan-dev/cmdstan/releases/download/v2.17.1/cmdstan-2.17.1.tar.gz"; + url = "https://github.com/stan-dev/cmdstan/releases/download/v${version}/cmdstan-${version}.tar.gz"; sha256 = "1vq1cnrkvrvbfl40j6ajc60jdrjcxag1fi6kff5pqmadfdz9564j"; }; diff --git a/nixpkgs/pkgs/development/compilers/cone/default.nix b/nixpkgs/pkgs/development/compilers/cone/default.nix new file mode 100644 index 000000000000..9344160ad762 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/cone/default.nix @@ -0,0 +1,42 @@ +{ llvmPackages +, lib +, fetchFromGitHub +, cmake +}: + +llvmPackages.stdenv.mkDerivation rec { + pname = "cone"; + version = "unstable-2021-07-25"; + + src = fetchFromGitHub { + owner = "jondgoodwin"; + repo = pname; + rev = "5feaabc342bcff3755f638a7e25155cd12127592"; + sha256 = "CTDS83AWtuDY5g6NDn7O2awrYsKFf3Kp35FkMEjfbVw="; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + llvmPackages.llvm + ]; + + postPatch = '' + sed -i CMakeLists.txt \ + -e 's/LLVM 7/LLVM/' \ + -e '/AVR/d' + ''; + + installPhase = '' + install -Dm755 conec $out/bin/conec + install -Dm644 libconestd.a $out/lib/libconestd.a + ''; + + meta = with lib; { + description = "Cone Programming Language"; + homepage = "https://cone.jondgoodwin.com"; + license = licenses.mit; + maintainers = with maintainers; [ luc65r ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch b/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch new file mode 100644 index 000000000000..8de4c9f57f6a --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch @@ -0,0 +1,46 @@ +From bb4767f8fc413ca4cb42879a9a226fd26f10e094 Mon Sep 17 00:00:00 2001 +From: Lucas Ransan <lucas@ransan.tk> +Date: Tue, 3 Aug 2021 20:39:11 +0200 +Subject: [PATCH] force sqlite to be found + +--- + src/CMakeLists.txt | 16 +++++----------- + 1 file changed, 5 insertions(+), 11 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a0f3fee..58b4d0b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -9,7 +9,7 @@ set(INCLUDE_DIR include/) + list(FILTER sources EXCLUDE REGEX "(main|linenoise|utf8).c") + list(FILTER headers EXCLUDE REGEX "(linenoise|utf8).h") + +-find_library(SQLITE_LIB SQLite3) ++find_package(SQLite3 REQUIRED) + set(THREADS) + + if(DISABLE_HTTP) +@@ -20,16 +20,10 @@ else() + list(APPEND libraries curl) + endif() + +-if(NOT SQLITE_LIB) +- set(THREADS_PREFER_PTHREAD_FLAG ON) +- find_package(Threads REQUIRED) +- set(THREADS Threads::Threads) +-else() +- list(FILTER sources EXCLUDE REGEX "sqlite3.c") +- list(FILTER headers EXCLUDE REGEX "sqlite3.h") +- list(APPEND libraries ${SQLITE_LIB}) +- add_compile_definitions(INCLUDE_SQLITE_LIB) +-endif() ++list(FILTER sources EXCLUDE REGEX "sqlite3.c") ++list(FILTER headers EXCLUDE REGEX "sqlite3.h") ++list(APPEND libraries ${SQLite3_LIBRARIES}) ++add_compile_definitions(SQLite3_INCLUDE_DIR) + + if(WIN32) + # ws2_32 is required for winsock2.h to work correctly +-- +2.32.0 + diff --git a/nixpkgs/pkgs/development/compilers/dictu/default.nix b/nixpkgs/pkgs/development/compilers/dictu/default.nix new file mode 100644 index 000000000000..ed142f658e6c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/dictu/default.nix @@ -0,0 +1,84 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, sqlite +, httpSupport ? true, curl +, cliSupport ? true +, linenoiseSupport ? cliSupport, linenoise +, enableLTO ? stdenv.cc.isGNU +}: + +assert enableLTO -> stdenv.cc.isGNU; + +stdenv.mkDerivation rec { + pname = "dictu"; + version = "0.20.0"; + + src = fetchFromGitHub { + owner = "dictu-lang"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-GiiNIySrfpjYf5faNNml7ZRXT5pDU0SVvNvMyBh1K8E="; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + sqlite + ] ++ lib.optional httpSupport curl + ++ lib.optional linenoiseSupport linenoise; + + patches = [ + ./0001-force-sqlite-to-be-found.patch + ]; + + postPatch = lib.optionalString (!enableLTO) '' + sed -i src/CMakeLists.txt \ + -e 's/-flto/${lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"}/' + ''; + + cmakeFlags = [ + "-DBUILD_CLI=${if cliSupport then "ON" else "OFF"}" + "-DDISABLE_HTTP=${if httpSupport then "OFF" else "ON"}" + "-DDISABLE_LINENOISE=${if linenoiseSupport then "OFF" else "ON"}" + ] ++ lib.optionals enableLTO [ # TODO: LTO with LLVM + "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar" + "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" + ]; + + doCheck = cliSupport; + + preCheck = '' + cd .. + sed -i tests/runTests.du \ + -e '/http/d' + sed -i tests/path/realpath.du \ + -e 's/usr/build/g' + sed -i tests/path/isDir.du \ + -e 's,/usr/bin,/build/source,' \ + -e '/home/d' + ''; + + checkPhase = '' + runHook preCheck + ./dictu tests/runTests.du + ''; + + installPhase = '' + mkdir -p $out + cp -r /build/source/src/include $out/include + mkdir -p $out/lib + cp /build/source/build/src/libdictu_api* $out/lib + '' + lib.optionalString cliSupport '' + install -Dm755 /build/source/dictu $out/bin/dictu + ''; + + meta = with lib; { + description = "High-level dynamically typed, multi-paradigm, interpreted programming language"; + homepage = "https://dictu-lang.com"; + license = licenses.mit; + maintainers = with maintainers; [ luc65r ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/dtc/default.nix b/nixpkgs/pkgs/development/compilers/dtc/default.nix index ac1acfe4b8f1..04dca4772a98 100644 --- a/nixpkgs/pkgs/development/compilers/dtc/default.nix +++ b/nixpkgs/pkgs/development/compilers/dtc/default.nix @@ -1,15 +1,15 @@ { stdenv, lib, fetchgit, flex, bison, pkg-config, which -, pythonSupport ? false, python, swig, libyaml +, pythonSupport ? false, python ? null, swig, libyaml }: stdenv.mkDerivation rec { pname = "dtc"; - version = "1.6.0"; + version = "1.6.1"; src = fetchgit { url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git"; rev = "refs/tags/v${version}"; - sha256 = "0li992wwd7kgy71bikanqky49y4hq3p3vx35p2hvyxy1k0wfy7i8"; + sha256 = "sha256-gx9LG3U9etWhPxm7Ox7rOu9X5272qGeHqZtOe68zFs4="; }; buildInputs = [ libyaml ]; @@ -22,7 +22,9 @@ stdenv.mkDerivation rec { makeFlags = [ "PYTHON=python" ]; installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ]; - doCheck = true; + # Checks are broken on aarch64 darwin + # https://github.com/NixOS/nixpkgs/pull/118700#issuecomment-885892436 + doCheck = !stdenv.isDarwin; meta = with lib; { description = "Device Tree Compiler"; diff --git a/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix b/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix index 0789addb337b..2742c2b8c07e 100644 --- a/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix +++ b/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix @@ -7,15 +7,13 @@ , useBoehmgc ? true, boehmgc }: -assert useBoehmgc -> boehmgc != null; - let s = # Generated upstream information rec { baseName="ecl"; version="16.1.2"; name="${baseName}-${version}"; - url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.2.tgz"; + url="https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz"; sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d"; }; buildInputs = [ @@ -38,12 +36,11 @@ stdenv.mkDerivation { configureFlags = [ (if threadSupport then "--enable-threads" else "--disable-threads") - "--with-gmp-prefix=${gmp.dev}" - "--with-libffi-prefix=${libffi.dev}" - ] - ++ - (lib.optional (! noUnicode) - "--enable-unicode") + "--with-gmp-incdir=${lib.getDev gmp}/include" + "--with-gmp-libdir=${lib.getLib gmp}/lib" + # -incdir, -libdir doesn't seem to be supported for libffi + "--with-libffi-prefix=${lib.getDev libffi}" + ] ++ lib.optional (! noUnicode) "--enable-unicode" ; patches = [ @@ -69,16 +66,31 @@ stdenv.mkDerivation { postInstall = '' sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config wrapProgram "$out/bin/ecl" \ - --prefix PATH ':' "${gcc}/bin" \ - --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \ - --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib" + --prefix PATH ':' "${ + lib.makeBinPath [ + gcc # for the C compiler + gcc.bintools.bintools # for ar + ] + }" \ + '' + # ecl 16.1.2 is too old to have -libdir for libffi and boehmgc, so we need to + # use NIX_LDFLAGS_BEFORE to make gcc find these particular libraries. + # Since it is missing even the prefix flag for boehmgc we also need to inject + # the correct -I flag via NIX_CFLAGS_COMPILE. Since we have access to it, we + # create the variables with suffixSalt (which seems to be necessary for + # NIX_CFLAGS_COMPILE even). + + lib.optionalString useBoehmgc '' + --prefix NIX_CFLAGS_COMPILE_${gcc.suffixSalt} ' ' "-I${lib.getDev boehmgc}/include" \ + --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib boehmgc}/lib" \ + '' + '' + --prefix NIX_LDFLAGS_BEFORE_${gcc.bintools.suffixSalt} ' ' "-L${lib.getLib libffi}/lib" ''; - meta = { + meta = with lib; { inherit (s) version; description = "Lisp implementation aiming to be small, fast and easy to embed"; - license = lib.licenses.mit ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.unix; + license = licenses.mit ; + maintainers = [ maintainers.raskin ]; + platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/development/compilers/ecl/default.nix b/nixpkgs/pkgs/development/compilers/ecl/default.nix index 083998049c1e..44f7eab62ee5 100644 --- a/nixpkgs/pkgs/development/compilers/ecl/default.nix +++ b/nixpkgs/pkgs/development/compilers/ecl/default.nix @@ -45,31 +45,33 @@ stdenv.mkDerivation { configureFlags = [ (if threadSupport then "--enable-threads" else "--disable-threads") - "--with-gmp-prefix=${gmp.dev}" - "--with-libffi-prefix=${libffi.dev}" - ] - ++ - (lib.optional (! noUnicode) - "--enable-unicode") - ; + "--with-gmp-incdir=${lib.getDev gmp}/include" + "--with-gmp-libdir=${lib.getLib gmp}/lib" + "--with-libffi-incdir=${lib.getDev libffi}/include" + "--with-libffi-libdir=${lib.getLib libffi}/lib" + ] ++ lib.optionals useBoehmgc [ + "--with-libgc-incdir=${lib.getDev boehmgc}/include" + "--with-libgc-libdir=${lib.getLib boehmgc}/lib" + ] ++ lib.optional (!noUnicode) "--enable-unicode"; hardeningDisable = [ "format" ]; postInstall = '' sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config - wrapProgram "$out/bin/ecl" \ - --prefix PATH ':' "${gcc}/bin" \ - --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \ - --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib" + wrapProgram "$out/bin/ecl" --prefix PATH ':' "${ + lib.makeBinPath [ + gcc # for the C compiler + gcc.bintools.bintools # for ar + ] + }" ''; - meta = { - inherit (s) version; + meta = with lib; { description = "Lisp implementation aiming to be small, fast and easy to embed"; homepage = "https://common-lisp.net/project/ecl/"; - license = lib.licenses.mit ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.unix; + license = licenses.mit ; + maintainers = [ maintainers.raskin ]; + platforms = platforms.unix; changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${s.version}/CHANGELOG"; }; } diff --git a/nixpkgs/pkgs/development/compilers/edk2/default.nix b/nixpkgs/pkgs/development/compilers/edk2/default.nix index 9d1abc11af19..1a6685e91411 100644 --- a/nixpkgs/pkgs/development/compilers/edk2/default.nix +++ b/nixpkgs/pkgs/development/compilers/edk2/default.nix @@ -5,7 +5,6 @@ fetchpatch, libuuid, python3, - iasl, bc, clang_9, llvmPackages_9, diff --git a/nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch b/nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch new file mode 100644 index 000000000000..9cb3ca2bf9f6 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/emscripten/0001-emulate-clang-sysroot-include-logic.patch @@ -0,0 +1,42 @@ +From 67f54fde2b1683aae3800f7a86a4e507c1125be8 Mon Sep 17 00:00:00 2001 +From: Yureka <yuka@yuka.dev> +Date: Sat, 7 Aug 2021 09:16:46 +0200 +Subject: [PATCH] emulate clang 'sysroot + /include' logic + +Authored-By: Alexander Khovansky <alex@khovansky.me> +Co-Authored-By: Yureka <yuka@yuka.dev> + +Clang provided by nix patches out logic that appends 'sysroot + /include' +to the include path as well as automatic inclusion of libcxx includes (/include/c++/v1). +The patch below adds that logic back by introducing cflags emulating this behavior to emcc +invocations directly. + +Important note: with non-nix clang, sysroot/include dir ends up being the last +in the include search order, right after the resource root. +Hence usage of -idirafter. Clang also documents an -isystem-after flag +but it doesn't appear to work +--- + emcc.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/emcc.py b/emcc.py +index 999314afc..0e23c066c 100755 +--- a/emcc.py ++++ b/emcc.py +@@ -759,7 +759,12 @@ def emsdk_ldflags(user_args): + + + def emsdk_cflags(user_args): +- cflags = ['--sysroot=' + shared.Cache.get_sysroot(absolute=True)] ++ cflags = [ ++ '--sysroot=' + shared.Cache.get_sysroot(absolute=True), ++ '-resource-dir=@resourceDir@', ++ '-idirafter' + shared.Cache.get_sysroot(absolute=True) + os.path.join('/include'), ++ '-iwithsysroot' + os.path.join('/include','c++','v1') ++ ] + + def array_contains_any_of(hay, needles): + for n in needles: +-- +2.32.0 + diff --git a/nixpkgs/pkgs/development/compilers/emscripten/default.nix b/nixpkgs/pkgs/development/compilers/emscripten/default.nix index a142008e2e30..c514b86a6c42 100644 --- a/nixpkgs/pkgs/development/compilers/emscripten/default.nix +++ b/nixpkgs/pkgs/development/compilers/emscripten/default.nix @@ -1,17 +1,17 @@ { lib, stdenv, fetchFromGitHub, python3, nodejs, closurecompiler , jre, binaryen -, llvmPackages_11 -, symlinkJoin, makeWrapper +, llvmPackages +, symlinkJoin, makeWrapper, substituteAll , mkYarnModules }: stdenv.mkDerivation rec { pname = "emscripten"; - version = "2.0.10"; + version = "2.0.27"; llvmEnv = symlinkJoin { name = "emscripten-llvm-${version}"; - paths = with llvmPackages_11; [ clang-unwrapped lld llvm ]; + paths = with llvmPackages; [ clang-unwrapped clang-unwrapped.lib lld llvm ]; }; nodeModules = mkYarnModules { @@ -26,27 +26,32 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "emscripten-core"; repo = "emscripten"; - sha256 = "0jy4n1pykk9vkm5da9v3qsfrl6j7yhngcazh2792xxs6wzfcs9gk"; + sha256 = "1dpfib2nmbvskqlaqw3kvaay69qpa7d155hd4w05c2xgmahmrd4n"; rev = version; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ nodejs python3 ]; + patches = [ + (substituteAll { + src = ./0001-emulate-clang-sysroot-include-logic.patch; + resourceDir = "${llvmEnv}/lib/clang/${llvmPackages.release_version}/"; + }) + ]; + buildPhase = '' + runHook preBuild + patchShebangs . # fixes cmake support sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" emcc.py # disables cache in user home, use installation directory instead - sed -i '/^def/!s/root_is_writable()/True/' tools/shared.py + sed -i '/^def/!s/root_is_writable()/True/' tools/config.py sed -i "/^def check_sanity/a\\ return" tools/shared.py - # super ugly: monkeypatch to add sysroot/include to the include - # path because they are otherwise not part of Nix's clang. - sed -i "490a\\ '/include'," tools/shared.py - # required for wasm2c ln -s ${nodeModules}/node_modules . @@ -66,19 +71,19 @@ stdenv.mkDerivation rec { sed -i "s|^EMAR =.*|EMAR='$out/bin/emar'|" tools/shared.py sed -i "s|^EMRANLIB =.*|EMRANLIB='$out/bin/emranlib'|" tools/shared.py - # The tests use the C compiler to compile generated C code, - # use the wrapped compiler - sed -i 's/shared.CLANG_CC/"cc"/' tests/runner.py + runHook postBuild ''; installPhase = '' + runHook preInstall + appdir=$out/share/emscripten mkdir -p $appdir cp -r . $appdir chmod -R +w $appdir mkdir -p $out/bin - for b in em++ em-config emar embuilder.py emcc emcmake emconfigure emmake emranlib emrun emscons; do + for b in em++ em-config emar embuilder.py emcc emcmake emconfigure emmake emranlib emrun emscons emsize; do makeWrapper $appdir/$b $out/bin/$b \ --set NODE_PATH ${nodeModules}/node_modules \ --set EM_EXCLUSIVE_CACHE_ACCESS 1 \ @@ -92,8 +97,12 @@ stdenv.mkDerivation rec { # wasm2c doesn't work with PIC $out/bin/emcc -s WASM2C -s STANDALONE_WASM $LTO test.c - for RELOCATABLE in "" "-s RELOCATABLE"; do - $out/bin/emcc $RELOCATABLE $LTO test.c + for BIND in "" "--bind"; do + for MT in "" "-s USE_PTHREADS"; do + for RELOCATABLE in "" "-s RELOCATABLE"; do + $out/bin/emcc $RELOCATABLE $BIND $MT $LTO test.c + done + done done done popd @@ -103,6 +112,8 @@ stdenv.mkDerivation rec { pushd $appdir python tests/runner.py test_hello_world popd + + runHook postInstall ''; meta = with lib; { diff --git a/nixpkgs/pkgs/development/compilers/emscripten/package.json b/nixpkgs/pkgs/development/compilers/emscripten/package.json index 36cd2efe27a0..1102fd62ef2a 100644 --- a/nixpkgs/pkgs/development/compilers/emscripten/package.json +++ b/nixpkgs/pkgs/development/compilers/emscripten/package.json @@ -1,15 +1,21 @@ { "name": "emscripten", - "version": "2.0.10", + "version": "2.0.26", + "private": true, "devDependencies": { - "es-check": "^5.1.0", + "es-check": "^5.2.4", + "eslint": "^7.29.0", + "eslint-config-google": "^0.14.0", + "source-map": "0.5.7", "ws": "~0.4.28" }, "dependencies": { - "acorn": "7.3.1", - "google-closure-compiler": "20200920.0.0", - "html-minifier-terser": "5.0.2", - "source-map": "0.5.6", + "acorn": "8.4.1", + "google-closure-compiler": "20210601.0.0", + "html-minifier-terser": "5.1.1", "wasm2c": "1.0.0" + }, + "scripts": { + "lint": "eslint src/parseTools.js" } } diff --git a/nixpkgs/pkgs/development/compilers/emscripten/yarn.lock b/nixpkgs/pkgs/development/compilers/emscripten/yarn.lock index 948fcd4ed7f1..0e8853952950 100644 --- a/nixpkgs/pkgs/development/compilers/emscripten/yarn.lock +++ b/nixpkgs/pkgs/development/compilers/emscripten/yarn.lock @@ -2,16 +2,87 @@ # yarn lockfile v1 -acorn@7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd" - integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/helper-validator-identifier@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" + integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== + +"@babel/highlight@^7.10.4": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@eslint/eslintrc@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" + integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== + +acorn@8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.6.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.0.tgz#60cc45d9c46a477d80d92c48076d972c342e5720" + integrity sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -27,6 +98,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -39,6 +115,13 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + ansi@^0.3.0, ansi@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" @@ -52,6 +135,18 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + async@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" @@ -80,13 +175,18 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" + pascal-case "^3.1.2" + tslib "^2.0.3" caporal@1.4.0: version "1.4.0" @@ -103,7 +203,7 @@ caporal@1.4.0: tabtab "^2.2.2" winston "^2.3.1" -chalk@2.x: +chalk@2.x, chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -123,7 +223,15 @@ chalk@^1.0.0: strip-ansi "^3.0.0" supports-color "^2.0.0" -clean-css@^4.2.1: +chalk@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +clean-css@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== @@ -188,11 +296,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + colorette@^1.0.1: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" @@ -213,7 +333,7 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.0: +commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -243,6 +363,15 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" @@ -255,12 +384,51 @@ debug@^2.2.0: dependencies: ms "2.0.0" +debug@^4.0.1, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -es-check@^5.1.0: +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +es-check@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/es-check/-/es-check-5.2.4.tgz#76fe2d96ad238bd8ec1d9c3b3d0e98ddbcc723e7" integrity sha512-FZ3qAJ9hwguqPvGGagaKAVDnusSkezeHbiKNM5rOepOjloeVuX2e6meMxQ+mKcnWbAFucCG7fszNrzUT8bvHcQ== @@ -274,6 +442,129 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-google@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz#4f5f8759ba6e11b424294a219dbfa18c508bcc1a" + integrity sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint@^7.29.0: + version "7.29.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.29.0.tgz#ee2a7648f2e729485e4d0bd6383ec1deabc8b3c0" + integrity sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -298,6 +589,16 @@ eyes@0.1.x: resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -311,11 +612,36 @@ figures@^1.3.5: escape-string-regexp "^1.0.5" object-assign "^4.1.0" +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gauge@~1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93" @@ -327,7 +653,14 @@ gauge@~1.2.5: lodash.padend "^4.1.0" lodash.padstart "^4.1.0" -glob@^7.1.2: +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^7.1.2, glob@^7.1.3: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -339,40 +672,47 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -google-closure-compiler-java@^20200920.0.0: - version "20200920.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20200920.0.0.tgz#23519b14e004f2a9eda4f5b887842ae46ad7022e" - integrity sha512-q8m/+QLBWrzjg5VZ2b4B628zDvbi0Gyenj9bvZQlPY7mqj68HXhe5aOfKzZO7vXgHDXMvsvI3v/1g5mPAku/5w== - -google-closure-compiler-linux@^20200920.0.0: - version "20200920.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20200920.0.0.tgz#622c28a784e8a93f9cc5e7cd7b675d2ed0e11d0b" - integrity sha512-F5HcTbeklcaxdWzlZu5b1ZKzCt1kSBUWsBfvlrDCFkA2pdBxIIC2VPokGAUZCqlfno2J2gYARz8FNCrx0tCx5g== - -google-closure-compiler-osx@^20200920.0.0: - version "20200920.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20200920.0.0.tgz#6157a06e7d851d25d60de95c4bcd464d768278b1" - integrity sha512-2WY+HaUWVQNg9WZs9d4Op3zvS6yIVN2AIouU4grwYWXfFk+CMXZou0ASlsOURaYc2WZ22LW/G1w3vINDoCkSww== - -google-closure-compiler-windows@^20200920.0.0: - version "20200920.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20200920.0.0.tgz#755ddeb8032530c6ed13962e328d9af3269d0748" - integrity sha512-0c4Dem3em3ASNpcR/2USx1Kvb+I7L2MvsV1IZ5Pu98jTuhnkmlccQqPzk2rZR6lllVbVFXTb6tju0JxZ7Zoxjg== - -google-closure-compiler@20200920.0.0: - version "20200920.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20200920.0.0.tgz#e1c54b7f1be8cbb33649d8d05e761bbf11e4eaa3" - integrity sha512-IOC77xL3+pYcAM+OVfcILKdrZNEy767JmpdVs2sq3I9+4JoHeKaJrmQXgbcXN2reUmzBw5b5m9Kd036Cr8ouBA== +globals@^13.6.0, globals@^13.9.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb" + integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA== + dependencies: + type-fest "^0.20.2" + +google-closure-compiler-java@^20210601.0.0: + version "20210601.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20210601.0.0.tgz#88dc11b334bee6a704d9674c5143fd2e0d553517" + integrity sha512-bH6nIwOmp4qDWvlbXx5/DE3XA2aDGQoCpmRYZJGONY1Sy6Xfbq0ioXRHH9eBDP9hxhCJ5Sd/K89A0NZ8Nz9RJA== + +google-closure-compiler-linux@^20210601.0.0: + version "20210601.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20210601.0.0.tgz#6e5dd7b00b96dc1fd1ba30e3401af85558768322" + integrity sha512-rnEQt7zz/1P1SfPhJiHQpfCgMPrsVVyEgDs09h67xn6+LXa9L0RP+hrJDEHqSWwjDPz0BkfUUv6zkqZvp1h/lw== + +google-closure-compiler-osx@^20210601.0.0: + version "20210601.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20210601.0.0.tgz#e23356bc9ef6e68c2980f60a207f603767b50b21" + integrity sha512-A5r4s/WthR2iLMM0mxsluw8EW2AcOomC5ri/H6FjzpMq0RVEnLTgaGYdXolUAfEzH/7XtJJT2+JkYk3HSLCtrg== + +google-closure-compiler-windows@^20210601.0.0: + version "20210601.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20210601.0.0.tgz#b5400d06bbf0bbd2602ee3ae0c2bc7ebd5829692" + integrity sha512-6r94bPShnB0XXh9+5/qXGDHJN2PQGhF9yJPcgBZj+FAZlQGzlYkT0pkyp+loZT3lG+YRbjD28Lgo7xMcY4xgkA== + +google-closure-compiler@20210601.0.0: + version "20210601.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20210601.0.0.tgz#34597c33c9285ebd3a5364f5299f6c9ddc9fc88a" + integrity sha512-lzzEoG2VTB7uUjnWnMyeZMU163w69HJpM27yh8Up9Ha5McHZeESjt3NRwU8cWMbCRdY06nFbRCDIVCRcadHCiw== dependencies: chalk "2.x" - google-closure-compiler-java "^20200920.0.0" + google-closure-compiler-java "^20210601.0.0" minimist "1.x" vinyl "2.x" vinyl-sourcemaps-apply "^0.2.0" optionalDependencies: - google-closure-compiler-linux "^20200920.0.0" - google-closure-compiler-osx "^20200920.0.0" - google-closure-compiler-windows "^20200920.0.0" + google-closure-compiler-linux "^20210601.0.0" + google-closure-compiler-osx "^20210601.0.0" + google-closure-compiler-windows "^20210601.0.0" has-ansi@^2.0.0: version "2.0.0" @@ -386,6 +726,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -396,18 +741,36 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -html-minifier-terser@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.0.2.tgz#0e67a0b062ae1dd0719fc73199479298f807ae16" - integrity sha512-VAaitmbBuHaPKv9bj47XKypRhgDxT/cDLvsPiiF7w+omrN3K0eQhpigV9Z1ilrmHa9e0rOYcD6R/+LCDADGcnQ== +html-minifier-terser@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" + integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg== dependencies: - camel-case "^3.0.0" - clean-css "^4.2.1" - commander "^4.0.0" + camel-case "^4.1.1" + clean-css "^4.2.3" + commander "^4.1.1" he "^1.2.0" - param-case "^2.1.1" + param-case "^3.0.3" relateurl "^0.2.7" - terser "^4.3.9" + terser "^4.6.3" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= inflight@^1.0.4: version "1.0.6" @@ -442,6 +805,11 @@ inquirer@^1.0.2: strip-ansi "^3.0.0" through "^2.3.6" +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -454,26 +822,89 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + isstream@0.1.x: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + lodash.difference@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw= +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.pad@^4.1.0: version "4.5.1" resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70" @@ -489,6 +920,11 @@ lodash.padstart@^4.1.0: resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -499,10 +935,19 @@ lodash@^4.17.14, lodash@^4.3.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lower-case@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" micromist@1.1.0: version "1.1.0" @@ -535,6 +980,11 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + mute-stream@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" @@ -545,12 +995,18 @@ nan@~1.0.0: resolved "https://registry.yarnpkg.com/nan/-/nan-1.0.0.tgz#ae24f8850818d662fcab5acf7f3b95bfaa2ccf38" integrity sha1-riT4hQgY1mL8q1rPfzuVv6oszzg= -no-case@^2.2.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== dependencies: - lower-case "^1.1.1" + lower-case "^2.0.2" + tslib "^2.0.3" npmlog@^2.0.3: version "2.0.4" @@ -583,6 +1039,18 @@ onetime@^1.0.0: resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + options@>=0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" @@ -598,18 +1066,39 @@ os-tmpdir@~1.0.1: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -param-case@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= +param-case@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: - no-case "^2.2.0" + callsites "^3.0.0" + +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -622,6 +1111,11 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prettyjson@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289" @@ -635,6 +1129,16 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.5: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -648,6 +1152,11 @@ readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" +regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + relateurl@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" @@ -663,6 +1172,16 @@ replace-ext@^1.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -671,6 +1190,13 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + run-async@^2.2.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -686,6 +1212,34 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +semver@^7.2.1: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + source-map-support@~0.5.12: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" @@ -694,12 +1248,7 @@ source-map-support@~0.5.12: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= - -source-map@^0.5.1: +source-map@0.5.7, source-map@^0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -717,6 +1266,11 @@ spawn-sync@^1.0.15: concat-stream "^1.4.7" os-shim "^0.1.2" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -739,6 +1293,15 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -760,6 +1323,18 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -772,6 +1347,25 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + tabtab@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/tabtab/-/tabtab-2.2.2.tgz#7a047f143b010b4cbd31f857e82961512cbf4e14" @@ -786,7 +1380,7 @@ tabtab@^2.2.2: npmlog "^2.0.3" object-assign "^4.1.0" -terser@^4.3.9: +terser@^4.6.3: version "4.8.0" resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== @@ -795,6 +1389,11 @@ terser@^4.3.9: source-map "~0.6.1" source-map-support "~0.5.12" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -812,21 +1411,45 @@ tmp@^0.0.29: dependencies: os-tmpdir "~1.0.1" +tslib@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -upper-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + vinyl-sourcemaps-apply@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" @@ -835,9 +1458,9 @@ vinyl-sourcemaps-apply@^0.2.0: source-map "^0.5.1" vinyl@2.x: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" - integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== + version "2.2.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" + integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== dependencies: clone "^2.1.1" clone-buffer "^1.0.0" @@ -851,6 +1474,13 @@ wasm2c@1.0.0: resolved "https://registry.yarnpkg.com/wasm2c/-/wasm2c-1.0.0.tgz#761671e141c46b8a7c6c54429db1e6bfa3cd0ec0" integrity sha512-4SIESF2JNxrry6XFa/UQcsQibn+bxPkQ/oqixiXz2o8fsMl8J4vtvhH/evgbi8vZajAlaukuihEcQTWb9tVLUA== +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + winston@^2.3.1: version "2.4.5" resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.5.tgz#f2e431d56154c4ea765545fc1003bd340c95b59a" @@ -863,6 +1493,11 @@ winston@^2.3.1: isstream "0.1.x" stack-trace "0.0.x" +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -877,3 +1512,8 @@ ws@~0.4.28: nan "~1.0.0" options ">=0.0.5" tinycolor "0.x" + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/nixpkgs/pkgs/development/compilers/emscripten/yarn.nix b/nixpkgs/pkgs/development/compilers/emscripten/yarn.nix index d0c3395f28af..e4281f4856ad 100644 --- a/nixpkgs/pkgs/development/compilers/emscripten/yarn.nix +++ b/nixpkgs/pkgs/development/compilers/emscripten/yarn.nix @@ -1,12 +1,52 @@ -{ fetchurl, fetchgit, linkFarm, runCommandNoCC, gnutar }: rec { +{ fetchurl, fetchgit, linkFarm, runCommand, gnutar }: rec { offline_cache = linkFarm "offline" packages; packages = [ { - name = "acorn___acorn_7.3.1.tgz"; + name = "_babel_code_frame___code_frame_7.12.11.tgz"; path = fetchurl { - name = "acorn___acorn_7.3.1.tgz"; - url = "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz"; - sha1 = "85010754db53c3fbaf3b9ea3e083aa5c5d147ffd"; + name = "_babel_code_frame___code_frame_7.12.11.tgz"; + url = "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz"; + sha1 = "f4ad435aa263db935b8f10f2c552d23fb716a63f"; + }; + } + { + name = "_babel_helper_validator_identifier___helper_validator_identifier_7.14.5.tgz"; + path = fetchurl { + name = "_babel_helper_validator_identifier___helper_validator_identifier_7.14.5.tgz"; + url = "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz"; + sha1 = "d0f0e277c512e0c938277faa85a3968c9a44c0e8"; + }; + } + { + name = "_babel_highlight___highlight_7.14.5.tgz"; + path = fetchurl { + name = "_babel_highlight___highlight_7.14.5.tgz"; + url = "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz"; + sha1 = "6861a52f03966405001f6aa534a01a24d99e8cd9"; + }; + } + { + name = "_eslint_eslintrc___eslintrc_0.4.2.tgz"; + path = fetchurl { + name = "_eslint_eslintrc___eslintrc_0.4.2.tgz"; + url = "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz"; + sha1 = "f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179"; + }; + } + { + name = "acorn_jsx___acorn_jsx_5.3.1.tgz"; + path = fetchurl { + name = "acorn_jsx___acorn_jsx_5.3.1.tgz"; + url = "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz"; + sha1 = "fc8661e11b7ac1539c47dbfea2e72b3af34d267b"; + }; + } + { + name = "acorn___acorn_8.4.1.tgz"; + path = fetchurl { + name = "acorn___acorn_8.4.1.tgz"; + url = "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz"; + sha1 = "56c36251fc7cabc7096adc18f05afe814321a28c"; }; } { @@ -18,6 +58,38 @@ }; } { + name = "acorn___acorn_7.4.1.tgz"; + path = fetchurl { + name = "acorn___acorn_7.4.1.tgz"; + url = "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz"; + sha1 = "feaed255973d2e77555b83dbc08851a6c63520fa"; + }; + } + { + name = "ajv___ajv_6.12.6.tgz"; + path = fetchurl { + name = "ajv___ajv_6.12.6.tgz"; + url = "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz"; + sha1 = "baf5a62e802b07d977034586f8c3baf5adf26df4"; + }; + } + { + name = "ajv___ajv_8.6.0.tgz"; + path = fetchurl { + name = "ajv___ajv_8.6.0.tgz"; + url = "https://registry.yarnpkg.com/ajv/-/ajv-8.6.0.tgz"; + sha1 = "60cc45d9c46a477d80d92c48076d972c342e5720"; + }; + } + { + name = "ansi_colors___ansi_colors_4.1.1.tgz"; + path = fetchurl { + name = "ansi_colors___ansi_colors_4.1.1.tgz"; + url = "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz"; + sha1 = "cbb9ae256bf750af1eab344f229aa27fe94ba348"; + }; + } + { name = "ansi_escapes___ansi_escapes_1.4.0.tgz"; path = fetchurl { name = "ansi_escapes___ansi_escapes_1.4.0.tgz"; @@ -42,6 +114,14 @@ }; } { + name = "ansi_regex___ansi_regex_5.0.0.tgz"; + path = fetchurl { + name = "ansi_regex___ansi_regex_5.0.0.tgz"; + url = "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz"; + sha1 = "388539f55179bf39339c81af30a654d69f87cb75"; + }; + } + { name = "ansi_styles___ansi_styles_2.2.1.tgz"; path = fetchurl { name = "ansi_styles___ansi_styles_2.2.1.tgz"; @@ -58,6 +138,14 @@ }; } { + name = "ansi_styles___ansi_styles_4.3.0.tgz"; + path = fetchurl { + name = "ansi_styles___ansi_styles_4.3.0.tgz"; + url = "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz"; + sha1 = "edd803628ae71c04c85ae7a0906edad34b648937"; + }; + } + { name = "ansi___ansi_0.3.1.tgz"; path = fetchurl { name = "ansi___ansi_0.3.1.tgz"; @@ -74,6 +162,22 @@ }; } { + name = "argparse___argparse_1.0.10.tgz"; + path = fetchurl { + name = "argparse___argparse_1.0.10.tgz"; + url = "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz"; + sha1 = "bcd6791ea5ae09725e17e5ad988134cd40b3d911"; + }; + } + { + name = "astral_regex___astral_regex_2.0.0.tgz"; + path = fetchurl { + name = "astral_regex___astral_regex_2.0.0.tgz"; + url = "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz"; + sha1 = "483143c567aeed4785759c0865786dc77d7d2e31"; + }; + } + { name = "async___async_1.0.0.tgz"; path = fetchurl { name = "async___async_1.0.0.tgz"; @@ -114,11 +218,19 @@ }; } { - name = "camel_case___camel_case_3.0.0.tgz"; + name = "callsites___callsites_3.1.0.tgz"; + path = fetchurl { + name = "callsites___callsites_3.1.0.tgz"; + url = "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz"; + sha1 = "b3630abd8943432f54b3f0519238e33cd7df2f73"; + }; + } + { + name = "camel_case___camel_case_4.1.2.tgz"; path = fetchurl { - name = "camel_case___camel_case_3.0.0.tgz"; - url = "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz"; - sha1 = "ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73"; + name = "camel_case___camel_case_4.1.2.tgz"; + url = "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz"; + sha1 = "9728072a954f805228225a6deea6b38461e1bd5a"; }; } { @@ -146,6 +258,14 @@ }; } { + name = "chalk___chalk_4.1.1.tgz"; + path = fetchurl { + name = "chalk___chalk_4.1.1.tgz"; + url = "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz"; + sha1 = "c80b3fab28bf6371e6863325eee67e618b77e6ad"; + }; + } + { name = "clean_css___clean_css_4.2.3.tgz"; path = fetchurl { name = "clean_css___clean_css_4.2.3.tgz"; @@ -226,6 +346,14 @@ }; } { + name = "color_convert___color_convert_2.0.1.tgz"; + path = fetchurl { + name = "color_convert___color_convert_2.0.1.tgz"; + url = "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz"; + sha1 = "72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"; + }; + } + { name = "color_name___color_name_1.1.3.tgz"; path = fetchurl { name = "color_name___color_name_1.1.3.tgz"; @@ -234,6 +362,14 @@ }; } { + name = "color_name___color_name_1.1.4.tgz"; + path = fetchurl { + name = "color_name___color_name_1.1.4.tgz"; + url = "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz"; + sha1 = "c2a09a87acbde69543de6f63fa3995c826c536a2"; + }; + } + { name = "colorette___colorette_1.2.2.tgz"; path = fetchurl { name = "colorette___colorette_1.2.2.tgz"; @@ -306,6 +442,14 @@ }; } { + name = "cross_spawn___cross_spawn_7.0.3.tgz"; + path = fetchurl { + name = "cross_spawn___cross_spawn_7.0.3.tgz"; + url = "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz"; + sha1 = "f73a85b9d5d41d045551c177e2882d4ac85728a6"; + }; + } + { name = "cycle___cycle_1.0.3.tgz"; path = fetchurl { name = "cycle___cycle_1.0.3.tgz"; @@ -322,6 +466,22 @@ }; } { + name = "debug___debug_4.3.1.tgz"; + path = fetchurl { + name = "debug___debug_4.3.1.tgz"; + url = "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz"; + sha1 = "f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"; + }; + } + { + name = "deep_is___deep_is_0.1.3.tgz"; + path = fetchurl { + name = "deep_is___deep_is_0.1.3.tgz"; + url = "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz"; + sha1 = "b369d6fb5dbc13eecf524f91b070feedc357cf34"; + }; + } + { name = "delegates___delegates_1.0.0.tgz"; path = fetchurl { name = "delegates___delegates_1.0.0.tgz"; @@ -330,6 +490,38 @@ }; } { + name = "doctrine___doctrine_3.0.0.tgz"; + path = fetchurl { + name = "doctrine___doctrine_3.0.0.tgz"; + url = "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz"; + sha1 = "addebead72a6574db783639dc87a121773973961"; + }; + } + { + name = "dot_case___dot_case_3.0.4.tgz"; + path = fetchurl { + name = "dot_case___dot_case_3.0.4.tgz"; + url = "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz"; + sha1 = "9b2b670d00a431667a8a75ba29cd1b98809ce751"; + }; + } + { + name = "emoji_regex___emoji_regex_8.0.0.tgz"; + path = fetchurl { + name = "emoji_regex___emoji_regex_8.0.0.tgz"; + url = "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz"; + sha1 = "e818fd69ce5ccfcb404594f842963bf53164cc37"; + }; + } + { + name = "enquirer___enquirer_2.3.6.tgz"; + path = fetchurl { + name = "enquirer___enquirer_2.3.6.tgz"; + url = "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz"; + sha1 = "2a7fe5dd634a1e4125a975ec994ff5456dc3734d"; + }; + } + { name = "es_check___es_check_5.2.4.tgz"; path = fetchurl { name = "es_check___es_check_5.2.4.tgz"; @@ -346,6 +538,118 @@ }; } { + name = "escape_string_regexp___escape_string_regexp_4.0.0.tgz"; + path = fetchurl { + name = "escape_string_regexp___escape_string_regexp_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz"; + sha1 = "14ba83a5d373e3d311e5afca29cf5bfad965bf34"; + }; + } + { + name = "eslint_config_google___eslint_config_google_0.14.0.tgz"; + path = fetchurl { + name = "eslint_config_google___eslint_config_google_0.14.0.tgz"; + url = "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz"; + sha1 = "4f5f8759ba6e11b424294a219dbfa18c508bcc1a"; + }; + } + { + name = "eslint_scope___eslint_scope_5.1.1.tgz"; + path = fetchurl { + name = "eslint_scope___eslint_scope_5.1.1.tgz"; + url = "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz"; + sha1 = "e786e59a66cb92b3f6c1fb0d508aab174848f48c"; + }; + } + { + name = "eslint_utils___eslint_utils_2.1.0.tgz"; + path = fetchurl { + name = "eslint_utils___eslint_utils_2.1.0.tgz"; + url = "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz"; + sha1 = "d2de5e03424e707dc10c74068ddedae708741b27"; + }; + } + { + name = "eslint_visitor_keys___eslint_visitor_keys_1.3.0.tgz"; + path = fetchurl { + name = "eslint_visitor_keys___eslint_visitor_keys_1.3.0.tgz"; + url = "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz"; + sha1 = "30ebd1ef7c2fdff01c3a4f151044af25fab0523e"; + }; + } + { + name = "eslint_visitor_keys___eslint_visitor_keys_2.1.0.tgz"; + path = fetchurl { + name = "eslint_visitor_keys___eslint_visitor_keys_2.1.0.tgz"; + url = "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz"; + sha1 = "f65328259305927392c938ed44eb0a5c9b2bd303"; + }; + } + { + name = "eslint___eslint_7.29.0.tgz"; + path = fetchurl { + name = "eslint___eslint_7.29.0.tgz"; + url = "https://registry.yarnpkg.com/eslint/-/eslint-7.29.0.tgz"; + sha1 = "ee2a7648f2e729485e4d0bd6383ec1deabc8b3c0"; + }; + } + { + name = "espree___espree_7.3.1.tgz"; + path = fetchurl { + name = "espree___espree_7.3.1.tgz"; + url = "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz"; + sha1 = "f2df330b752c6f55019f8bd89b7660039c1bbbb6"; + }; + } + { + name = "esprima___esprima_4.0.1.tgz"; + path = fetchurl { + name = "esprima___esprima_4.0.1.tgz"; + url = "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz"; + sha1 = "13b04cdb3e6c5d19df91ab6987a8695619b0aa71"; + }; + } + { + name = "esquery___esquery_1.4.0.tgz"; + path = fetchurl { + name = "esquery___esquery_1.4.0.tgz"; + url = "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz"; + sha1 = "2148ffc38b82e8c7057dfed48425b3e61f0f24a5"; + }; + } + { + name = "esrecurse___esrecurse_4.3.0.tgz"; + path = fetchurl { + name = "esrecurse___esrecurse_4.3.0.tgz"; + url = "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz"; + sha1 = "7ad7964d679abb28bee72cec63758b1c5d2c9921"; + }; + } + { + name = "estraverse___estraverse_4.3.0.tgz"; + path = fetchurl { + name = "estraverse___estraverse_4.3.0.tgz"; + url = "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz"; + sha1 = "398ad3f3c5a24948be7725e83d11a7de28cdbd1d"; + }; + } + { + name = "estraverse___estraverse_5.2.0.tgz"; + path = fetchurl { + name = "estraverse___estraverse_5.2.0.tgz"; + url = "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz"; + sha1 = "307df42547e6cc7324d3cf03c155d5cdb8c53880"; + }; + } + { + name = "esutils___esutils_2.0.3.tgz"; + path = fetchurl { + name = "esutils___esutils_2.0.3.tgz"; + url = "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz"; + sha1 = "74d2eb4de0b8da1293711910d50775b9b710ef64"; + }; + } + { name = "exit_hook___exit_hook_1.1.1.tgz"; path = fetchurl { name = "exit_hook___exit_hook_1.1.1.tgz"; @@ -378,6 +682,22 @@ }; } { + name = "fast_deep_equal___fast_deep_equal_3.1.3.tgz"; + path = fetchurl { + name = "fast_deep_equal___fast_deep_equal_3.1.3.tgz"; + url = "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"; + sha1 = "3a7d56b559d6cbc3eb512325244e619a65c6c525"; + }; + } + { + name = "fast_json_stable_stringify___fast_json_stable_stringify_2.1.0.tgz"; + path = fetchurl { + name = "fast_json_stable_stringify___fast_json_stable_stringify_2.1.0.tgz"; + url = "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"; + sha1 = "874bf69c6f404c2b5d99c481341399fd55892633"; + }; + } + { name = "fast_levenshtein___fast_levenshtein_2.0.6.tgz"; path = fetchurl { name = "fast_levenshtein___fast_levenshtein_2.0.6.tgz"; @@ -394,6 +714,30 @@ }; } { + name = "file_entry_cache___file_entry_cache_6.0.1.tgz"; + path = fetchurl { + name = "file_entry_cache___file_entry_cache_6.0.1.tgz"; + url = "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz"; + sha1 = "211b2dd9659cb0394b073e7323ac3c933d522027"; + }; + } + { + name = "flat_cache___flat_cache_3.0.4.tgz"; + path = fetchurl { + name = "flat_cache___flat_cache_3.0.4.tgz"; + url = "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz"; + sha1 = "61b0338302b2fe9f957dcc32fc2a87f1c3048b11"; + }; + } + { + name = "flatted___flatted_3.1.1.tgz"; + path = fetchurl { + name = "flatted___flatted_3.1.1.tgz"; + url = "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz"; + sha1 = "c4b489e80096d9df1dfc97c79871aea7c617c469"; + }; + } + { name = "fs.realpath___fs.realpath_1.0.0.tgz"; path = fetchurl { name = "fs.realpath___fs.realpath_1.0.0.tgz"; @@ -402,6 +746,14 @@ }; } { + name = "functional_red_black_tree___functional_red_black_tree_1.0.1.tgz"; + path = fetchurl { + name = "functional_red_black_tree___functional_red_black_tree_1.0.1.tgz"; + url = "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz"; + sha1 = "1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"; + }; + } + { name = "gauge___gauge_1.2.7.tgz"; path = fetchurl { name = "gauge___gauge_1.2.7.tgz"; @@ -410,6 +762,14 @@ }; } { + name = "glob_parent___glob_parent_5.1.2.tgz"; + path = fetchurl { + name = "glob_parent___glob_parent_5.1.2.tgz"; + url = "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz"; + sha1 = "869832c58034fe68a4093c17dc15e8340d8401c4"; + }; + } + { name = "glob___glob_7.1.7.tgz"; path = fetchurl { name = "glob___glob_7.1.7.tgz"; @@ -418,43 +778,51 @@ }; } { - name = "google_closure_compiler_java___google_closure_compiler_java_20200920.0.0.tgz"; + name = "globals___globals_13.9.0.tgz"; path = fetchurl { - name = "google_closure_compiler_java___google_closure_compiler_java_20200920.0.0.tgz"; - url = "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20200920.0.0.tgz"; - sha1 = "23519b14e004f2a9eda4f5b887842ae46ad7022e"; + name = "globals___globals_13.9.0.tgz"; + url = "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz"; + sha1 = "4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb"; }; } { - name = "google_closure_compiler_linux___google_closure_compiler_linux_20200920.0.0.tgz"; + name = "google_closure_compiler_java___google_closure_compiler_java_20210601.0.0.tgz"; path = fetchurl { - name = "google_closure_compiler_linux___google_closure_compiler_linux_20200920.0.0.tgz"; - url = "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20200920.0.0.tgz"; - sha1 = "622c28a784e8a93f9cc5e7cd7b675d2ed0e11d0b"; + name = "google_closure_compiler_java___google_closure_compiler_java_20210601.0.0.tgz"; + url = "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20210601.0.0.tgz"; + sha1 = "88dc11b334bee6a704d9674c5143fd2e0d553517"; }; } { - name = "google_closure_compiler_osx___google_closure_compiler_osx_20200920.0.0.tgz"; + name = "google_closure_compiler_linux___google_closure_compiler_linux_20210601.0.0.tgz"; path = fetchurl { - name = "google_closure_compiler_osx___google_closure_compiler_osx_20200920.0.0.tgz"; - url = "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20200920.0.0.tgz"; - sha1 = "6157a06e7d851d25d60de95c4bcd464d768278b1"; + name = "google_closure_compiler_linux___google_closure_compiler_linux_20210601.0.0.tgz"; + url = "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20210601.0.0.tgz"; + sha1 = "6e5dd7b00b96dc1fd1ba30e3401af85558768322"; }; } { - name = "google_closure_compiler_windows___google_closure_compiler_windows_20200920.0.0.tgz"; + name = "google_closure_compiler_osx___google_closure_compiler_osx_20210601.0.0.tgz"; path = fetchurl { - name = "google_closure_compiler_windows___google_closure_compiler_windows_20200920.0.0.tgz"; - url = "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20200920.0.0.tgz"; - sha1 = "755ddeb8032530c6ed13962e328d9af3269d0748"; + name = "google_closure_compiler_osx___google_closure_compiler_osx_20210601.0.0.tgz"; + url = "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20210601.0.0.tgz"; + sha1 = "e23356bc9ef6e68c2980f60a207f603767b50b21"; }; } { - name = "google_closure_compiler___google_closure_compiler_20200920.0.0.tgz"; + name = "google_closure_compiler_windows___google_closure_compiler_windows_20210601.0.0.tgz"; path = fetchurl { - name = "google_closure_compiler___google_closure_compiler_20200920.0.0.tgz"; - url = "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20200920.0.0.tgz"; - sha1 = "e1c54b7f1be8cbb33649d8d05e761bbf11e4eaa3"; + name = "google_closure_compiler_windows___google_closure_compiler_windows_20210601.0.0.tgz"; + url = "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20210601.0.0.tgz"; + sha1 = "b5400d06bbf0bbd2602ee3ae0c2bc7ebd5829692"; + }; + } + { + name = "google_closure_compiler___google_closure_compiler_20210601.0.0.tgz"; + path = fetchurl { + name = "google_closure_compiler___google_closure_compiler_20210601.0.0.tgz"; + url = "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20210601.0.0.tgz"; + sha1 = "34597c33c9285ebd3a5364f5299f6c9ddc9fc88a"; }; } { @@ -474,6 +842,14 @@ }; } { + name = "has_flag___has_flag_4.0.0.tgz"; + path = fetchurl { + name = "has_flag___has_flag_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz"; + sha1 = "944771fd9c81c81265c4d6941860da06bb59479b"; + }; + } + { name = "has_unicode___has_unicode_2.0.1.tgz"; path = fetchurl { name = "has_unicode___has_unicode_2.0.1.tgz"; @@ -490,11 +866,35 @@ }; } { - name = "html_minifier_terser___html_minifier_terser_5.0.2.tgz"; + name = "html_minifier_terser___html_minifier_terser_5.1.1.tgz"; + path = fetchurl { + name = "html_minifier_terser___html_minifier_terser_5.1.1.tgz"; + url = "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz"; + sha1 = "922e96f1f3bb60832c2634b79884096389b1f054"; + }; + } + { + name = "ignore___ignore_4.0.6.tgz"; path = fetchurl { - name = "html_minifier_terser___html_minifier_terser_5.0.2.tgz"; - url = "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.0.2.tgz"; - sha1 = "0e67a0b062ae1dd0719fc73199479298f807ae16"; + name = "ignore___ignore_4.0.6.tgz"; + url = "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz"; + sha1 = "750e3db5862087b4737ebac8207ffd1ef27b25fc"; + }; + } + { + name = "import_fresh___import_fresh_3.3.0.tgz"; + path = fetchurl { + name = "import_fresh___import_fresh_3.3.0.tgz"; + url = "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz"; + sha1 = "37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"; + }; + } + { + name = "imurmurhash___imurmurhash_0.1.4.tgz"; + path = fetchurl { + name = "imurmurhash___imurmurhash_0.1.4.tgz"; + url = "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz"; + sha1 = "9218b9b2b928a238b13dc4fb6b6d576f231453ea"; }; } { @@ -522,6 +922,14 @@ }; } { + name = "is_extglob___is_extglob_2.1.1.tgz"; + path = fetchurl { + name = "is_extglob___is_extglob_2.1.1.tgz"; + url = "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz"; + sha1 = "a88c02535791f02ed37c76a1b9ea9773c833f8c2"; + }; + } + { name = "is_fullwidth_code_point___is_fullwidth_code_point_1.0.0.tgz"; path = fetchurl { name = "is_fullwidth_code_point___is_fullwidth_code_point_1.0.0.tgz"; @@ -538,6 +946,22 @@ }; } { + name = "is_fullwidth_code_point___is_fullwidth_code_point_3.0.0.tgz"; + path = fetchurl { + name = "is_fullwidth_code_point___is_fullwidth_code_point_3.0.0.tgz"; + url = "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"; + sha1 = "f116f8064fe90b3f7844a38997c0b75051269f1d"; + }; + } + { + name = "is_glob___is_glob_4.0.1.tgz"; + path = fetchurl { + name = "is_glob___is_glob_4.0.1.tgz"; + url = "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz"; + sha1 = "7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"; + }; + } + { name = "isarray___isarray_1.0.0.tgz"; path = fetchurl { name = "isarray___isarray_1.0.0.tgz"; @@ -546,6 +970,14 @@ }; } { + name = "isexe___isexe_2.0.0.tgz"; + path = fetchurl { + name = "isexe___isexe_2.0.0.tgz"; + url = "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz"; + sha1 = "e8fbf374dc556ff8947a10dcb0572d633f2cfa10"; + }; + } + { name = "isstream___isstream_0.1.2.tgz"; path = fetchurl { name = "isstream___isstream_0.1.2.tgz"; @@ -554,6 +986,54 @@ }; } { + name = "js_tokens___js_tokens_4.0.0.tgz"; + path = fetchurl { + name = "js_tokens___js_tokens_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz"; + sha1 = "19203fb59991df98e3a287050d4647cdeaf32499"; + }; + } + { + name = "js_yaml___js_yaml_3.14.1.tgz"; + path = fetchurl { + name = "js_yaml___js_yaml_3.14.1.tgz"; + url = "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz"; + sha1 = "dae812fdb3825fa306609a8717383c50c36a0537"; + }; + } + { + name = "json_schema_traverse___json_schema_traverse_0.4.1.tgz"; + path = fetchurl { + name = "json_schema_traverse___json_schema_traverse_0.4.1.tgz"; + url = "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"; + sha1 = "69f6a87d9513ab8bb8fe63bdb0979c448e684660"; + }; + } + { + name = "json_schema_traverse___json_schema_traverse_1.0.0.tgz"; + path = fetchurl { + name = "json_schema_traverse___json_schema_traverse_1.0.0.tgz"; + url = "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz"; + sha1 = "ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"; + }; + } + { + name = "json_stable_stringify_without_jsonify___json_stable_stringify_without_jsonify_1.0.1.tgz"; + path = fetchurl { + name = "json_stable_stringify_without_jsonify___json_stable_stringify_without_jsonify_1.0.1.tgz"; + url = "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"; + sha1 = "9db7b59496ad3f3cfef30a75142d2d930ad72651"; + }; + } + { + name = "levn___levn_0.4.1.tgz"; + path = fetchurl { + name = "levn___levn_0.4.1.tgz"; + url = "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz"; + sha1 = "ae4562c007473b932a6200d403268dd2fffc6ade"; + }; + } + { name = "lodash.camelcase___lodash.camelcase_4.3.0.tgz"; path = fetchurl { name = "lodash.camelcase___lodash.camelcase_4.3.0.tgz"; @@ -562,6 +1042,14 @@ }; } { + name = "lodash.clonedeep___lodash.clonedeep_4.5.0.tgz"; + path = fetchurl { + name = "lodash.clonedeep___lodash.clonedeep_4.5.0.tgz"; + url = "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz"; + sha1 = "e23f3f9c4f8fbdde872529c1071857a086e5ccef"; + }; + } + { name = "lodash.difference___lodash.difference_4.5.0.tgz"; path = fetchurl { name = "lodash.difference___lodash.difference_4.5.0.tgz"; @@ -570,6 +1058,14 @@ }; } { + name = "lodash.merge___lodash.merge_4.6.2.tgz"; + path = fetchurl { + name = "lodash.merge___lodash.merge_4.6.2.tgz"; + url = "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz"; + sha1 = "558aa53b43b661e1925a0afdfa36a9a1085fe57a"; + }; + } + { name = "lodash.pad___lodash.pad_4.5.1.tgz"; path = fetchurl { name = "lodash.pad___lodash.pad_4.5.1.tgz"; @@ -594,6 +1090,14 @@ }; } { + name = "lodash.truncate___lodash.truncate_4.4.2.tgz"; + path = fetchurl { + name = "lodash.truncate___lodash.truncate_4.4.2.tgz"; + url = "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz"; + sha1 = "5a350da0b1113b837ecfffd5812cbe58d6eae193"; + }; + } + { name = "lodash.uniq___lodash.uniq_4.5.0.tgz"; path = fetchurl { name = "lodash.uniq___lodash.uniq_4.5.0.tgz"; @@ -610,11 +1114,19 @@ }; } { - name = "lower_case___lower_case_1.1.4.tgz"; + name = "lower_case___lower_case_2.0.2.tgz"; path = fetchurl { - name = "lower_case___lower_case_1.1.4.tgz"; - url = "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz"; - sha1 = "9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"; + name = "lower_case___lower_case_2.0.2.tgz"; + url = "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz"; + sha1 = "6fa237c63dbdc4a82ca0fd882e4722dc5e634e28"; + }; + } + { + name = "lru_cache___lru_cache_6.0.0.tgz"; + path = fetchurl { + name = "lru_cache___lru_cache_6.0.0.tgz"; + url = "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz"; + sha1 = "6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"; }; } { @@ -658,6 +1170,14 @@ }; } { + name = "ms___ms_2.1.2.tgz"; + path = fetchurl { + name = "ms___ms_2.1.2.tgz"; + url = "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz"; + sha1 = "d09d1f357b443f493382a8eb3ccd183872ae6009"; + }; + } + { name = "mute_stream___mute_stream_0.0.6.tgz"; path = fetchurl { name = "mute_stream___mute_stream_0.0.6.tgz"; @@ -674,11 +1194,19 @@ }; } { - name = "no_case___no_case_2.3.2.tgz"; + name = "natural_compare___natural_compare_1.4.0.tgz"; + path = fetchurl { + name = "natural_compare___natural_compare_1.4.0.tgz"; + url = "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz"; + sha1 = "4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"; + }; + } + { + name = "no_case___no_case_3.0.4.tgz"; path = fetchurl { - name = "no_case___no_case_2.3.2.tgz"; - url = "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz"; - sha1 = "60b813396be39b3f1288a4c1ed5d1e7d28b464ac"; + name = "no_case___no_case_3.0.4.tgz"; + url = "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz"; + sha1 = "d361fd5c9800f558551a8369fc0dcd4662b6124d"; }; } { @@ -722,6 +1250,14 @@ }; } { + name = "optionator___optionator_0.9.1.tgz"; + path = fetchurl { + name = "optionator___optionator_0.9.1.tgz"; + url = "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz"; + sha1 = "4f236a6373dae0566a6d43e1326674f50c291499"; + }; + } + { name = "options___options_0.0.6.tgz"; path = fetchurl { name = "options___options_0.0.6.tgz"; @@ -746,11 +1282,27 @@ }; } { - name = "param_case___param_case_2.1.1.tgz"; + name = "param_case___param_case_3.0.4.tgz"; + path = fetchurl { + name = "param_case___param_case_3.0.4.tgz"; + url = "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz"; + sha1 = "7d17fe4aa12bde34d4a77d91acfb6219caad01c5"; + }; + } + { + name = "parent_module___parent_module_1.0.1.tgz"; + path = fetchurl { + name = "parent_module___parent_module_1.0.1.tgz"; + url = "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz"; + sha1 = "691d2709e78c79fae3a156622452d00762caaaa2"; + }; + } + { + name = "pascal_case___pascal_case_3.1.2.tgz"; path = fetchurl { - name = "param_case___param_case_2.1.1.tgz"; - url = "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz"; - sha1 = "df94fd8cf6531ecf75e6bef9a0858fbc72be2247"; + name = "pascal_case___pascal_case_3.1.2.tgz"; + url = "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz"; + sha1 = "b48e0ef2b98e205e7c1dae747d0b1508237660eb"; }; } { @@ -762,6 +1314,14 @@ }; } { + name = "path_key___path_key_3.1.1.tgz"; + path = fetchurl { + name = "path_key___path_key_3.1.1.tgz"; + url = "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz"; + sha1 = "581f6ade658cbba65a0d3380de7753295054f375"; + }; + } + { name = "pinkie_promise___pinkie_promise_2.0.1.tgz"; path = fetchurl { name = "pinkie_promise___pinkie_promise_2.0.1.tgz"; @@ -778,6 +1338,14 @@ }; } { + name = "prelude_ls___prelude_ls_1.2.1.tgz"; + path = fetchurl { + name = "prelude_ls___prelude_ls_1.2.1.tgz"; + url = "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz"; + sha1 = "debc6489d7a6e6b0e7611888cec880337d316396"; + }; + } + { name = "prettyjson___prettyjson_1.2.1.tgz"; path = fetchurl { name = "prettyjson___prettyjson_1.2.1.tgz"; @@ -794,6 +1362,22 @@ }; } { + name = "progress___progress_2.0.3.tgz"; + path = fetchurl { + name = "progress___progress_2.0.3.tgz"; + url = "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz"; + sha1 = "7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"; + }; + } + { + name = "punycode___punycode_2.1.1.tgz"; + path = fetchurl { + name = "punycode___punycode_2.1.1.tgz"; + url = "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz"; + sha1 = "b58b010ac40c22c5657616c8d2c2c02c7bf479ec"; + }; + } + { name = "readable_stream___readable_stream_2.3.7.tgz"; path = fetchurl { name = "readable_stream___readable_stream_2.3.7.tgz"; @@ -802,6 +1386,14 @@ }; } { + name = "regexpp___regexpp_3.2.0.tgz"; + path = fetchurl { + name = "regexpp___regexpp_3.2.0.tgz"; + url = "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz"; + sha1 = "0425a2768d8f23bad70ca4b90461fa2f1213e1b2"; + }; + } + { name = "relateurl___relateurl_0.2.7.tgz"; path = fetchurl { name = "relateurl___relateurl_0.2.7.tgz"; @@ -826,6 +1418,22 @@ }; } { + name = "require_from_string___require_from_string_2.0.2.tgz"; + path = fetchurl { + name = "require_from_string___require_from_string_2.0.2.tgz"; + url = "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz"; + sha1 = "89a7fdd938261267318eafe14f9c32e598c36909"; + }; + } + { + name = "resolve_from___resolve_from_4.0.0.tgz"; + path = fetchurl { + name = "resolve_from___resolve_from_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz"; + sha1 = "4abcd852ad32dd7baabfe9b40e00a36db5f392e6"; + }; + } + { name = "restore_cursor___restore_cursor_1.0.1.tgz"; path = fetchurl { name = "restore_cursor___restore_cursor_1.0.1.tgz"; @@ -834,6 +1442,14 @@ }; } { + name = "rimraf___rimraf_3.0.2.tgz"; + path = fetchurl { + name = "rimraf___rimraf_3.0.2.tgz"; + url = "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz"; + sha1 = "f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"; + }; + } + { name = "run_async___run_async_2.4.1.tgz"; path = fetchurl { name = "run_async___run_async_2.4.1.tgz"; @@ -858,19 +1474,43 @@ }; } { - name = "source_map_support___source_map_support_0.5.19.tgz"; + name = "semver___semver_7.3.5.tgz"; path = fetchurl { - name = "source_map_support___source_map_support_0.5.19.tgz"; - url = "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz"; - sha1 = "a98b62f86dcaf4f67399648c085291ab9e8fed61"; + name = "semver___semver_7.3.5.tgz"; + url = "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz"; + sha1 = "0b621c879348d8998e4b0e4be94b3f12e6018ef7"; }; } { - name = "source_map___source_map_0.5.6.tgz"; + name = "shebang_command___shebang_command_2.0.0.tgz"; path = fetchurl { - name = "source_map___source_map_0.5.6.tgz"; - url = "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz"; - sha1 = "75ce38f52bf0733c5a7f0c118d81334a2bb5f412"; + name = "shebang_command___shebang_command_2.0.0.tgz"; + url = "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz"; + sha1 = "ccd0af4f8835fbdc265b82461aaf0c36663f34ea"; + }; + } + { + name = "shebang_regex___shebang_regex_3.0.0.tgz"; + path = fetchurl { + name = "shebang_regex___shebang_regex_3.0.0.tgz"; + url = "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz"; + sha1 = "ae16f1644d873ecad843b0307b143362d4c42172"; + }; + } + { + name = "slice_ansi___slice_ansi_4.0.0.tgz"; + path = fetchurl { + name = "slice_ansi___slice_ansi_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz"; + sha1 = "500e8dd0fd55b05815086255b3195adf2a45fe6b"; + }; + } + { + name = "source_map_support___source_map_support_0.5.19.tgz"; + path = fetchurl { + name = "source_map_support___source_map_support_0.5.19.tgz"; + url = "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz"; + sha1 = "a98b62f86dcaf4f67399648c085291ab9e8fed61"; }; } { @@ -898,6 +1538,14 @@ }; } { + name = "sprintf_js___sprintf_js_1.0.3.tgz"; + path = fetchurl { + name = "sprintf_js___sprintf_js_1.0.3.tgz"; + url = "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz"; + sha1 = "04e6926f662895354f3dd015203633b857297e2c"; + }; + } + { name = "stack_trace___stack_trace_0.0.10.tgz"; path = fetchurl { name = "stack_trace___stack_trace_0.0.10.tgz"; @@ -922,6 +1570,14 @@ }; } { + name = "string_width___string_width_4.2.2.tgz"; + path = fetchurl { + name = "string_width___string_width_4.2.2.tgz"; + url = "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz"; + sha1 = "dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"; + }; + } + { name = "string_decoder___string_decoder_1.1.1.tgz"; path = fetchurl { name = "string_decoder___string_decoder_1.1.1.tgz"; @@ -946,6 +1602,22 @@ }; } { + name = "strip_ansi___strip_ansi_6.0.0.tgz"; + path = fetchurl { + name = "strip_ansi___strip_ansi_6.0.0.tgz"; + url = "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz"; + sha1 = "0b1571dd7669ccd4f3e06e14ef1eed26225ae532"; + }; + } + { + name = "strip_json_comments___strip_json_comments_3.1.1.tgz"; + path = fetchurl { + name = "strip_json_comments___strip_json_comments_3.1.1.tgz"; + url = "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz"; + sha1 = "31f1281b3832630434831c310c01cccda8cbe006"; + }; + } + { name = "supports_color___supports_color_2.0.0.tgz"; path = fetchurl { name = "supports_color___supports_color_2.0.0.tgz"; @@ -962,6 +1634,22 @@ }; } { + name = "supports_color___supports_color_7.2.0.tgz"; + path = fetchurl { + name = "supports_color___supports_color_7.2.0.tgz"; + url = "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz"; + sha1 = "1b7dcdcb32b8138801b3e478ba6a51caa89648da"; + }; + } + { + name = "table___table_6.7.1.tgz"; + path = fetchurl { + name = "table___table_6.7.1.tgz"; + url = "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz"; + sha1 = "ee05592b7143831a8c94f3cee6aae4c1ccef33e2"; + }; + } + { name = "tabtab___tabtab_2.2.2.tgz"; path = fetchurl { name = "tabtab___tabtab_2.2.2.tgz"; @@ -978,6 +1666,14 @@ }; } { + name = "text_table___text_table_0.2.0.tgz"; + path = fetchurl { + name = "text_table___text_table_0.2.0.tgz"; + url = "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz"; + sha1 = "7f5ee823ae805207c00af2df4a84ec3fcfa570b4"; + }; + } + { name = "through___through_2.3.8.tgz"; path = fetchurl { name = "through___through_2.3.8.tgz"; @@ -1002,6 +1698,30 @@ }; } { + name = "tslib___tslib_2.3.0.tgz"; + path = fetchurl { + name = "tslib___tslib_2.3.0.tgz"; + url = "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz"; + sha1 = "803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"; + }; + } + { + name = "type_check___type_check_0.4.0.tgz"; + path = fetchurl { + name = "type_check___type_check_0.4.0.tgz"; + url = "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz"; + sha1 = "07b8203bfa7056c0657050e3ccd2c37730bab8f1"; + }; + } + { + name = "type_fest___type_fest_0.20.2.tgz"; + path = fetchurl { + name = "type_fest___type_fest_0.20.2.tgz"; + url = "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz"; + sha1 = "1bf207f4b28f91583666cb5fbd327887301cd5f4"; + }; + } + { name = "typedarray___typedarray_0.0.6.tgz"; path = fetchurl { name = "typedarray___typedarray_0.0.6.tgz"; @@ -1010,11 +1730,11 @@ }; } { - name = "upper_case___upper_case_1.1.3.tgz"; + name = "uri_js___uri_js_4.4.1.tgz"; path = fetchurl { - name = "upper_case___upper_case_1.1.3.tgz"; - url = "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz"; - sha1 = "f6b4501c2ec4cdd26ba78be7222961de77621598"; + name = "uri_js___uri_js_4.4.1.tgz"; + url = "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz"; + sha1 = "9b1a52595225859e55f669d928f88c6c57f2a77e"; }; } { @@ -1026,6 +1746,14 @@ }; } { + name = "v8_compile_cache___v8_compile_cache_2.3.0.tgz"; + path = fetchurl { + name = "v8_compile_cache___v8_compile_cache_2.3.0.tgz"; + url = "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz"; + sha1 = "2de19618c66dc247dcfb6f99338035d8245a2cee"; + }; + } + { name = "vinyl_sourcemaps_apply___vinyl_sourcemaps_apply_0.2.1.tgz"; path = fetchurl { name = "vinyl_sourcemaps_apply___vinyl_sourcemaps_apply_0.2.1.tgz"; @@ -1034,11 +1762,11 @@ }; } { - name = "vinyl___vinyl_2.2.0.tgz"; + name = "vinyl___vinyl_2.2.1.tgz"; path = fetchurl { - name = "vinyl___vinyl_2.2.0.tgz"; - url = "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz"; - sha1 = "d85b07da96e458d25b2ffe19fece9f2caa13ed86"; + name = "vinyl___vinyl_2.2.1.tgz"; + url = "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz"; + sha1 = "23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974"; }; } { @@ -1050,6 +1778,14 @@ }; } { + name = "which___which_2.0.2.tgz"; + path = fetchurl { + name = "which___which_2.0.2.tgz"; + url = "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz"; + sha1 = "7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"; + }; + } + { name = "winston___winston_2.4.5.tgz"; path = fetchurl { name = "winston___winston_2.4.5.tgz"; @@ -1058,6 +1794,14 @@ }; } { + name = "word_wrap___word_wrap_1.2.3.tgz"; + path = fetchurl { + name = "word_wrap___word_wrap_1.2.3.tgz"; + url = "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz"; + sha1 = "610636f6b1f703891bd34771ccb17fb93b47079c"; + }; + } + { name = "wrappy___wrappy_1.0.2.tgz"; path = fetchurl { name = "wrappy___wrappy_1.0.2.tgz"; @@ -1073,5 +1817,13 @@ sha1 = "787a6154414f3c99ed83c5772153b20feb0cec32"; }; } + { + name = "yallist___yallist_4.0.0.tgz"; + path = fetchurl { + name = "yallist___yallist_4.0.0.tgz"; + url = "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz"; + sha1 = "9bb92790d9c0effec63be73519e11a35019a3a72"; + }; + } ]; } diff --git a/nixpkgs/pkgs/development/compilers/fennel/default.nix b/nixpkgs/pkgs/development/compilers/fennel/default.nix index 6165a522c3aa..bae976a9b68f 100644 --- a/nixpkgs/pkgs/development/compilers/fennel/default.nix +++ b/nixpkgs/pkgs/development/compilers/fennel/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "fennel"; - version = "0.9.2"; + version = "0.10.0"; src = fetchFromSourcehut { owner = "~technomancy"; repo = pname; rev = version; - sha256 = "1kpm3lzxzwkhxm4ghpbx8iw0ni7gb73y68lsc3ll2rcx0fwv9303"; + sha256 = "sha256-/xCnaDNZJTBGxIgjPUVeEyMVeRWg8RCNuo5nPpLrJXY="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/nixpkgs/pkgs/development/compilers/fstar/default.nix b/nixpkgs/pkgs/development/compilers/fstar/default.nix index 7abdf132b51e..0ef2e89f123a 100644 --- a/nixpkgs/pkgs/development/compilers/fstar/default.nix +++ b/nixpkgs/pkgs/development/compilers/fstar/default.nix @@ -1,36 +1,66 @@ { lib, stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }: +let + # FStar requires sedlex < 2.4 + # see https://github.com/FStarLang/FStar/issues/2343 + sedlex-2_3 = ocamlPackages.sedlex_2.overrideAttrs (_: rec { + pname = "sedlex"; + version = "2.3"; + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "sedlex"; + rev = "v${version}"; + sha256 = "WXUXUuIaBUrFPQOKtZ7dgDZYdpEVnoJck0dkrCi8g0c="; + }; + }); +in + stdenv.mkDerivation rec { pname = "fstar"; - version = "0.9.6.0"; + version = "2021.08.27"; src = fetchFromGitHub { owner = "FStarLang"; repo = "FStar"; rev = "v${version}"; - sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb"; + sha256 = "1bf5hrv2nv0ljvdf6jhk59lw1ds3j5qkkcylgxwakylw30g8rxqb"; }; nativeBuildInputs = [ makeWrapper installShellFiles ]; - buildInputs = with ocamlPackages; [ - z3 ocaml findlib batteries menhir menhirLib stdint - zarith camlp4 yojson pprint - ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild - ]; + buildInputs = [ + z3 + ] ++ (with ocamlPackages; [ + ocaml + findlib + ocamlbuild + batteries + zarith + stdint + yojson + fileutils + menhir + menhirLib + pprint + sedlex-2_3 + ppxlib + ppx_deriving + ppx_deriving_yojson + process + ]); makeFlags = [ "PREFIX=$(out)" ]; - preBuild = '' - patchShebangs src/tools - patchShebangs bin + buildFlags = [ "libs" ]; + + postPatch = '' + patchShebangs ulib/gen_mllib.sh + substituteInPlace src/ocaml-output/Makefile --replace '$(COMMIT)' 'v${version}' ''; - buildFlags = [ "-C" "src/ocaml-output" ]; preInstall = '' mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib ''; - installFlags = [ "-C" "src/ocaml-output" ]; postInstall = '' wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin" installShellCompletion --bash .completion/bash/fstar.exe.bash @@ -42,6 +72,7 @@ stdenv.mkDerivation rec { description = "ML-like functional programming language aimed at program verification"; homepage = "https://www.fstar-lang.org"; license = licenses.asl20; + changelog = "https://github.com/FStarLang/FStar/raw/v${version}/CHANGES.md"; platforms = with platforms; darwin ++ linux; maintainers = with maintainers; [ gebner ]; }; diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix index 441ce6cdcd59..edb9b1ba7167 100644 --- a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/10/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , ncurses5 , python27 @@ -6,22 +7,21 @@ stdenv.mkDerivation rec { pname = "gcc-arm-embedded"; - version = "10.2.1"; - release = "10-2020-q4-major"; - subdir = "10-2020q4"; + version = "10.3.1"; + release = "10.3-2021.07"; suffix = { aarch64-linux = "aarch64-linux"; - x86_64-darwin = "mac"; + x86_64-darwin = "mac-10.14.6"; x86_64-linux = "x86_64-linux"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); src = fetchurl { - url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; + url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${release}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-linux = "0spkbh7vnda1w0nvavk342nb24nqxn8kln3k9j85mzil560qqg9l"; - x86_64-darwin = "1h5xn0npwkilqxg7ifrymsl7kjpafr9r9gjqgcpb0kjxavijvldy"; - x86_64-linux = "066nvhg5zdf3jvy9w23y439ghf1hvbicdyrrw9957gwb8ym4q4r1"; + aarch64-linux = "0y4nyrff5bq90v44z2h90gqgl18bs861i9lygx4z89ym85jycx9s"; + x86_64-darwin = "1r3yidmgx1xq1f19y2c5njf2g95vs9cssmmsxsb68qm192r58i8a"; + x86_64-linux = "1skcalz1sr0hhpjcl8qjsqd16n2w0zrbnlrbr8sx0g728kiqsnwc"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); }; diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix index bab73948ace1..a0d414d974f0 100644 --- a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , ncurses5 , python27 diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix index ccd99e096f85..4df2a90f52ea 100644 --- a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , ncurses5 , python27 diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix index 363e87ecb65a..152ecdb867d9 100644 --- a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , ncurses5 , python27 diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix index 6ff1567286da..c625134508e3 100644 --- a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , ncurses5 , python27 diff --git a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix index 143681c2a5bb..58a4dfbe36e1 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix @@ -156,7 +156,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -177,7 +179,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/nixpkgs/pkgs/development/compilers/gcc/11/default.nix b/nixpkgs/pkgs/development/compilers/gcc/11/default.nix index 7efc9d589f98..15d935618712 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/11/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/11/default.nix @@ -161,7 +161,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -182,7 +184,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/nixpkgs/pkgs/development/compilers/gcc/6/default.nix b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix index 4567e8b43e9f..df4a632db05d 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/6/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix @@ -199,7 +199,9 @@ stdenv.mkDerivation ({ nativeBuildInputs = [ texinfo which gettext ] ++ (optional (perl != null) perl) ++ (optional javaAwtGtk pkg-config) - ++ (optional (with stdenv.targetPlatform; isVc4 || isRedox) flex); + ++ (optional (with stdenv.targetPlatform; isVc4 || isRedox) flex) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -222,7 +224,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix index 857263e51e0b..43b2e0b5ef51 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix @@ -170,7 +170,9 @@ stdenv.mkDerivation ({ depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ texinfo which gettext ] - ++ (optional (perl != null) perl); + ++ (optional (perl != null) perl) + ++ (optional langAda gnatboot) + ; # For building runtime libs depsBuildTarget = @@ -191,7 +193,6 @@ stdenv.mkDerivation ({ # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ (optional hostPlatform.isDarwin gnused) - ++ (optional langAda gnatboot) ; depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix index 997771c2abfe..6744ad8b0bfe 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -133,7 +133,7 @@ let "--with-system-zlib" "--enable-static" "--enable-languages=${ - lib.concatStrings (lib.intersperse "," + lib.concatStringsSep "," ( lib.optional langC "c" ++ lib.optional langCC "c++" ++ lib.optional langD "d" @@ -146,7 +146,6 @@ let ++ lib.optionals crossDarwin [ "objc" "obj-c++" ] ++ lib.optional langJit "jit" ) - ) }" ] @@ -158,9 +157,15 @@ let (lib.enableFeature enablePlugin "plugin") ] - # Support -m32 on powerpc64le + # Support -m32 on powerpc64le/be ++ lib.optional (targetPlatform.system == "powerpc64le-linux") "--enable-targets=powerpcle-linux" + ++ lib.optional (targetPlatform.system == "powerpc64-linux") + "--enable-targets=powerpc-linux" + + # Fix "unknown long double size, cannot define BFP_FMT" + ++ lib.optional (targetPlatform.isPower && targetPlatform.isMusl) + "--disable-decimal-float" # Optional features ++ lib.optional (isl != null) "--with-isl=${isl}" @@ -170,8 +175,11 @@ let "--enable-cloog-backend=isl" ] - # Ada options - ++ lib.optional langAda "--enable-libada" + # Ada options, gcc can't build the runtime library for a cross compiler + ++ lib.optional langAda + (if hostPlatform == targetPlatform + then "--enable-libada" + else "--disable-libada") # Java options ++ lib.optionals langJava [ diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix index 3ef4ebb9b98f..824794774cec 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -374,6 +374,6 @@ stdenv.mkDerivation rec { # `pkgsMusl`. platforms = builtins.attrNames ghcBinDists.${distSetName}; hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms; - maintainers = with lib.maintainers; [ lostnet ]; + maintainers = with lib.maintainers; [ lostnet guibou ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix new file mode 100644 index 000000000000..34643dd2f87c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -0,0 +1,391 @@ +{ lib, stdenv +, fetchurl, perl, gcc +, ncurses5 +, ncurses6, gmp, libiconv, numactl +, llvmPackages + + # minimal = true; will remove files that aren't strictly necessary for + # regular builds and GHC bootstrapping. + # This is "useful" for staying within hydra's output limits for at least the + # aarch64-linux architecture. +, minimal ? false +}: + +# Prebuilt only does native +assert stdenv.targetPlatform == stdenv.hostPlatform; + +let + downloadsUrl = "https://downloads.haskell.org/ghc"; + + # Copy sha256 from https://downloads.haskell.org/~ghc/8.10.7/SHA256SUMS + version = "8.10.7"; + + # Information about available bindists that we use in the build. + # + # # Bindist library checking + # + # The field `archSpecificLibraries` also provides a way for us get notified + # early when the upstream bindist changes its dependencies (e.g. because a + # newer Debian version is used that uses a new `ncurses` version). + # + # Usage: + # + # * You can find the `fileToCheckFor` of libraries by running `readelf -d` + # on the compiler binary (`exePathForLibraryCheck`). + # * To skip library checking for an architecture, + # set `exePathForLibraryCheck = null`. + # * To skip file checking for a specific arch specfic library, + # set `fileToCheckFor = null`. + ghcBinDists = { + # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin) + # nixpkgs uses for the respective system. + defaultLibc = { + i686-linux = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; + sha256 = "fbfc1ef194f4e7a4c0da8c11cc69b17458a4b928b609b3622c97acc4acd5c5ab"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + # The i686-linux bindist provided by GHC HQ is currently built on Debian 9, + # which link it against `libtinfo.so.5` (ncurses 5). + # Other bindists are linked `libtinfo.so.6` (ncurses 6). + { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; } + ]; + }; + x86_64-linux = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; + sha256 = "a13719bca87a0d3ac0c7d4157a4e60887009a7f1a8dbe95c4759ec413e086d30"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } + ]; + }; + armv7l-linux = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; + sha256 = "3949c31bdf7d3b4afb765ea8246bca4ca9707c5d988d9961a244f0da100956a2"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } + ]; + }; + aarch64-linux = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; + sha256 = "fad2417f9b295233bf8ade79c0e6140896359e87be46cb61cd1d35863d9d0e55"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } + { nixPackage = numactl; fileToCheckFor = null; } + ]; + }; + x86_64-darwin = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; + sha256 = "287db0f9c338c9f53123bfa8731b0996803ee50f6ee847fe388092e5e5132047"; + }; + exePathForLibraryCheck = null; # we don't have a library check for darwin yet + archSpecificLibraries = [ + { nixPackage = ncurses6; fileToCheckFor = null; } + { nixPackage = libiconv; fileToCheckFor = null; } + ]; + }; + aarch64-darwin = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; + sha256 = "dc469fc3c35fd2a33a5a575ffce87f13de7b98c2d349a41002e200a56d9bba1c"; + }; + exePathForLibraryCheck = null; # we don't have a library check for darwin yet + archSpecificLibraries = [ + { nixPackage = ncurses6; fileToCheckFor = null; } + { nixPackage = libiconv; fileToCheckFor = null; } + ]; + }; + }; + # Binary distributions for the musl libc for the respective system. + musl = { + x86_64-linux = { + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz"; + sha256 = "16903df850ef73d5246f2ff169cbf57ecab76c2ac5acfa9928934282cfad575c"; + }; + exePathForLibraryCheck = "bin/ghc"; + archSpecificLibraries = [ + # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*` + # instead of `libtinfo.so.*.` + { nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; } + ]; + }; + }; + }; + + distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc"; + + binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system} + or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')"); + + useLLVM = !stdenv.targetPlatform.isx86; + + libPath = + lib.makeLibraryPath ( + [ + gmp + ] + # Add arch-specific libraries. + ++ map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries + ); + + libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + + "LD_LIBRARY_PATH"; + +in + +stdenv.mkDerivation rec { + inherit version; + + name = "ghc-${version}-binary"; + + src = fetchurl binDistUsed.src; + + nativeBuildInputs = [ perl ]; + propagatedBuildInputs = + lib.optionals useLLVM [ llvmPackages.llvm ] + # Because musl bindists currently provide no way to tell where + # libgmp is (see not [musl bindists have no .buildinfo]), we need + # to propagate `gmp`, otherwise programs built by this ghc will + # fail linking with `cannot find -lgmp` errors. + # Also, as of writing, the release pages of musl bindists claim + # that they use `integer-simple` and do not require `gmp`; however + # that is incorrect, so `gmp` is required until a release has been + # made that includes https://gitlab.haskell.org/ghc/ghc/-/issues/20059. + # (Note that for packaging the `-binary` compiler, nixpkgs does not care + # about whether or not `gmp` is used; this comment is just here to explain + # why the `gmp` dependency exists despite what the release page says.) + ++ lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this + + # Set LD_LIBRARY_PATH or equivalent so that the programs running as part + # of the bindist installer can find the libraries they expect. + # Cannot patchelf beforehand due to relative RPATHs that anticipate + # the final install location. + ${libEnvVar} = libPath; + + postUnpack = + # Verify our assumptions of which `libtinfo.so` (ncurses) version is used, + # so that we know when ghc bindists upgrade that and we need to update the + # version used in `libPath`. + lib.optionalString + (binDistUsed.exePathForLibraryCheck != null) + # Note the `*` glob because some GHCs have a suffix when unpacked, e.g. + # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`. + # As a result, don't shell-quote this glob when splicing the string. + (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in + lib.concatStringsSep "\n" [ + ('' + echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" + if ! test -e ${buildExeGlob}; then + echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + '') + (lib.concatMapStringsSep + "\n" + ({ fileToCheckFor, nixPackage }: + lib.optionalString (fileToCheckFor != null) '' + echo "Checking bindist for ${fileToCheckFor} to ensure that is still used" + if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then + echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + + echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}" + if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then + echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + '' + ) + binDistUsed.archSpecificLibraries + ) + ]) + # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib + # during linking + + lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS+=" -no_dtrace_dof" + # not enough room in the object files for the full path to libiconv :( + for exe in $(find . -type f -executable); do + isScript $exe && continue + ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe + done + '' + + + # Some scripts used during the build need to have their shebangs patched + '' + patchShebangs ghc-${version}/utils/ + patchShebangs ghc-${version}/configure + '' + + # We have to patch the GMP paths for the integer-gmp package. + # Note [musl bindists have no .buildinfo] + # Note that musl bindists do not contain them; unclear if that's intended; + # see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231 + '' + find . -name integer-gmp.buildinfo \ + -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; + '' + lib.optionalString stdenv.isDarwin '' + find . -name base.buildinfo \ + -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; + '' + + # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in + # FFI_LIB_DIR is a good indication of places it must be needed. + lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) '' + find . -name package.conf.in \ + -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; + '' + + # Rename needed libraries and binaries, fix interpreter + lib.optionalString stdenv.isLinux '' + find . -type f -executable -exec patchelf \ + --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; + ''; + + # fix for `configure: error: Your linker is affected by binutils #16177` + preConfigure = lib.optionalString + stdenv.targetPlatform.isAarch32 + "LD=ld.gold"; + + configurePlatforms = [ ]; + configureFlags = [ + "--with-gmp-includes=${lib.getDev gmp}/include" + # Note `--with-gmp-libraries` does nothing for GHC bindists: + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 + ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + # From: https://github.com/NixOS/nixpkgs/pull/43369/commits + ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; + + # No building is necessary, but calling make without flags ironically + # calls install-strip ... + dontBuild = true; + + # Apparently necessary for the ghc Alpine (musl) bindist: + # When we strip, and then run the + # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p + # below, running ghc (e.g. during `installCheckPhase)` gives some apparently + # corrupted rpath or whatever makes the loader work on nonsensical strings: + # running install tests + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found + # This is extremely bogus and should be investigated. + dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness + + # On Linux, use patchelf to modify the executables so that they can + # find editline/gmp. + postFixup = lib.optionalString stdenv.isLinux + (if stdenv.hostPlatform.isAarch64 then + # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs + # are 2 directories deep from $out/lib, so pooling symlinks there makes + # a short rpath. + '' + (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6) + (cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10) + (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1) + for p in $(find "$out/lib" -type f -name "*\.so*"); do + (cd $out/lib; ln -s $p) + done + + for p in $(find "$out/lib" -type f -executable); do + if isELF "$p"; then + echo "Patchelfing $p" + patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p + fi + done + '' + else + '' + for p in $(find "$out" -type f -executable); do + if isELF "$p"; then + echo "Patchelfing $p" + patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p + fi + done + '') + lib.optionalString stdenv.isDarwin '' + # not enough room in the object files for the full path to libiconv :( + for exe in $(find "$out" -type f -executable); do + isScript $exe && continue + ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe + done + + for file in $(find "$out" -name setup-config); do + substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" + done + '' + + lib.optionalString minimal '' + # Remove profiling files + find $out -type f -name '*.p_o' -delete + find $out -type f -name '*.p_hi' -delete + find $out -type f -name '*_p.a' -delete + # `-f` because e.g. musl bindist does not have this file. + rm -f $out/lib/ghc-*/bin/ghc-iserv-prof + # Hydra will redistribute this derivation, so we have to keep the docs for + # legal reasons (retaining the legal notices etc) + # As a last resort we could unpack the docs separately and symlink them in. + # They're in $out/share/{doc,man}. + ''; + + # In nixpkgs, musl based builds currently enable `pie` hardening by default + # (see `defaultHardeningFlags` in `make-derivation.nix`). + # But GHC cannot currently produce outputs that are ready for `-pie` linking. + # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. + # See: + # * https://github.com/NixOS/nixpkgs/issues/129247 + # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 + hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie"; + + doInstallCheck = true; + installCheckPhase = '' + unset ${libEnvVar} + # Sanity check, can ghc create executables? + cd $TMP + mkdir test-ghc; cd test-ghc + cat > main.hs << EOF + {-# LANGUAGE TemplateHaskell #-} + module Main where + main = putStrLn \$([|"yes"|]) + EOF + $out/bin/ghc --make main.hs || exit 1 + echo compilation ok + [ $(./main) == "yes" ] + ''; + + passthru = { + targetPrefix = ""; + enableShared = true; + + # Our Cabal compiler name + haskellCompilerName = "ghc-${version}"; + }; + + meta = rec { + homepage = "http://haskell.org/ghc"; + description = "The Glasgow Haskell Compiler"; + license = lib.licenses.bsd3; + # HACK: since we can't encode the libc / abi in platforms, we need + # to make the platform list dependent on the evaluation platform + # in order to avoid eval errors with musl which supports less + # platforms than the default libcs (i. e. glibc / libSystem). + # This is done for the benefit of Hydra, so `packagePlatforms` + # won't return any platforms that would cause an evaluation + # failure for `pkgsMusl.haskell.compiler.ghc8102Binary`, as + # long as the evaluator runs on a platform that supports + # `pkgsMusl`. + platforms = builtins.attrNames ghcBinDists.${distSetName}; + hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms; + maintainers = with lib.maintainers; [ lostnet ]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.4.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix index 10ca2f6662c2..f1078a0ad340 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.10.4.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix @@ -3,6 +3,7 @@ # build-tools , bootPkgs , autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx +, xattr, autoSignDarwinBinariesHook , bash , libiconv ? null, ncurses @@ -135,12 +136,12 @@ let in stdenv.mkDerivation (rec { - version = "8.10.4"; + version = "8.10.7"; name = "${targetPrefix}ghc-${version}"; src = fetchurl { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; - sha256 = "03li4k10hxgyxcdyyz2092wx09spr1599hi0sxbh4m889qdqgbsj"; + sha256 = "e3eef6229ce9908dfe1ea41436befb0455fefb1932559e860ad4c606b0d03c9d"; }; enableParallelBuilding = true; @@ -155,9 +156,6 @@ stdenv.mkDerivation (rec { # upstream patch. Don't forget to check backport status of the upstream patch # when adding new GHC releases in nixpkgs. ./respect-ar-path.patch - # Fix documentation configuration which causes a syntax error with sphinx 4.* - # See https://gitlab.haskell.org/ghc/ghc/-/issues/19962, remove at 8.10.6. - ./sphinx-4-configuration.patch ] ++ lib.optionals stdenv.isDarwin [ # Make Block.h compile with c++ compilers. Remove with the next release (fetchpatch { @@ -192,6 +190,9 @@ stdenv.mkDerivation (rec { export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" '' + lib.optionalString stdenv.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" + + # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7 + export XATTR=${lib.getBin xattr}/bin/xattr '' + lib.optionalString targetPlatform.useAndroidPrebuilt '' sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets '' + lib.optionalString targetPlatform.isMusl '' @@ -249,6 +250,8 @@ stdenv.mkDerivation (rec { nativeBuildInputs = [ perl autoconf automake m4 python3 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + autoSignDarwinBinariesHook ] ++ lib.optionals enableDocs [ sphinx ]; @@ -281,6 +284,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc @@ -306,9 +313,13 @@ stdenv.mkDerivation (rec { meta = { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler"; - maintainers = with lib.maintainers; [ marcweber andres peti ]; + maintainers = with lib.maintainers; [ marcweber andres peti guibou ]; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + + # integer-simple builds are broken when GHC links against musl. + # See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881323743. + broken = enableIntegerSimple && hostPlatform.isMusl; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix index ea4542a38b22..c2fac6faf774 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -192,5 +192,6 @@ stdenv.mkDerivation rec { hydraPlatforms = builtins.filter (p: p != "aarch64-linux") platforms; # build segfaults, use ghc8102Binary which has proper musl support instead broken = stdenv.hostPlatform.isMusl; + maintainers = with lib.maintainers; [ guibou ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix b/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix index 238266147167..66862fca7318 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix @@ -316,9 +316,13 @@ stdenv.mkDerivation (rec { meta = { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler"; - maintainers = with lib.maintainers; [ marcweber andres peti ]; + maintainers = with lib.maintainers; [ marcweber andres peti guibou ]; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + + # integer-simple builds are broken when GHC links against musl. + # See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881323743. + broken = enableIntegerSimple && hostPlatform.isMusl; }; dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm); diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix b/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix index d2ae51c66dee..c2cc1358e821 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix @@ -268,6 +268,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc @@ -293,9 +297,13 @@ stdenv.mkDerivation (rec { meta = { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler"; - maintainers = with lib.maintainers; [ marcweber andres peti ]; + maintainers = with lib.maintainers; [ marcweber andres peti guibou ]; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + + # integer-simple builds are broken when GHC links against musl. + # See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881323743. + broken = enableIntegerSimple && hostPlatform.isMusl; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/nixpkgs/pkgs/development/compilers/ghc/9.2.1.nix b/nixpkgs/pkgs/development/compilers/ghc/9.2.1.nix new file mode 100644 index 000000000000..4664ed834f57 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.1.nix @@ -0,0 +1,320 @@ +{ lib, stdenv, pkgsBuildTarget, targetPackages + +# build-tools +, bootPkgs +, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx, xattr +, bash + +, libiconv ? null, ncurses +, glibcLocales ? null + +, # GHC can be built with system libffi or a bundled one. + libffi ? null + +, useLLVM ? !stdenv.targetPlatform.isx86 +, # LLVM is conceptually a run-time-only depedendency, but for + # non-x86, we need LLVM to bootstrap later stages, so it becomes a + # build-time dependency too. + buildLlvmPackages, llvmPackages + +, # If enabled, GHC will be built with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. + enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp + +, # If enabled, use -fPIC when compiling static libs. + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform + + # aarch64 outputs otherwise exceed 2GB limit +, enableProfiledLibs ? !stdenv.targetPlatform.isAarch64 + +, # Whether to build dynamic libs for the standard library (on the target + # platform). Static libs are always built. + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt + +, # Whether to build terminfo. + enableTerminfo ? !stdenv.targetPlatform.isWindows + +, # What flavour to build. An empty string indicates no + # specific flavour and falls back to ghc default values. + ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) + (if useLLVM then "perf-cross" else "perf-cross-ncg") + +, # Whether to build sphinx documentation. + enableDocs ? ( + # Docs disabled for musl and cross because it's a large task to keep + # all `sphinx` dependencies building in those environments. + # `sphinx` pullls in among others: + # Ruby, Python, Perl, Rust, OpenGL, Xorg, gtk, LLVM. + (stdenv.targetPlatform == stdenv.hostPlatform) + && !stdenv.hostPlatform.isMusl + ) + +, enableHaddockProgram ? + # Disabled for cross; see note [HADDOCK_DOCS]. + (stdenv.targetPlatform == stdenv.hostPlatform) + +, # Whether to disable the large address space allocator + # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ + disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64 +}: + +assert !enableIntegerSimple -> gmp != null; + +# Cross cannot currently build the `haddock` program for silly reasons, +# see note [HADDOCK_DOCS]. +assert (stdenv.targetPlatform != stdenv.hostPlatform) -> !enableHaddockProgram; + +let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + + inherit (bootPkgs) ghc; + + # TODO(@Ericson2314) Make unconditional + targetPrefix = lib.optionalString + (targetPlatform != hostPlatform) + "${targetPlatform.config}-"; + + buildMK = '' + BuildFlavour = ${ghcFlavour} + ifneq \"\$(BuildFlavour)\" \"\" + include mk/flavours/\$(BuildFlavour).mk + endif + BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"} + BUILD_SPHINX_PDF = NO + '' + + # Note [HADDOCK_DOCS]: + # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock` + # program is built (which we generally always want to have a complete GHC install) + # and whether it is run on the GHC sources to generate hyperlinked source code + # (which is impossible for cross-compilation); see: + # https://gitlab.haskell.org/ghc/ghc/-/issues/20077 + # This implies that currently a cross-compiled GHC will never have a `haddock` + # program, so it can never generate haddocks for any packages. + # If this is solved in the future, we'd like to unconditionally + # build the haddock program (removing the `enableHaddockProgram` option). + '' + HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"} + DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"} + INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"} + '' + lib.optionalString (targetPlatform != hostPlatform) '' + Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} + CrossCompilePrefix = ${targetPrefix} + '' + lib.optionalString (!enableProfiledLibs) '' + GhcLibWays = "v dyn" + '' + lib.optionalString enableRelocatedStaticLibs '' + GhcLibHcOpts += -fPIC + GhcRtsHcOpts += -fPIC + '' + lib.optionalString targetPlatform.useAndroidPrebuilt '' + EXTRA_CC_OPTS += -std=gnu99 + ''; + + # Splicer will pull out correct variations + libDeps = platform: lib.optional enableTerminfo ncurses + ++ [libffi] + ++ lib.optional (!enableIntegerSimple) gmp + ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; + + toolsForTarget = [ + pkgsBuildTarget.targetPackages.stdenv.cc + ] ++ lib.optional useLLVM buildLlvmPackages.llvm; + + targetCC = builtins.head toolsForTarget; + + # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. + # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 + # see #84670 and #49071 for more background. + useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); + + runtimeDeps = [ + targetPackages.stdenv.cc.bintools + coreutils + ] + # On darwin, we need unwrapped bintools as well (for otool) + ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ + targetPackages.stdenv.cc.bintools.bintools + ]; + +in +stdenv.mkDerivation (rec { + version = "9.2.0.20210821"; + name = "${targetPrefix}ghc-${version}"; + + src = fetchurl { + url = "https://downloads.haskell.org/ghc/9.2.1-rc1/ghc-${version}-src.tar.xz"; + sha256 = "1q2pppxv2avhykyxvyq72r5p97rkkiqp19b77yhp85ralbcp4ivw"; + }; + + enableParallelBuilding = true; + + outputs = [ "out" "doc" ]; + + postPatch = "patchShebangs ."; + + # GHC needs the locale configured during the Haddock phase. + LANG = "en_US.UTF-8"; + + # GHC is a bit confused on its cross terminology. + preConfigure = '' + for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do + export "''${env#TARGET_}=''${!env}" + done + # GHC is a bit confused on its cross terminology, as these would normally be + # the *host* tools. + export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 + export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" + export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" + export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" + export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" + export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" + export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" + export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + + echo -n "${buildMK}" > mk/build.mk + sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") '' + export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" + '' + lib.optionalString (!stdenv.isDarwin) '' + export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" + '' + lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS+=" -no_dtrace_dof" + '' + lib.optionalString targetPlatform.useAndroidPrebuilt '' + sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets + '' + lib.optionalString targetPlatform.isMusl '' + echo "patching llvm-targets for musl targets..." + echo "Cloning these existing '*-linux-gnu*' targets:" + grep linux-gnu llvm-targets | sed 's/^/ /' + echo "(go go gadget sed)" + sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets + echo "llvm-targets now contains these '*-linux-musl*' targets:" + grep linux-musl llvm-targets | sed 's/^/ /' + + echo "And now patching to preserve '-musleabi' as done with '-gnueabi'" + # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen) + for x in configure aclocal.m4; do + substituteInPlace $x \ + --replace '*-android*|*-gnueabi*)' \ + '*-android*|*-gnueabi*|*-musleabi*)' + done + ''; + + # TODO(@Ericson2314): Always pass "--target" and always prefix. + configurePlatforms = [ "build" "host" ] + ++ lib.optional (targetPlatform != hostPlatform) "target"; + + # `--with` flags for libraries needed for RTS linker + configureFlags = [ + "--datadir=$doc/share/doc/ghc" + "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" + ] ++ lib.optionals (libffi != null) [ + "--with-system-libffi" + "--with-ffi-includes=${targetPackages.libffi.dev}/include" + "--with-ffi-libraries=${targetPackages.libffi.out}/lib" + ] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ + "--with-gmp-includes=${targetPackages.gmp.dev}/include" + "--with-gmp-libraries=${targetPackages.gmp.out}/lib" + ] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [ + "--with-iconv-includes=${libiconv}/include" + "--with-iconv-libraries=${libiconv}/lib" + ] ++ lib.optionals (targetPlatform != hostPlatform) [ + "--enable-bootstrap-with-devel-snapshot" + ] ++ lib.optionals useLdGold [ + "CFLAGS=-fuse-ld=gold" + "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" + "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" + ] ++ lib.optionals (disableLargeAddressSpace) [ + "--disable-large-address-space" + ]; + + # Make sure we never relax`$PATH` and hooks support for compatibility. + strictDeps = true; + + # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself. + dontAddExtraLibs = true; + + nativeBuildInputs = [ + perl autoconf automake m4 python3 + ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour + ] ++ lib.optionals enableDocs [ + sphinx + ] ++ lib.optionals stdenv.isDarwin [ + # TODO(@sternenseemann): use XATTR env var after backport of + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447 + xattr + ]; + + # For building runtime libs + depsBuildTarget = toolsForTarget; + + buildInputs = [ perl bash ] ++ (libDeps hostPlatform); + + propagatedBuildInputs = [ targetPackages.stdenv.cc ] + ++ lib.optional useLLVM llvmPackages.llvm; + + depsTargetTarget = map lib.getDev (libDeps targetPlatform); + depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); + + # required, because otherwise all symbols from HSffi.o are stripped, and + # that in turn causes GHCi to abort + stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols"; + + checkTarget = "test"; + + hardeningDisable = + [ "format" ] + # In nixpkgs, musl based builds currently enable `pie` hardening by default + # (see `defaultHardeningFlags` in `make-derivation.nix`). + # But GHC cannot currently produce outputs that are ready for `-pie` linking. + # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. + # See: + # * https://github.com/NixOS/nixpkgs/issues/129247 + # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 + ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + + postInstall = '' + # Install the bash completion file. + install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc + + # Patch scripts to include "readelf" and "cat" in $PATH. + for i in "$out/bin/"*; do + test ! -h $i || continue + egrep --quiet '^#!' <(head -n 1 $i) || continue + sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + done + ''; + + passthru = { + inherit bootPkgs targetPrefix; + + inherit llvmPackages; + inherit enableShared; + + # Our Cabal compiler name + haskellCompilerName = "ghc-${version}"; + }; + + meta = { + homepage = "http://haskell.org/ghc"; + description = "The Glasgow Haskell Compiler"; + maintainers = with lib.maintainers; [ marcweber andres peti guibou ]; + timeout = 24 * 3600; + inherit (ghc.meta) license platforms; + + # integer-simple builds are broken when GHC links against musl. + # See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881323743. + # Linker failure on macOS: + # https://gitlab.haskell.org/ghc/ghc/-/issues/19950#note_373726 + broken = (enableIntegerSimple && hostPlatform.isMusl) + || stdenv.hostPlatform.isDarwin; + }; + +} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { + dontStrip = true; + dontPatchELF = true; + noAuditTmpdir = true; +}) diff --git a/nixpkgs/pkgs/development/compilers/ghc/head.nix b/nixpkgs/pkgs/development/compilers/ghc/head.nix index 2ea14b78cc4a..d39adcaab540 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/head.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/head.nix @@ -2,7 +2,7 @@ # build-tools , bootPkgs -, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx +, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx, xattr , bash , libiconv ? null, ncurses @@ -40,7 +40,7 @@ , # Whether to build terminfo. enableTerminfo ? !stdenv.targetPlatform.isWindows -, version ? "9.3.20210504" +, version ? "9.3.20210806" , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) @@ -152,8 +152,8 @@ stdenv.mkDerivation (rec { src = fetchgit { url = "https://gitlab.haskell.org/ghc/ghc.git/"; - rev = "049c3a83fbce67e58e70c727d89e8331608a4e04"; - sha256 = "0dk7c9ywam9fj33lqzpwxhiwz017m58j6ixvc8b07kzp7kskaxq7"; + rev = "5d651c78fed7e55b3b3cd21a04499d1a2f75204d"; + sha256 = "1z9xg8jsqr9id985wxfhkjyb3kpyrmr7vjdqzfv42cpxynd483r8"; }; enableParallelBuilding = true; @@ -255,6 +255,10 @@ stdenv.mkDerivation (rec { ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour ] ++ lib.optionals enableDocs [ sphinx + ] ++ lib.optionals stdenv.isDarwin [ + # TODO(@sternenseemann): use XATTR env var once we have + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6447 + xattr ]; # For building runtime libs @@ -285,6 +289,10 @@ stdenv.mkDerivation (rec { # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 ++ lib.optional stdenv.targetPlatform.isMusl "pie"; + # big-parallel allows us to build with more than 2 cores on + # Hydra which already warrants a significant speedup + requiredSystemFeatures = [ "big-parallel" ]; + postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc @@ -310,7 +318,8 @@ stdenv.mkDerivation (rec { meta = { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler"; - maintainers = with lib.maintainers; [ marcweber andres peti ]; + maintainers = with lib.maintainers; [ marcweber andres peti guibou ]; + timeout = 24 * 3600; inherit (ghc.meta) license platforms; # ghcHEAD times out on aarch64-linux on Hydra. hydraPlatforms = builtins.filter (p: p != "aarch64-linux") ghc.meta.platforms; diff --git a/nixpkgs/pkgs/development/compilers/gnatboot/default.nix b/nixpkgs/pkgs/development/compilers/gnatboot/default.nix index d97298d02386..c68c4fd4ba03 100644 --- a/nixpkgs/pkgs/development/compilers/gnatboot/default.nix +++ b/nixpkgs/pkgs/development/compilers/gnatboot/default.nix @@ -1,15 +1,19 @@ { lib, stdenv, fetchurl }: +if stdenv.hostPlatform != stdenv.targetPlatform +then builtins.throw "gnatboot can't cross-compile" +else + stdenv.mkDerivation { pname = "gentoo-gnatboot"; version = "4.1"; - src = if stdenv.system == "i686-linux" then + src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2; sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr"; } - else if stdenv.system == "x86_64-linux" then + else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2; sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4"; diff --git a/nixpkgs/pkgs/development/compilers/go/1.14.nix b/nixpkgs/pkgs/development/compilers/go/1.14.nix deleted file mode 100644 index 21080fd96cb6..000000000000 --- a/nixpkgs/pkgs/development/compilers/go/1.14.nix +++ /dev/null @@ -1,284 +0,0 @@ -{ lib -, stdenv -, fetchurl -, tzdata -, iana-etc -, runCommand -, perl -, which -, pkg-config -, patch -, procps -, pcre -, cacert -, Security -, Foundation -, mailcap -, runtimeShell -, buildPackages -, pkgsBuildTarget -, fetchpatch -, callPackage -}: - -let - go_bootstrap = buildPackages.callPackage ./bootstrap.nix { }; - - goBootstrap = runCommand "go-bootstrap" { } '' - mkdir $out - cp -rf ${go_bootstrap}/* $out/ - chmod -R u+w $out - find $out -name "*.c" -delete - cp -rf $out/bin/* $out/share/go/bin/ - ''; - - goarch = platform: { - "i686" = "386"; - "x86_64" = "amd64"; - "aarch64" = "arm64"; - "arm" = "arm"; - "armv5tel" = "arm"; - "armv6l" = "arm"; - "armv7l" = "arm"; - "powerpc64le" = "ppc64le"; - "mips" = "mips"; - }.${platform.parsed.cpu.name} or (throw "Unsupported system"); - - # We need a target compiler which is still runnable at build time, - # to handle the cross-building case where build != host == target - targetCC = pkgsBuildTarget.targetPackages.stdenv.cc; -in - -stdenv.mkDerivation rec { - pname = "go"; - version = "1.14.15"; - - src = fetchurl { - url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "0jci03f5z09xibbdqg4lnv2k3crhal1phzwr6lc4ajp514i3plby"; - }; - - # perl is used for testing go vet - nativeBuildInputs = [ perl which pkg-config patch procps ]; - buildInputs = [ cacert pcre ] - ++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ] - ++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ]; - - depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ]; - - hardeningDisable = [ "all" ]; - - prePatch = '' - patchShebangs ./ # replace /bin/bash - - # This source produces shell script at run time, - # and thus it is not corrected by patchShebangs. - substituteInPlace misc/cgo/testcarchive/carchive_test.go \ - --replace '#!/usr/bin/env bash' '#!${runtimeShell}' - - # Patch the mimetype database location which is missing on NixOS. - # but also allow static binaries built with NixOS to run outside nix - sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go - - # Disabling the 'os/http/net' tests (they want files not available in - # chroot builds) - rm src/net/{listen,parse}_test.go - rm src/syscall/exec_linux_test.go - - # !!! substituteInPlace does not seems to be effective. - # The os test wants to read files in an existing path. Just don't let it be /usr/bin. - sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go - sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go - # Disable the unix socket test - sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go - # Disable the hostname test - sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go - # ParseInLocation fails the test - sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go - # Remove the api check as it never worked - sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go - # Remove the coverage test as we have removed this utility - sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go - # Remove the timezone naming test - sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go - # Remove disable setgid test - sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go - # Remove cert tests that conflict with NixOS's cert resolution - sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go - # TestWritevError hangs sometimes - sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go - # TestVariousDeadlines fails sometimes - sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go - - sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go - sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go - - # Disable cgo lookup tests not works, they depend on resolver - rm src/net/cgo_unix_test.go - - '' + lib.optionalString stdenv.isLinux '' - # prepend the nix path to the zoneinfo files but also leave the original value for static binaries - # that run outside a nix server - sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go - - '' + lib.optionalString stdenv.isAarch32 '' - echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace src/race.bash --replace \ - "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true - sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go - sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go - sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go - - sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go - sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go - sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go - sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go - - sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go - sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go - - sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go - - sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go - - # TestCurrent fails because Current is not implemented on Darwin - sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go - sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go - - touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd - ''; - - patches = [ - ./remove-tools-1.11.patch - ./ssl-cert-file-1.13.patch - ./remove-test-pie-1.14.patch - ./creds-test.patch - ./go-1.9-skip-flaky-19608.patch - ./go-1.9-skip-flaky-20072.patch - ./skip-external-network-tests.patch - ./skip-nohup-tests.patch - ./go_no_vendor_checks-1_14.patch - - # support TZ environment variable starting with colon - (fetchpatch { - name = "tz-support-colon.patch"; - url = "https://github.com/golang/go/commit/58fe2cd4022c77946ce4b598cf3e30ccc8367143.patch"; - sha256 = "0vphwiqrm0qykfj3rfayr65qzk22fksg7qkamvaz0lmf6fqvbd2f"; - }) - - # fix rare TestDontCacheBrokenHTTP2Conn failure - (fetchpatch { - url = "https://github.com/golang/go/commit/ea1437a8cdf6bb3c2d2447833a5d06dbd75f7ae4.patch"; - sha256 = "1lyzy4nf8c34a966vw45j3j7hzpvncq2gqspfxffzkyh17xd8sgy"; - }) - ] ++ [ - # breaks under load: https://github.com/golang/go/issues/25628 - (if stdenv.isAarch32 - then ./skip-test-extra-files-on-aarch32-1.14.patch - else ./skip-test-extra-files-on-386-1.14.patch) - ]; - - postPatch = '' - find . -name '*.orig' -exec rm {} ';' - ''; - - GOOS = stdenv.targetPlatform.parsed.kernel.name; - GOARCH = goarch stdenv.targetPlatform; - # GOHOSTOS/GOHOSTARCH must match the building system, not the host system. - # Go will nevertheless build a for host system that we will copy over in - # the install phase. - GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name; - GOHOSTARCH = goarch stdenv.buildPlatform; - - # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those - # to be different from CC/CXX - CC_FOR_TARGET = - if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${targetCC}/bin/${targetCC.targetPrefix}cc" - else - null; - CXX_FOR_TARGET = - if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${targetCC}/bin/${targetCC.targetPrefix}c++" - else - null; - - GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); - GO386 = 387; # from Arch: don't assume sse2 on i686 - CGO_ENABLED = 1; - # Hopefully avoids test timeouts on Hydra - GO_TEST_TIMEOUT_SCALE = 3; - - # Indicate that we are running on build infrastructure - # Some tests assume things like home directories and users exists - GO_BUILDER_NAME = "nix"; - - GOROOT_BOOTSTRAP = "${goBootstrap}/share/go"; - - postConfigure = '' - export GOCACHE=$TMPDIR/go-cache - # this is compiled into the binary - export GOROOT_FINAL=$out/share/go - - export PATH=$(pwd)/bin:$PATH - - ${lib.optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' - # Independent from host/target, CC should produce code for the building system. - # We only set it when cross-compiling. - export CC=${buildPackages.stdenv.cc}/bin/cc - ''} - ulimit -a - ''; - - postBuild = '' - (cd src && ./make.bash) - ''; - - doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin; - - checkPhase = '' - runHook preCheck - (cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild) - runHook postCheck - ''; - - preInstall = '' - rm -r pkg/obj - # Contains the wrong perl shebang when cross compiling, - # since it is not used for anything we can deleted as well. - rm src/regexp/syntax/make_perl_groups.pl - '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' - mv bin/*_*/* bin - rmdir bin/*_* - ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' - rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} - ''} - '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then '' - rm -rf bin/*_* - ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' - rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} - ''} - '' else ""); - - installPhase = '' - runHook preInstall - mkdir -p $GOROOT_FINAL - cp -a bin pkg src lib misc api doc $GOROOT_FINAL - ln -s $GOROOT_FINAL/bin $out/bin - runHook postInstall - ''; - - disallowedReferences = [ goBootstrap ]; - - meta = with lib; { - homepage = "http://golang.org/"; - description = "The Go Programming language"; - license = licenses.bsd3; - maintainers = teams.golang.members; - platforms = platforms.linux ++ platforms.darwin; - knownVulnerabilities = [ - "Support for Go 1.14 ended with the release of Go 1.16: https://golang.org/doc/devel/release.html#policy" - ]; - }; -} diff --git a/nixpkgs/pkgs/development/compilers/go/1.15.nix b/nixpkgs/pkgs/development/compilers/go/1.15.nix index 74ab1342dab5..f9bba06d6336 100644 --- a/nixpkgs/pkgs/development/compilers/go/1.15.nix +++ b/nixpkgs/pkgs/development/compilers/go/1.15.nix @@ -51,11 +51,11 @@ in stdenv.mkDerivation rec { pname = "go"; - version = "1.15.14"; + version = "1.15.15"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-YKSlxI1j0KE+yohJAJtiRin/QpyLxdGmqMPE2p805wo="; + sha256 = "sha256-BmKuOBMzAoDV8al6LuI7vb46Wnz6YAGySphzoZoNx+w="; }; # perl is used for testing go vet diff --git a/nixpkgs/pkgs/development/compilers/go/1.16.nix b/nixpkgs/pkgs/development/compilers/go/1.16.nix index 49a2f9656f35..a97aa4fe80d6 100644 --- a/nixpkgs/pkgs/development/compilers/go/1.16.nix +++ b/nixpkgs/pkgs/development/compilers/go/1.16.nix @@ -51,11 +51,11 @@ in stdenv.mkDerivation rec { pname = "go"; - version = "1.16.6"; + version = "1.16.7"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-o6XUvEAbUdsGXk+TtSM0ek00OuDAsIplw0I7BaE4A30="; + sha256 = "sha256-Gp8olNPYeHKfcEUHLzC+zr4kNSTPL85OCnskix4GVKw="; }; # perl is used for testing go vet diff --git a/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1_14.patch b/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1_14.patch deleted file mode 100644 index 53e4ba78ff18..000000000000 --- a/nixpkgs/pkgs/development/compilers/go/go_no_vendor_checks-1_14.patch +++ /dev/null @@ -1,23 +0,0 @@ -Starting from go1.14, go verifes that vendor/modules.txt matches the requirements -and replacements listed in the main module go.mod file, and it is a hard failure if -vendor/modules.txt is missing. - -Relax module consistency checks and switch back to pre go1.14 behaviour if -vendor/modules.txt is missing regardless of go version requirement in go.mod. - -This has been ported from FreeBSD: https://reviews.freebsd.org/D24122 -See https://github.com/golang/go/issues/37948 for discussion. - -diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go -index 71f68efbcc..3c566d04dd 100644 ---- a/src/cmd/go/internal/modload/init.go -+++ b/src/cmd/go/internal/modload/init.go -@@ -133,7 +133,7 @@ func checkVendorConsistency() { - readVendorList() - - pre114 := false -- if modFile.Go == nil || semver.Compare("v"+modFile.Go.Version, "v1.14") < 0 { -+ if modFile.Go == nil || semver.Compare("v"+modFile.Go.Version, "v1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) { - // Go versions before 1.14 did not include enough information in - // vendor/modules.txt to check for consistency. - // If we know that we're on an earlier version, relax the consistency check. diff --git a/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch b/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch deleted file mode 100644 index 218fcd46d892..000000000000 --- a/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go -index 56bdfcac19..d7d67ab94d 100644 ---- a/src/cmd/dist/test.go -+++ b/src/cmd/dist/test.go -@@ -580,29 +580,6 @@ func (t *tester) registerTests() { - }) - } - -- // Test internal linking of PIE binaries where it is supported. -- if goos == "linux" && (goarch == "amd64" || goarch == "arm64") { -- t.tests = append(t.tests, distTest{ -- name: "pie_internal", -- heading: "internal linking of -buildmode=pie", -- fn: func(dt *distTest) error { -- t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60)) -- return nil -- }, -- }) -- // Also test a cgo package. -- if t.cgoEnabled && t.internalLink() { -- t.tests = append(t.tests, distTest{ -- name: "pie_internal_cgo", -- heading: "internal linking of -buildmode=pie", -- fn: func(dt *distTest) error { -- t.addCmd(dt, "src", t.goTest(), "os/user", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60)) -- return nil -- }, -- }) -- } -- } -- - // sync tests - if goos != "js" { // js doesn't support -cpu=10 - t.tests = append(t.tests, distTest{ diff --git a/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch b/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch deleted file mode 100644 index 5791b213cb59..000000000000 --- a/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go -index 85cae90..94b4edd 100644 ---- a/src/cmd/go/go_test.go -+++ b/src/cmd/go/go_test.go -@@ -4946,6 +4946,8 @@ func TestBuildmodePIE(t *testing.T) { - } - - func TestExecBuildX(t *testing.T) { -+ t.Skipf("skipping, test requires networking") -+ - tooSlow(t) - if !canCgo { - t.Skip("skipping because cgo not enabled") -diff --git a/src/net/dial_test.go b/src/net/dial_test.go -index 00a84d1..27f9ec9 100644 ---- a/src/net/dial_test.go -+++ b/src/net/dial_test.go -@@ -968,6 +968,8 @@ func TestDialerControl(t *testing.T) { - // mustHaveExternalNetwork is like testenv.MustHaveExternalNetwork - // except that it won't skip testing on non-iOS builders. - func mustHaveExternalNetwork(t *testing.T) { -+ t.Skipf("Nix sandbox does not have networking") -+ - t.Helper() - ios := runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") - if testenv.Builder() == "" || ios { diff --git a/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch b/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch deleted file mode 100644 index 02a50d9c72f3..000000000000 --- a/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go -index 255a8d3525..a467255a54 100644 ---- a/src/crypto/x509/root_cgo_darwin.go -+++ b/src/crypto/x509/root_cgo_darwin.go -@@ -280,6 +280,8 @@ int CopyPEMRoots(CFDataRef *pemRoots, CFDataRef *untrustedPemRoots, bool debugDa - import "C" - import ( - "errors" -+ "io/ioutil" -+ "os" - "unsafe" - ) - -@@ -295,6 +297,13 @@ func loadSystemRoots() (*CertPool, error) { - buf := C.GoBytes(unsafe.Pointer(C.CFDataGetBytePtr(data)), C.int(C.CFDataGetLength(data))) - roots := NewCertPool() - roots.AppendCertsFromPEM(buf) -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } - - if C.CFDataGetLength(untrustedData) == 0 { - return roots, nil -diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go -index 2f6a8b8d60..b81889fe69 100644 ---- a/src/crypto/x509/root_darwin.go -+++ b/src/crypto/x509/root_darwin.go -@@ -92,6 +92,14 @@ func execSecurityRoots() (*CertPool, error) { - verifyCh = make(chan rootCandidate) - ) - -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } -+ - // Using 4 goroutines to pipe into verify-cert seems to be - // about the best we can do. The verify-cert binary seems to - // just RPC to another server with coarse locking anyway, so -diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go -index 48de50b4ea..750e12c6b4 100644 ---- a/src/crypto/x509/root_unix.go -+++ b/src/crypto/x509/root_unix.go -@@ -38,6 +38,13 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate - - func loadSystemRoots() (*CertPool, error) { - roots := NewCertPool() -+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" { -+ data, err := ioutil.ReadFile(file) -+ if err == nil { -+ roots.AppendCertsFromPEM(data) -+ return roots, nil -+ } -+ } - - files := certFiles - if f := os.Getenv(certFileEnv); f != "" { diff --git a/nixpkgs/pkgs/development/compilers/gprolog/default.nix b/nixpkgs/pkgs/development/compilers/gprolog/default.nix index b21f0196d4b4..16a7552dd4e3 100644 --- a/nixpkgs/pkgs/development/compilers/gprolog/default.nix +++ b/nixpkgs/pkgs/development/compilers/gprolog/default.nix @@ -1,12 +1,13 @@ { lib, stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "gprolog-1.5.0"; + pname = "gprolog"; + version = "1.5.0"; src = fetchurl { urls = [ - "mirror://gnu/gprolog/${name}.tar.gz" - "http://www.gprolog.org/${name}.tar.gz" + "mirror://gnu/gprolog/gprolog-${version}.tar.gz" + "http://www.gprolog.org/gprolog-${version}.tar.gz" ]; sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE="; }; @@ -22,13 +23,13 @@ stdenv.mkDerivation rec { configureFlagsArray=( "--with-install-dir=$out" "--without-links-dir" - "--with-examples-dir=$out/share/${name}/examples" - "--with-doc-dir=$out/share/${name}/doc" + "--with-examples-dir=$out/share/gprolog-${version}/examples" + "--with-doc-dir=$out/share/gprolog-${version}/doc" ) ''; postInstall = '' - mv -v $out/[A-Z]* $out/gprolog.ico $out/share/${name}/ + mv -v $out/[A-Z]* $out/gprolog.ico $out/share/gprolog-${version}/ ''; doCheck = true; diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition.nix deleted file mode 100644 index 8669b57dcca2..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/community-edition.nix +++ /dev/null @@ -1,285 +0,0 @@ -{ stdenv -, lib -, fetchurl -, autoPatchelfHook -, setJavaClassPath -, makeWrapper -# minimum dependencies -, Foundation -, alsa-lib -, fontconfig -, freetype -, glibc -, openssl -, perl -, unzip -, xorg -, zlib -# runtime dependencies -, cups -# runtime dependencies for GTK+ Look and Feel -, gtkSupport ? true -, cairo -, glib -, gtk3 -}: - -let - platform = if stdenv.isDarwin then "darwin-amd64" else "linux-amd64"; - runtimeDependencies = [ - cups - ] ++ lib.optionals gtkSupport [ - cairo glib gtk3 - ]; - runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies; - common = javaVersion: - let - javaVersionPlatform = "${javaVersion}-${platform}"; - graalvmXXX-ce = stdenv.mkDerivation rec { - pname = "graalvm${javaVersion}-ce"; - version = "21.0.0"; - srcs = [ - (fetchurl { - sha256 = { "8-linux-amd64" = "18q1plrpclp02rlwn3vvv2fcyspvqv2gkzn14f0b59pnladmlv1j"; - "11-linux-amd64" = "1g1xjbr693rimdy2cy6jvz4vgnbnw76wa87xcmaszka206fmpnsc"; - "8-darwin-amd64" = "0giv8f7ybdykadzmxjy91i6njbdx6dclyx7g6vyhwk2l1cvxi4li"; - "11-darwin-amd64" = "1a8gjp6fp11ms05pd62h1x1ifkkr3wv0hrxic670v90bbps9lsqf"; - }.${javaVersionPlatform}; - url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersionPlatform}-${version}.tar.gz"; - }) - (fetchurl { - sha256 = { "8-linux-amd64" = "0hpq2g9hc8b7j4d8a08kq1mnl6pl7a4kwaj0a3gka3d4m6r7cscg"; - "11-linux-amd64" = "0z3hb2bf0lqzw760civ3h1wvx22a75n7baxc0l2i9h5wxas002y7"; - "8-darwin-amd64" = "1izbgl4hjg5jyi422xnkx006qnw163r1i1djf76q1plms40y01ph"; - "11-darwin-amd64" = "1d9z75gil0if74ndla9yw3xx9i2bfbcs32qa0z6wi5if66cmknb8"; - }.${javaVersionPlatform}; - url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersionPlatform}-${version}.jar"; - }) - (fetchurl { - sha256 = { "8-linux-amd64" = "122p8psgmzhqnjb2fy1lwghg0kw5qa8xkzgyjp682lwg4j8brz43"; - "11-linux-amd64" = "1vdc90m6s013cbhmj58nb4vyxllbxirw0idlgv0iv9cyhx90hzgz"; - "8-darwin-amd64" = "04q0s9xsaskqn9kbhz0mgdk28j2qnxrzqfmw6jn2znr8s8jsc6yp"; - "11-darwin-amd64" = "1pw4xd8g5cc9bm52awmm1zxs96ijws43vws7y10wxa6a0nhv7z5f"; - }.${javaVersionPlatform}; - url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersionPlatform}-${version}.jar"; - }) - (fetchurl { - sha256 = { "8-linux-amd64" = "19m7n4f5jrmsfvgv903sarkcjh55l0nlnw99lvjlcafw5hqzyb91"; - "11-linux-amd64" = "18ibb7l7b4hmbnvyr8j7mrs11mvlsf2j0c8rdd2s93x2114f26ba"; - "8-darwin-amd64" = "1zlzi00339kvg4ym2j75ypfkzn8zbwdpriqmkaz4fh28qjmc1dwq"; - "11-darwin-amd64" = "0x301i1fimakhi2x29ldr0fsqkb3qs0g9jsmjv27d62dpqx8kgc8"; - }.${javaVersionPlatform}; - url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersionPlatform}-${version}.jar"; - }) - (fetchurl { - sha256 = { "8-linux-amd64" = "0dlgbg6kri89r9zbk6n0ch3g8356j1g35bwjng87c2y5y0vcw0b5"; - "11-linux-amd64" = "1yby65hww6zmd2g5pjwbq5pv3iv4gfv060b8fq75fjhwrisyj5gd"; - "8-darwin-amd64" = "1smdj491g23i3z7p5rybid18nnz8bphrqjkv0lg2ffyrpn8k6g93"; - "11-darwin-amd64" = "056zyn0lpd7741k1szzjwwacka0g7rn0j4ypfmav4h1245mjg8lx"; - }.${javaVersionPlatform}; - url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersionPlatform}-${version}.jar"; - }) - ]; - - buildInputs = lib.optionals stdenv.isLinux [ - alsa-lib # libasound.so wanted by lib/libjsound.so - fontconfig - freetype - openssl # libssl.so wanted by languages/ruby/lib/mri/openssl.so - stdenv.cc.cc.lib # libstdc++.so.6 - xorg.libX11 - xorg.libXext - xorg.libXi - xorg.libXrender - xorg.libXtst - zlib - ]; - - # Workaround for libssl.so.10 wanted by TruffleRuby - # Resulting TruffleRuby cannot use `openssl` library. - autoPatchelfIgnoreMissingDeps = true; - - nativeBuildInputs = [ unzip perl autoPatchelfHook makeWrapper ]; - - unpackPhase = '' - unpack_jar() { - jar=$1 - unzip -q -o $jar -d $out - perl -ne 'use File::Path qw(make_path); - use File::Basename qw(dirname); - if (/^(.+) = (.+)$/) { - make_path dirname("$ENV{out}/$1"); - system "ln -s $2 $ENV{out}/$1"; - }' $out/META-INF/symlinks - perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) { - my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) + - ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) + - ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0); - chmod $mode, "$ENV{out}/$1"; - }' $out/META-INF/permissions - rm -rf $out/META-INF - } - - mkdir -p $out - arr=($srcs) - - # The tarball on Linux has the following directory structure: - # - # graalvm-ce-java11-20.3.0/* - # - # while on Darwin it looks like this: - # - # graalvm-ce-java11-20.3.0/Contents/Home/* - # - # We therefor use --strip-components=1 vs 3 depending on the platform. - tar xf ''${arr[0]} -C $out --strip-components=${if stdenv.isLinux then "1" else "3"} - - # Sanity check - if [ ! -d $out/bin ]; then - echo "The `bin` is directory missing after extracting the graalvm" - echo "tarball, please compare the directory structure of the" - echo "tarball with what happens in the unpackPhase (in particular" - echo "with regards to the `--strip-components` flag)." - exit 1 - fi - - unpack_jar ''${arr[1]} - unpack_jar ''${arr[2]} - unpack_jar ''${arr[3]} - unpack_jar ''${arr[4]} - ''; - - installPhase = { - "8-linux-amd64" = '' - # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html - substituteInPlace $out/jre/lib/security/java.security \ - --replace file:/dev/random file:/dev/./urandom \ - --replace NativePRNGBlocking SHA1PRNG - - # provide libraries needed for static compilation - for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do - ln -s $f $out/jre/lib/svm/clibraries/${platform}/$(basename $f) - done - - # allow using external truffle-api.jar and languages not included in the distrubution - rm $out/jre/lib/jvmci/parentClassLoader.classpath - ''; - "11-linux-amd64" = '' - # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html - substituteInPlace $out/conf/security/java.security \ - --replace file:/dev/random file:/dev/./urandom \ - --replace NativePRNGBlocking SHA1PRNG - - # provide libraries needed for static compilation - for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do - ln -s $f $out/lib/svm/clibraries/${platform}/$(basename $f) - done - ''; - "8-darwin-amd64" = '' - # allow using external truffle-api.jar and languages not included in the distrubution - rm $out/jre/lib/jvmci/parentClassLoader.classpath - ''; - "11-darwin-amd64" = '' - # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html - substituteInPlace $out/conf/security/java.security \ - --replace file:/dev/random file:/dev/./urandom \ - --replace NativePRNGBlocking SHA1PRNG - ''; - }.${javaVersionPlatform}; - - dontStrip = true; - - preFixup = '' - # We cannot use -exec since wrapProgram is a function but not a - # command. - # - # jspawnhelper is executed from JVM, so it doesn't need to wrap it, - # and it breaks building OpenJDK (#114495). - for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' -not -name jspawnhelper ); do - if patchelf --print-interpreter "$bin" &> /dev/null || head -n 1 "$bin" | grep '^#!' -q; then - wrapProgram "$bin" \ - --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" - fi - done - - # copy-paste openjdk's preFixup - # Set JAVA_HOME automatically. - mkdir -p $out/nix-support - cat <<EOF > $out/nix-support/setup-hook - if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi - EOF - - find "$out" -name libfontmanager.so -exec \ - patchelf --add-needed libfontconfig.so {} \; - ''; - - # $out/bin/native-image needs zlib to build native executables. - propagatedBuildInputs = [ setJavaClassPath zlib ] ++ - # On Darwin native-image calls clang and it - # tries to include <Foundation/Foundation.h>, - # and Interactive Ruby (irb) requires OpenSSL - # headers. - lib.optionals stdenv.hostPlatform.isDarwin [ Foundation openssl ]; - - doInstallCheck = true; - installCheckPhase = '' - echo ${lib.escapeShellArg '' - public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World"); - } - } - ''} > HelloWorld.java - $out/bin/javac HelloWorld.java - - # run on JVM with Graal Compiler - $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' - - # Ahead-Of-Time compilation - $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces --no-server HelloWorld - ./helloworld | fgrep 'Hello World' - - ${lib.optionalString stdenv.isLinux '' - # Ahead-Of-Time compilation with --static - # --static flag doesn't work for darwin - $out/bin/native-image --no-server --static HelloWorld - ./helloworld | fgrep 'Hello World' - ''} - - echo "Testing interpreted languages" - $out/bin/graalpython -c 'print(1 + 1)' - $out/bin/ruby -e 'puts(1 + 1)' - $out/bin/node -e 'console.log(1 + 1)' - - echo '1 + 1' | $out/bin/graalpython - - ${lib.optionalString stdenv.isLinux '' - # TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL - # headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even - # though `openssl` is in `propagatedBuildInputs`. For more details see: - # https://github.com/NixOS/nixpkgs/pull/105815 - echo '1 + 1' | $out/bin/irb - ''} - - echo '1 + 1' | $out/bin/node -i - ${lib.optionalString (javaVersion == "11" && stdenv.isLinux) '' - # Doesn't work on MacOS, we have this error: "Launching JShell execution engine threw: Operation not permitted (Bind failed)" - echo '1 + 1' | $out/bin/jshell - ''}''; - - passthru.home = graalvmXXX-ce; - - meta = with lib; { - homepage = "https://www.graalvm.org/"; - description = "High-Performance Polyglot VM"; - license = with licenses; [ upl gpl2Classpath bsd3 ]; - maintainers = with maintainers; [ bandresen volth hlolli glittershark babariviere ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; - }; - }; - in - graalvmXXX-ce; -in { - graalvm8-ce = common "8"; - graalvm11-ce = common "11"; -} diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix new file mode 100644 index 000000000000..54cc917a5be0 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -0,0 +1,21 @@ +{ callPackage, Foundation }: + +let + mkGraal = opts: callPackage (import ./repository.nix opts) { + inherit Foundation; + }; +in { + inherit mkGraal; + + graalvm8-ce = mkGraal rec { + version = "21.2.0"; + javaVersion = "8"; + platforms = ["x86_64-linux"]; + }; + + graalvm11-ce = mkGraal rec { + version = "21.2.0"; + javaVersion = "11"; + platforms = ["x86_64-linux" "x86_64-darwin"]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/repository.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/repository.nix new file mode 100644 index 000000000000..50a3b53c579c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/repository.nix @@ -0,0 +1,271 @@ +{ version, javaVersion, platforms }: + +{ stdenv, lib, fetchurl, autoPatchelfHook, setJavaClassPath, makeWrapper +# minimum dependencies +, Foundation, alsa-lib, fontconfig, freetype, glibc, openssl, perl, unzip, xorg +, zlib +# runtime dependencies +, cups +# runtime dependencies for GTK+ Look and Feel +, gtkSupport ? true, cairo, glib, gtk3 }: + +let + platform = if stdenv.isDarwin then "darwin-amd64" else "linux-amd64"; + runtimeDependencies = [ cups ] + ++ lib.optionals gtkSupport [ cairo glib gtk3 ]; + runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies; + javaVersionPlatform = "${javaVersion}-${platform}"; + graalvmXXX-ce = stdenv.mkDerivation rec { + name = "graalvm${javaVersion}-ce"; + srcs = [ + (fetchurl { + sha256 = { + "8-linux-amd64" = "01gyxjmfp7wpcyn7x8b184fn0lp3xryfw619bqch120pzvr6z88f"; + "11-linux-amd64" = "0w7lhvxm4nggqdcl4xrhdd3y6dqw9jhyca9adjkp508n4lqf1lxv"; + "11-darwin-amd64" = "0dnahicdl0vhrbiml9z9nbb7k75hbsjj8rs246i1lwril12dqb7n"; + }.${javaVersionPlatform}; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersionPlatform}-${version}.tar.gz"; + }) + (fetchurl { + sha256 = { + "8-linux-amd64" = "1jlvrxdlbsmlk3ia43h9m29kmmdn83h6zdlnf8qb7bm38c84nhsc"; + "11-linux-amd64" = "1ybd7a6ii6582skr0nkxx7bccsa7gkg0yriql2h1lcz0rfzcdi3g"; + "11-darwin-amd64" = "1jdy845vanmz05zx5b9227gb1msh9wdrz2kf3fx9z54ssd9qgdhm"; + }.${javaVersionPlatform}; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersionPlatform}-${version}.jar"; + }) + (fetchurl { + sha256 = { + "8-linux-amd64" = "18ip0ay06q1pryqs8ja988mvk9vw475c0nfjcznnsd1zp296p6jc"; + "11-linux-amd64" = "1jszz97mkqavxzyhx5jxhi43kqjxk9c36j5l5hy3kn8sdfmbplm4"; + "11-darwin-amd64" = "1767ryhv2cn5anlys63ysax1p8ag79bykac1xfrjfan8yv6d8ybl"; + }.${javaVersionPlatform}; + url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersionPlatform}-${version}.jar"; + }) + (fetchurl { + sha256 = { + "8-linux-amd64" = "0il15438qnikqsxdsl7fcdg0c8zs3cbm4ry7pys7fxxr1ckd8szq"; + "11-linux-amd64" = "07759sr8nijvqm8aqn69x9vq7lyppns7a6l6xribv43jvfmwpfkl"; + "11-darwin-amd64" = "01l3as8dihc7xqy5sdkrpxmpzrqbcvvg84m2s6j1j8y2db1khf2s"; + }.${javaVersionPlatform}; + url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersionPlatform}-${version}.jar"; + }) + (fetchurl { + sha256 = { + "8-linux-amd64" = "08s36rjy5irg25b7lqx0m4v2wpywin3cqyhdrywhvq14f7zshsd5"; + "11-linux-amd64" = "1ybjaknmbsdg8qzb986x39fq0h7fyiymdcigc7y86swk8dd916hv"; + "11-darwin-amd64" = "02dwlb62kqr4rjjmvkhn2xk9l1p47ahg9xyyfkw7im1jwlqmqnzf"; + }.${javaVersionPlatform}; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersionPlatform}-${version}.jar"; + }) + ]; + + buildInputs = lib.optionals stdenv.isLinux [ + alsa-lib # libasound.so wanted by lib/libjsound.so + fontconfig + freetype + openssl # libssl.so wanted by languages/ruby/lib/mri/openssl.so + stdenv.cc.cc.lib # libstdc++.so.6 + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXrender + xorg.libXtst + zlib + ]; + + # Workaround for libssl.so.10 wanted by TruffleRuby + # Resulting TruffleRuby cannot use `openssl` library. + autoPatchelfIgnoreMissingDeps = true; + + nativeBuildInputs = [ unzip perl autoPatchelfHook makeWrapper ]; + + unpackPhase = '' + unpack_jar() { + jar=$1 + unzip -q -o $jar -d $out + perl -ne 'use File::Path qw(make_path); + use File::Basename qw(dirname); + if (/^(.+) = (.+)$/) { + make_path dirname("$ENV{out}/$1"); + system "ln -s $2 $ENV{out}/$1"; + }' $out/META-INF/symlinks + perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) { + my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) + + ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) + + ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0); + chmod $mode, "$ENV{out}/$1"; + }' $out/META-INF/permissions + rm -rf $out/META-INF + } + + mkdir -p $out + arr=($srcs) + + # The tarball on Linux has the following directory structure: + # + # graalvm-ce-java11-20.3.0/* + # + # while on Darwin it looks like this: + # + # graalvm-ce-java11-20.3.0/Contents/Home/* + # + # We therefor use --strip-components=1 vs 3 depending on the platform. + tar xf ''${arr[0]} -C $out --strip-components=${ + if stdenv.isLinux then "1" else "3" + } + + # Sanity check + if [ ! -d $out/bin ]; then + echo "The `bin` is directory missing after extracting the graalvm" + echo "tarball, please compare the directory structure of the" + echo "tarball with what happens in the unpackPhase (in particular" + echo "with regards to the `--strip-components` flag)." + exit 1 + fi + + unpack_jar ''${arr[1]} + unpack_jar ''${arr[2]} + unpack_jar ''${arr[3]} + unpack_jar ''${arr[4]} + ''; + + installPhase = { + "8-linux-amd64" = '' + # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html + substituteInPlace $out/jre/lib/security/java.security \ + --replace file:/dev/random file:/dev/./urandom \ + --replace NativePRNGBlocking SHA1PRNG + + # provide libraries needed for static compilation + for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do + ln -s $f $out/jre/lib/svm/clibraries/${platform}/$(basename $f) + done + + # allow using external truffle-api.jar and languages not included in the distrubution + rm $out/jre/lib/jvmci/parentClassLoader.classpath + ''; + "11-linux-amd64" = '' + # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html + substituteInPlace $out/conf/security/java.security \ + --replace file:/dev/random file:/dev/./urandom \ + --replace NativePRNGBlocking SHA1PRNG + + # provide libraries needed for static compilation + for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do + ln -s $f $out/lib/svm/clibraries/${platform}/$(basename $f) + done + ''; + "11-darwin-amd64" = '' + # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html + substituteInPlace $out/conf/security/java.security \ + --replace file:/dev/random file:/dev/./urandom \ + --replace NativePRNGBlocking SHA1PRNG + ''; + }.${javaVersionPlatform} + '' + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + ''; + + dontStrip = true; + + preFixup = '' + # We cannot use -exec since wrapProgram is a function but not a + # command. + # + # jspawnhelper is executed from JVM, so it doesn't need to wrap it, + # and it breaks building OpenJDK (#114495). + for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' -not -name jspawnhelper ); do + if patchelf --print-interpreter "$bin" &> /dev/null || head -n 1 "$bin" | grep '^#!' -q; then + wrapProgram "$bin" \ + --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" + fi + done + + # copy-paste openjdk's preFixup + # Set JAVA_HOME automatically. + mkdir -p $out/nix-support + cat <<EOF > $out/nix-support/setup-hook + if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi + EOF + + find "$out" -name libfontmanager.so -exec \ + patchelf --add-needed libfontconfig.so {} \; + ''; + + # $out/bin/native-image needs zlib to build native executables. + propagatedBuildInputs = [ setJavaClassPath zlib ] ++ + # On Darwin native-image calls clang and it + # tries to include <Foundation/Foundation.h>, + # and Interactive Ruby (irb) requires OpenSSL + # headers. + lib.optionals stdenv.hostPlatform.isDarwin [ Foundation openssl ]; + + doInstallCheck = true; + installCheckPhase = '' + echo ${ + lib.escapeShellArg '' + public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello World"); + } + } + '' + } > HelloWorld.java + $out/bin/javac HelloWorld.java + + # run on JVM with Graal Compiler + $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' + + # Ahead-Of-Time compilation + $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces --no-server HelloWorld + ./helloworld | fgrep 'Hello World' + + ${ + lib.optionalString stdenv.isLinux '' + # Ahead-Of-Time compilation with --static + # --static flag doesn't work for darwin + $out/bin/native-image --no-server --static HelloWorld + ./helloworld | fgrep 'Hello World' + '' + } + + echo "Testing interpreted languages" + $out/bin/graalpython -c 'print(1 + 1)' + $out/bin/ruby -e 'puts(1 + 1)' + + echo '1 + 1' | $out/bin/graalpython + + ${ + lib.optionalString stdenv.isLinux '' + # TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL + # headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even + # though `openssl` is in `propagatedBuildInputs`. For more details see: + # https://github.com/NixOS/nixpkgs/pull/105815 + echo '1 + 1' | $out/bin/irb + '' + } + + ${lib.optionalString (javaVersion == "11" && stdenv.isLinux) '' + # Doesn't work on MacOS, we have this error: "Launching JShell execution engine threw: Operation not permitted (Bind failed)" + echo '1 + 1' | $out/bin/jshell + ''}''; + + passthru.home = graalvmXXX-ce; + + meta = with lib; { + homepage = "https://www.graalvm.org/"; + description = "High-Performance Polyglot VM"; + license = with licenses; [ upl gpl2Classpath bsd3 ]; + maintainers = with maintainers; [ + bandresen + volth + hlolli + glittershark + babariviere + ericdallo + ]; + platforms = platforms; + }; + }; +in graalvmXXX-ce diff --git a/nixpkgs/pkgs/development/compilers/hop/default.nix b/nixpkgs/pkgs/development/compilers/hop/default.nix index 8e5bd6a7df03..00900b6fffe4 100644 --- a/nixpkgs/pkgs/development/compilers/hop/default.nix +++ b/nixpkgs/pkgs/development/compilers/hop/default.nix @@ -7,10 +7,11 @@ let bigloo-release = ; in stdenv.mkDerivation rec { - name = "hop-3.3.0"; + pname = "hop"; + version = "3.4.4"; src = fetchurl { - url = "ftp://ftp-sop.inria.fr/indes/fp/Hop/${name}.tar.gz"; - sha256 = "14gf9ihmw95zdnxsqhn5jymfivpfq5cg9v0y7yjd5i7c787dncp5"; + url = "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-${version}.tar.gz"; + sha256 = "sha256-GzXh4HC+SFFoUi7SMqu36iYRPAJ6tMnOHd+he6n9k1I="; }; postPatch = '' diff --git a/nixpkgs/pkgs/development/compilers/iasl/default.nix b/nixpkgs/pkgs/development/compilers/iasl/default.nix deleted file mode 100644 index fb6bd41344ad..000000000000 --- a/nixpkgs/pkgs/development/compilers/iasl/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{lib, stdenv, fetchurl, fetchpatch, bison, flex}: - -stdenv.mkDerivation rec { - pname = "iasl"; - version = "20200110"; - - src = fetchurl { - url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz"; - sha256 = "1cb6aa6acrixmdzvj9vv4qs9lmlsbkd27pjlz14i1kq1x3xn0gwx"; - }; - - NIX_CFLAGS_COMPILE = "-O3"; - - buildFlags = [ "iasl" ]; - - buildInputs = [ bison flex ]; - - installPhase = - '' - install -d $out/bin - install generate/unix/bin*/iasl $out/bin - ''; - - meta = { - description = "Intel ACPI Compiler"; - homepage = "http://www.acpica.org/"; - license = lib.licenses.iasl; - platforms = lib.platforms.unix; - }; -} diff --git a/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix index 75687de4e9e2..1c40d7fe516b 100644 --- a/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix +++ b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix @@ -1,8 +1,8 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , cmake -, pkg-config - +, runCommandLocal , bison , flex , llvmPackages_8 @@ -46,18 +46,14 @@ stdenv.mkDerivation rec { doCheck = false; # Handholding the braindead build script - # We put this in a derivation because the cmake requires an absolute path - prebuilds = stdenv.mkDerivation { - name = "igc-cclang-prebuilds"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir $out - ln -s ${clang}/bin/clang $out/ - ln -s clang $out/clang-${versions.major (getVersion clang)} - ln -s ${opencl-clang}/lib/* $out/ - ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ - ''; - }; + # cmake requires an absolute path + prebuilds = runCommandLocal "igc-cclang-prebuilds" { } '' + mkdir $out + ln -s ${clang}/bin/clang $out/ + ln -s clang $out/clang-${versions.major (getVersion clang)} + ln -s ${opencl-clang}/lib/* $out/ + ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ + ''; cmakeFlags = [ "-DCCLANG_BUILD_PREBUILDS=ON" @@ -66,10 +62,10 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - homepage = "https://github.com/intel/intel-graphics-compiler"; + homepage = "https://github.com/intel/intel-graphics-compiler"; description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware"; - license = licenses.mit; - platforms = platforms.all; + license = licenses.mit; + platforms = platforms.all; maintainers = with maintainers; [ gloaming ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix index f3bd5d9f4a31..e36dedf3c875 100644 --- a/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -2,12 +2,12 @@ openjdk11.overrideAttrs (oldAttrs: rec { pname = "jetbrains-jdk"; - version = "11.0.10-b1427"; + version = "11_0_11-b1504.13"; src = fetchFromGitHub { owner = "JetBrains"; repo = "JetBrainsRuntime"; - rev = "jb${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "sha256-2cn+FiFfGpp7CBeQMAASVZwTm6DOFaXaWxAL/nVC2Nk="; + rev = "jb${version}"; + sha256 = "1xpgsgmmj5jp5qyw98hqmik6a7z3hfwmij023ij3qqymyj3nhm2i"; }; patches = []; meta = with lib; { @@ -23,7 +23,7 @@ openjdk11.overrideAttrs (oldAttrs: rec { JetBrains Runtime is not a certified build of OpenJDK. Please, use at your own risk. ''; - homepage = "https://bintray.com/jetbrains/intellij-jdk/"; + homepage = "https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime"; inherit (openjdk11.meta) license platforms mainProgram; maintainers = with maintainers; [ edwtjo petabyteboy ]; }; diff --git a/nixpkgs/pkgs/development/compilers/jwasm/default.nix b/nixpkgs/pkgs/development/compilers/jwasm/default.nix index 2f1727ae0de0..88e9450ef9d6 100644 --- a/nixpkgs/pkgs/development/compilers/jwasm/default.nix +++ b/nixpkgs/pkgs/development/compilers/jwasm/default.nix @@ -1,33 +1,42 @@ -{ lib, stdenv, fetchFromGitHub -, cmake }: +{ lib +, stdenv +, fetchFromGitHub +}: -with lib; stdenv.mkDerivation rec { pname = "jwasm"; - version = "2.13"; + version = "2.14"; src = fetchFromGitHub { - owner = "JWasm"; + owner = "Baron-von-Riedesel"; repo = "JWasm"; - rev = version; - sha256 = "0m972pc8vk8s9yv1pi85fsjgm6hj24gab7nalw2q04l0359nqi7w"; + rev = "v${version}"; + hash = "sha256-BUSsF73Q2vq6tF/YHMUyAmmFE/WWVQLRFJZkOD8T7f8="; }; - nativeBuildInputs = [ cmake ]; + outputs = [ "out" "doc" ]; - installPhase = '' - install -Dpm755 jwasm -t $out/bin/ - install -Dpm644 $src/History.txt $src/Readme.txt \ - $src/Doc/enh.txt $src/Doc/fixes.txt \ - $src/Doc/gencode.txt $src/Doc/overview.txt \ - -t $out/share/doc/jwasm/ + dontConfigure = true; + + preBuild = '' + cp ${if stdenv.cc.isClang then "CLUnix.mak" else "GccUnix.mak"} Makefile + substituteInPlace Makefile \ + --replace "/usr/local/bin" "${placeholder "out"}/bin" + ''; + + postInstall = '' + install -Dpm644 $src/Html/License.html \ + $src/Html/Manual.html \ + $src/Html/Readme.html \ + -t $doc/share/doc/jwasm/ ''; - meta = { + meta = with lib; { + homepage = "https://github.com/Baron-von-Riedesel/JWasm/"; description = "A MASM-compatible x86 assembler"; - homepage = "http://jwasm.github.io/"; license = licenses.gpl2Plus; maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.darwin ++ platforms.linux; + platforms = platforms.unix; }; } +# TODO: generalize for Windows builds diff --git a/nixpkgs/pkgs/development/compilers/kotlin/default.nix b/nixpkgs/pkgs/development/compilers/kotlin/default.nix index 7e46e4bf2eaf..a1de91f2d396 100644 --- a/nixpkgs/pkgs/development/compilers/kotlin/default.nix +++ b/nixpkgs/pkgs/development/compilers/kotlin/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "kotlin"; - version = "1.5.21"; + version = "1.5.30"; src = fetchurl { url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip"; - sha256 = "sha256-8zE6/dar8bjHXGKS9OQfLbr+/I9scnYse6mz2u712lk="; + sha256 = "sha256-Je69ubsuFl5LqO+/j/lDxF1Pw52//CwcqgWejdgTZ18="; }; propagatedBuildInputs = [ jre ] ; diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix index c48e2a84336a..faba5d97b79d 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -14,7 +14,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix index 11367d453cde..690328b26ae2 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/10/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix @@ -259,4 +259,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix index 65b024e8cc32..e5b79692ae24 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -15,7 +15,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "0x1j8ngf1zj63wlnns9vlibafq48qcm72p4jpaxkmkb4qw0grwfy"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; NIX_CFLAGS_COMPILE = [ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" @@ -112,5 +112,8 @@ stdenv.mkDerivation { # "All of the code in the compiler-rt project is dual licensed under the MIT # license and the UIUC License (a BSD-like license)": license = with lib.licenses; [ mit ncsa ]; + # compiler-rt requires a Clang stdenv on 32-bit RISC-V: + # https://reviews.llvm.org/D43106#1019077 + broken = stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.is32bit && !stdenv.cc.isClang; }; } diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix index 1aad123fba9a..9834ce30cdd2 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix @@ -227,7 +227,7 @@ let compiler-rt-libc = callPackage ./compiler-rt { inherit llvm_meta; - stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) + stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.is32bit) then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc else stdenv; }; @@ -240,7 +240,7 @@ let }; # N.B. condition is safe because without useLLVM both are the same. - compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) + compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.libc == "newlib") then libraries.compiler-rt-libc else libraries.compiler-rt-no-libc; @@ -274,4 +274,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix index 192cacd6510c..f0148850dbe8 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -94,6 +94,7 @@ in stdenv.mkDerivation (rec { rm test/DebugInfo/X86/convert-inlined.ll rm test/DebugInfo/X86/convert-linked.ll rm test/tools/dsymutil/X86/op-convert.test + rm test/tools/llvm-readobj/ELF/dependent-libraries.test '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' # Seems to require certain floating point hardware (NEON?) rm test/ExecutionEngine/frem.ll diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index fdc134bdf4b1..16f58616aab7 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -14,7 +14,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "1950rg294izdwkaasi7yjrmadc9mzdd5paf0q63jjcq2m3rdbj5l"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix index 212c6e52876f..388c7d95f69c 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/12/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/12/default.nix @@ -267,4 +267,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix index 361c6798385d..7ac5031c36bb 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -98,7 +98,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/vla-multi.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/nixpkgs/pkgs/development/compilers/llvm/13/bintools/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/bintools/default.nix new file mode 100644 index 000000000000..53f7941e3369 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/bintools/default.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/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix new file mode 100644 index 000000000000..78c2831a2f35 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/default.nix @@ -0,0 +1,122 @@ +{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3 +, buildLlvmTools +, fixDarwinDylibNames +, enableManpages ? false +}: + +let + self = stdenv.mkDerivation ({ + pname = "clang"; + inherit version; + + inherit src; + sourceRoot = "source/clang"; + + nativeBuildInputs = [ cmake python3 ] + ++ lib.optional enableManpages python3.pkgs.sphinx + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; + + buildInputs = [ libxml2 libllvm ]; + + cmakeFlags = [ + "-DCMAKE_CXX_FLAGS=-std=c++14" + "-DCLANGD_BUILD_XPC=OFF" + "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}" + ] ++ lib.optionals enableManpages [ + "-DCLANG_INCLUDE_DOCS=ON" + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" + "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen" + ]; + + patches = [ + ./purity.patch + # https://reviews.llvm.org/D51899 + ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-11-12-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) + ]; + + 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 + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp + ''; + + outputs = [ "out" "lib" "dev" "python" ]; + + postInstall = '' + 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 + + mkdir -p $dev/bin + cp bin/clang-tblgen $dev/bin + ''; + + passthru = { + isClang = true; + inherit libllvm; + }; + + meta = llvm_meta // { + homepage = "https://clang.llvm.org/"; + description = "A C language family frontend for LLVM"; + longDescription = '' + The Clang project provides a language front-end and tooling + infrastructure for languages in the C language family (C, C++, Objective + C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project. + It aims to deliver amazingly fast compiles, extremely useful error and + warning messages and to provide a platform for building great source + level tools. The Clang Static Analyzer and clang-tidy are tools that + automatically find bugs in your code, and are great examples of the sort + of tools that can be built using the Clang frontend as a library to + parse C/C++ code. + ''; + }; + } // 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 = llvm_meta // { + description = "man page for Clang ${version}"; + }; + }); +in self diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch new file mode 100644 index 000000000000..b834d386b4eb --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch @@ -0,0 +1,235 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e74014134a0..976e6a1757fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4) + if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + project(Clang) + ++ include(GNUInstallDirs) ++ + set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") + set(CMAKE_CXX_STANDARD_REQUIRED YES) + set(CMAKE_CXX_EXTENSIONS NO) +@@ -416,7 +418,7 @@ include_directories(BEFORE + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/clang include/clang-c +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT clang-headers + FILES_MATCHING + PATTERN "*.def" +@@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + ) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT clang-headers + FILES_MATCHING + PATTERN "CMakeFiles" EXCLUDE +@@ -445,7 +447,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + + add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh) + install(PROGRAMS utils/bash-autocomplete.sh +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT bash-autocomplete) + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-bash-autocomplete +diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake +index 704278a0e93b..d25c8d325c71 100644 +--- a/cmake/modules/AddClang.cmake ++++ b/cmake/modules/AddClang.cmake +@@ -123,9 +123,9 @@ macro(add_clang_library name) + install(TARGETS ${lib} + COMPONENT ${lib} + ${export_to_clangtargets} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- RUNTIME DESTINATION bin) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-${lib} +@@ -170,7 +170,7 @@ macro(add_clang_tool name) + + install(TARGETS ${name} + ${export_to_clangtargets} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT ${name}) + + if(NOT LLVM_ENABLE_IDE) +@@ -185,7 +185,7 @@ endmacro() + macro(add_clang_symlink name dest) + add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) + # Always generate install targets +- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) ++ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) + endmacro() + + function(clang_target_link_libraries target type) +diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt +index b2c0ce8dd4a0..19e5443d8c25 100644 +--- a/lib/Headers/CMakeLists.txt ++++ b/lib/Headers/CMakeLists.txt +@@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES + FOLDER "Misc" + RUNTIME_OUTPUT_DIRECTORY "${output_dir}") + +-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) ++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) + + install( + FILES ${files} ${generated_files} +diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt +index ceef4b08637c..8efad5520ca4 100644 +--- a/tools/c-index-test/CMakeLists.txt ++++ b/tools/c-index-test/CMakeLists.txt +@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH + "@executable_path/../../lib") + else() +- set(INSTALL_DESTINATION bin) ++ set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + + install(TARGETS c-index-test +diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt +index 35ecdb11253c..d77d75de0094 100644 +--- a/tools/clang-format/CMakeLists.txt ++++ b/tools/clang-format/CMakeLists.txt +@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE ) + endif() + + install(PROGRAMS clang-format-bbedit.applescript +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-format) + install(PROGRAMS clang-format-diff.py +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-format) + install(PROGRAMS clang-format-sublime.py +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-format) + install(PROGRAMS clang-format.el +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-format) + install(PROGRAMS clang-format.py +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-format) + install(PROGRAMS git-clang-format +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT clang-format) +diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt +index cda8e29ec5b1..0134d8ccd70b 100644 +--- a/tools/clang-rename/CMakeLists.txt ++++ b/tools/clang-rename/CMakeLists.txt +@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename + ) + + install(PROGRAMS clang-rename.py +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-rename) + install(PROGRAMS clang-rename.el +- DESTINATION share/clang ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang + COMPONENT clang-rename) +diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt +index 51ff2e7e1565..1ed5f8a079a1 100644 +--- a/tools/libclang/CMakeLists.txt ++++ b/tools/libclang/CMakeLists.txt +@@ -166,7 +166,7 @@ endif() + if(INTERNAL_INSTALL_PREFIX) + set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include") + else() +- set(LIBCLANG_HEADERS_INSTALL_DESTINATION include) ++ set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + endif() + + install(DIRECTORY ../../include/clang-c +@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) + COMPONENT + libclang-python-bindings + DESTINATION +- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") ++ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") + endforeach() + if(NOT LLVM_ENABLE_IDE) + add_custom_target(libclang-python-bindings) +diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt +index ec0702d76f18..d25d982f51da 100644 +--- a/tools/scan-build/CMakeLists.txt ++++ b/tools/scan-build/CMakeLists.txt +@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT scan-build) + endforeach() + +@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile}) + install(PROGRAMS libexec/${LibexecFile} +- DESTINATION libexec ++ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR} + COMPONENT scan-build) + endforeach() + +@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile}) + install(FILES share/scan-build/${ShareFile} +- DESTINATION share/scan-build ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build + COMPONENT scan-build) + endforeach() + +diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt +index dd3d33439299..fea19c12ce70 100644 +--- a/tools/scan-view/CMakeLists.txt ++++ b/tools/scan-view/CMakeLists.txt +@@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) + install(PROGRAMS bin/${BinFile} +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT scan-view) + endforeach() + +@@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}) + list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}) + install(FILES share/${ShareFile} +- DESTINATION share/scan-view ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view + COMPONENT scan-view) + endforeach() + +diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt +index 62f2de0cb15c..6aa66825b6ec 100644 +--- a/utils/hmaptool/CMakeLists.txt ++++ b/utils/hmaptool/CMakeLists.txt +@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM + + list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) + install(PROGRAMS ${CLANG_HMAPTOOL} +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT hmaptool) + + add_custom_target(hmaptool ALL DEPENDS ${Depends}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch new file mode 100644 index 000000000000..deb230a36c5b --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/clang/purity.patch @@ -0,0 +1,28 @@ +From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +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 +@@ -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) { +- CmdArgs.push_back("-dynamic-linker"); +- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + +- ToolChain.getDynamicLinker(Args))); +- } + } + + CmdArgs.push_back("-o"); +-- +2.11.0 diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch new file mode 100644 index 000000000000..66742e5b1498 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch @@ -0,0 +1,21 @@ +diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt +index 3a66dd9c3fb..7efc85d9f9f 100644 +--- a/lib/builtins/CMakeLists.txt ++++ b/lib/builtins/CMakeLists.txt +@@ -345,4 +345,8 @@ if (NOT MSVC) + ++ set(i486_SOURCES ${i386_SOURCES}) ++ set(i586_SOURCES ${i386_SOURCES}) ++ set(i686_SOURCES ${i386_SOURCES}) ++ + if (WIN32) + set(i386_SOURCES + ${i386_SOURCES} +@@ -608,6 +612,7 @@ else () + endif() + + foreach (arch ${BUILTIN_SUPPORTED_ARCH}) ++ message("arch: ${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)$") diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch new file mode 100644 index 000000000000..120cfe6feb2a --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/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/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch new file mode 100644 index 000000000000..065959d14d46 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch @@ -0,0 +1,33 @@ +From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +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 bc69ec95c419..9f100fdcec2f 100644 +--- a/cmake/Modules/AddCompilerRT.cmake ++++ b/cmake/Modules/AddCompilerRT.cmake +@@ -366,14 +366,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 - $<TARGET_FILE:${libname}> +- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR} +- ) +- endif() + endif() + + set(parent_target_arg) +2.14.1 + diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch new file mode 100644 index 000000000000..425dc2af01e7 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch @@ -0,0 +1,71 @@ +diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp +--- a/lib/sanitizer_common/sanitizer_mac.cpp ++++ b/lib/sanitizer_common/sanitizer_mac.cpp +@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) { + // Offset example: + // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4 + constexpr u16 GetOSMajorKernelOffset() { +- if (TARGET_OS_OSX) return 4; +- if (TARGET_OS_IOS || TARGET_OS_TV) return 6; +- if (TARGET_OS_WATCH) return 13; ++#if TARGET_OS_OSX ++ return 4; ++#endif ++#if TARGET_OS_IOS || TARGET_OS_TV ++ return 6; ++#endif ++#if TARGET_OS_WATCH ++ return 13; ++#endif + } + + using VersStr = char[64]; +@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) { + u16 os_major = kernel_major - offset; + + const char *format = "%d.0"; +- if (TARGET_OS_OSX) { +- if (os_major >= 16) { // macOS 11+ +- os_major -= 5; +- } else { // macOS 10.15 and below +- format = "10.%d"; +- } ++#if TARGET_OS_OSX ++ if (os_major >= 16) { // macOS 11+ ++ os_major -= 5; ++ } else { // macOS 10.15 and below ++ format = "10.%d"; + } ++#endif + return internal_snprintf(vers, sizeof(VersStr), format, os_major); + } + +@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) { + // Aligned versions example: + // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6 + static void MapToMacos(u16 *major, u16 *minor) { +- if (TARGET_OS_OSX) +- return; +- +- if (TARGET_OS_IOS || TARGET_OS_TV) ++#if !TARGET_OS_OSX ++#if TARGET_OS_IOS || TARGET_OS_TV + *major += 2; +- else if (TARGET_OS_WATCH) ++#elif TARGET_OS_WATCH + *major += 9; +- else ++#else + UNREACHABLE("unsupported platform"); ++#endif + + if (*major >= 16) { // macOS 11+ + *major -= 5; +@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) { + *minor = *major; + *major = 10; + } ++#endif + } + + static MacosVersion GetMacosAlignedVersionInternal() { diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix new file mode 100644 index 000000000000..8fc32bbd0aec --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -0,0 +1,116 @@ +{ lib, stdenv, llvm_meta, version, src, cmake, python3, libllvm, libcxxabi }: + +let + + useLLVM = stdenv.hostPlatform.useLLVM or false; + bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none"; + haveLibc = stdenv.cc.libc != null; + inherit (stdenv.hostPlatform) isMusl; + +in + +stdenv.mkDerivation { + pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc"; + inherit version; + + inherit src; + sourceRoot = "source/compiler-rt"; + + nativeBuildInputs = [ cmake python3 libllvm.dev ]; + buildInputs = 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}" + ] ++ 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" + ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [ + "-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)}" + ] ++ lib.optionals (useLLVM && !haveLibc) [ + "-DCMAKE_C_FLAGS=-nodefaultlibs" + ] ++ lib.optionals (useLLVM) [ + "-DCOMPILER_RT_BUILD_BUILTINS=ON" + #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" + ] ++ lib.optionals (bareMetal) [ + "-DCOMPILER_RT_OS_DIR=baremetal" + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ + "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON" + "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}" + "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}" + ]; + + outputs = [ "out" "dev" ]; + + patches = [ + ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory + ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config + # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the + # extra `/`. + ./normalize-var.patch + ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch + # Prevent a compilation error on darwin + ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch + ++ lib.optional stdenv.hostPlatform.isAarch32 ./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 = lib.optionalString (!stdenv.isDarwin) '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)' + substituteInPlace cmake/config-ix.cmake \ + --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' + '' + lib.optionalString (useLLVM) '' + substituteInPlace lib/builtins/int_util.c \ + --replace "#include <stdlib.h>" "" + substituteInPlace lib/builtins/clear_cache.c \ + --replace "#include <assert.h>" "" + substituteInPlace lib/builtins/cpu_model.c \ + --replace "#include <assert.h>" "" + ''; + + # Hack around weird upsream RPATH bug + postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) '' + ln -s "$out/lib"/*/* "$out/lib" + '' + 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 + ''; + + meta = llvm_meta // { + homepage = "https://compiler-rt.llvm.org/"; + description = "Compiler runtime libraries"; + longDescription = '' + The compiler-rt project provides highly tuned implementations of the + low-level code generator support routines like "__fixunsdfdi" and other + calls generated when a target doesn't have a short sequence of native + instructions to implement a core IR operation. It also provides + implementations of run-time libraries for dynamic testing tools such as + AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer. + ''; + # "All of the code in the compiler-rt project is dual licensed under the MIT + # license and the UIUC License (a BSD-like license)": + license = with lib.licenses; [ mit ncsa ]; + # TODO/FIXME: Build fails on Hydra: + broken = stdenv.isAarch64; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch new file mode 100644 index 000000000000..135cf625ef78 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch @@ -0,0 +1,16 @@ +diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +index f1f46fb9599c..6f19e69507ba 100644 +--- a/cmake/Modules/CompilerRTUtils.cmake ++++ b/cmake/Modules/CompilerRTUtils.cmake +@@ -302,8 +302,9 @@ macro(load_llvm_config) + # Get some LLVM variables from LLVMConfig. + include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") + +- set(LLVM_LIBRARY_OUTPUT_INTDIR +- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) ++ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR ++ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX} ++ REALPATH) + endif() + endmacro() + diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch new file mode 100644 index 000000000000..1f2ac97818eb --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch @@ -0,0 +1,412 @@ +From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +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 <anarchy@gentoo.org> + +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 <link.h> + #endif + +-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS ++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU + #include <ucontext.h> + 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 <glob.h> +-#include <obstack.h> ++# if !SANITIZER_NONGNU ++# include <obstack.h> ++# endif + #include <mqueue.h> +-#include <net/if_ppp.h> +-#include <netax25/ax25.h> +-#include <netipx/ipx.h> +-#include <netrom/netrom.h> ++#include <linux/if_ppp.h> ++#include <linux/ax25.h> ++#include <linux/ipx.h> ++#include <linux/netrom.h> + #if HAVE_RPC_XDR_H + # include <rpc/xdr.h> + #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 <sys/ustat.h> 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 + diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix new file mode 100644 index 000000000000..76a46492cf74 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix @@ -0,0 +1,267 @@ +{ lowPrio, newScope, pkgs, lib, stdenv, cmake +, gccForLibs, preLibcCrossHeaders +, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith +, buildLlvmTools # tools, but from the previous stage, for cross +, targetLlvmLibraries # libraries, but from the next stage, for cross +# This is the default binutils, but with *this* version of LLD rather +# than the default LLVM verion's, if LLD is the choice. We use these for +# the `useLLVM` bootstrapping below. +, bootBintoolsNoLibc ? + if stdenv.targetPlatform.linker == "lld" + then null + else pkgs.bintoolsNoLibc +, bootBintools ? + if stdenv.targetPlatform.linker == "lld" + then null + else pkgs.bintools +, darwin +}: + +let + release_version = "13.0.0"; + candidate = "rc2"; # empty or "rcN" + dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; + rev = ""; # When using a Git commit + rev-version = ""; # When using a Git commit + version = if rev != "" then rev-version else "${release_version}${dash-candidate}"; + targetConfig = stdenv.targetPlatform.config; + + src = fetchFromGitHub { + owner = "llvm"; + repo = "llvm-project"; + rev = if rev != "" then rev else "llvmorg-${version}"; + sha256 = "06cy6v231w067g310bwpk6a654j6q9rcxa0y0wz5sc5rrh61zjrn"; + }; + + llvm_meta = { + license = lib.licenses.ncsa; + maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ]; + platforms = lib.platforms.all; + }; + + tools = lib.makeExtensible (tools: let + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version src buildLlvmTools; }); + mkExtraBuildCommands0 = cc: '' + rsrc="$out/resource-root" + mkdir "$rsrc" + ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc" + echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags + ''; + mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + '' + ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" + ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share" + ''; + + bintoolsNoLibc' = + if bootBintoolsNoLibc == null + then tools.bintoolsNoLibc + else bootBintoolsNoLibc; + bintools' = + if bootBintools == null + then tools.bintools + else bootBintools; + + in { + + libllvm = callPackage ./llvm { + inherit llvm_meta; + }; + + # `llvm` historically had the binaries. When choosing an output explicitly, + # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get* + llvm = tools.libllvm.out // { outputUnspecified = true; }; + + libclang = callPackage ./clang { + inherit llvm_meta; + }; + + clang-unwrapped = tools.libclang.out // { outputUnspecified = true; }; + + llvm-manpages = lowPrio (tools.libllvm.override { + enableManpages = true; + python3 = pkgs.python3; # don't use python-boot + }); + + clang-manpages = lowPrio (tools.libclang.override { + enableManpages = true; + python3 = pkgs.python3; # don't use python-boot + }); + + # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins' + # lldb-manpages = lowPrio (tools.lldb.override { + # enableManpages = true; + # python3 = pkgs.python3; # don't use python-boot + # }); + + 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 { + inherit llvm_meta; + }; + + lldb = callPackage ./lldb { + inherit llvm_meta; + inherit (darwin) libobjc bootstrap_cmds; + inherit (darwin.apple_sdk.libs) xpc; + inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa; + }; + + # 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-unwrapped = callPackage ./bintools {}; + + bintoolsNoLibc = wrapBintoolsWith { + bintools = tools.bintools-unwrapped; + libc = preLibcCrossHeaders; + }; + + bintools = wrapBintoolsWith { + bintools = tools.bintools-unwrapped; + }; + + clangUseLLVM = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = targetLlvmLibraries.libcxx; + bintools = bintools'; + extraPackages = [ + targetLlvmLibraries.libcxxabi + targetLlvmLibraries.compiler-rt + ] ++ 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 + '' + lib.optionalString (!stdenv.targetPlatform.isWasm) '' + echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags + '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) '' + echo "-lunwind" >> $out/nix-support/cc-ldflags + '' + lib.optionalString stdenv.targetPlatform.isWasm '' + echo "-fno-exceptions" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands cc; + }; + + clangNoLibcxx = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = 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; + }; + + clangNoLibc = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = bintoolsNoLibc'; + 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; + }; + + clangNoCompilerRt = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = bintoolsNoLibc'; + extraPackages = [ ]; + extraBuildCommands = '' + echo "-nostartfiles" >> $out/nix-support/cc-cflags + '' + mkExtraBuildCommands0 cc; + }; + + clangNoCompilerRtWithLibc = wrapCCWith rec { + cc = tools.clang-unwrapped; + libcxx = null; + bintools = bintools'; + extraPackages = [ ]; + extraBuildCommands = mkExtraBuildCommands0 cc; + }; + + }); + + libraries = lib.makeExtensible (libraries: let + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version src; }); + in { + + compiler-rt-libc = callPackage ./compiler-rt { + inherit llvm_meta; + stdenv = if stdenv.hostPlatform.useLLVM or false + then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc + else stdenv; + }; + + compiler-rt-no-libc = callPackage ./compiler-rt { + inherit llvm_meta; + stdenv = if stdenv.hostPlatform.useLLVM or false + then overrideCC stdenv buildLlvmTools.clangNoCompilerRt + else stdenv; + }; + + # N.B. condition is safe because without useLLVM both are the same. + compiler-rt = if stdenv.hostPlatform.isAndroid + then libraries.compiler-rt-libc + else libraries.compiler-rt-no-libc; + + stdenv = overrideCC stdenv buildLlvmTools.clang; + + libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; + + libcxx = callPackage ./libcxx { + inherit llvm_meta; + stdenv = if stdenv.hostPlatform.useLLVM or false + then overrideCC stdenv buildLlvmTools.clangNoLibcxx + else stdenv; + }; + + libcxxabi = callPackage ./libcxxabi { + inherit llvm_meta; + stdenv = if stdenv.hostPlatform.useLLVM or false + then overrideCC stdenv buildLlvmTools.clangNoLibcxx + else stdenv; + }; + + libunwind = callPackage ./libunwind { + inherit llvm_meta; + stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx; + }; + + openmp = callPackage ./openmp { + inherit llvm_meta; + }; + }); + +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix new file mode 100644 index 000000000000..c60039274deb --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/default.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, llvm_meta, src, cmake, python3, fixDarwinDylibNames, version +, enableShared ? !stdenv.hostPlatform.isStatic +}: + +stdenv.mkDerivation rec { + pname = "libcxx"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + outputs = [ "out" "dev" ]; + + patches = [ + ./gnu-install-dirs.patch + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ + ../../libcxx-0001-musl-hacks.patch + ]; + + preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' + patchShebangs utils/cat_files.py + ''; + + nativeBuildInputs = [ cmake python3 ] + ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + + cmakeFlags = [ + ] ++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1" + ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" + ++ lib.optional stdenv.hostPlatform.isWasm [ + "-DLIBCXX_ENABLE_THREADS=OFF" + "-DLIBCXX_ENABLE_FILESYSTEM=OFF" + "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" + ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; + + passthru = { + isLLVM = true; + }; + + meta = llvm_meta // { + homepage = "https://libcxx.llvm.org/"; + description = "C++ standard library"; + longDescription = '' + libc++ is an implementation of the C++ standard library, targeting C++11, + C++14 and above. + ''; + + # https://github.com/NixOS/nixpkgs/pull/133217#issuecomment-895742807 + broken = stdenv.isDarwin; + + # "All of the code in libc++ is dual licensed under the MIT license and the + # UIUC License (a BSD-like license)": + license = with lib.licenses; [ mit ncsa ]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch new file mode 100644 index 000000000000..744967a6ee0b --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1e25358d41a..7fe1f4d85401 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD) + project(libcxx CXX C) + ++ include(GNUInstallDirs) ++ + set(PACKAGE_NAME libcxx) + set(PACKAGE_VERSION 13.0.0git) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +@@ -412,7 +414,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1") +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +@@ -426,7 +428,7 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +@@ -436,7 +438,7 @@ else() + set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1") + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake +index 5a8a4a270a1a..c06bae0001aa 100644 +--- a/cmake/Modules/HandleLibCXXABI.cmake ++++ b/cmake/Modules/HandleLibCXXABI.cmake +@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs) + + if (LIBCXX_INSTALL_HEADERS) + install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}" +- DESTINATION include/c++/v1/${dstdir} ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir} + COMPONENT cxx-headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 496429f3841e..1a0c9c0a3159 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -376,21 +376,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY) + install(TARGETS cxx_shared + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx +- RUNTIME DESTINATION bin COMPONENT cxx) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx) + endif() + + if (LIBCXX_INSTALL_STATIC_LIBRARY) + install(TARGETS cxx_static + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx +- RUNTIME DESTINATION bin COMPONENT cxx) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx) + endif() + + if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY) + install(TARGETS cxx_experimental + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx +- RUNTIME DESTINATION bin COMPONENT cxx) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx) + endif() + + # NOTE: This install command must go after the cxx install command otherwise diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix new file mode 100644 index 000000000000..7fadc6d6dcac --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix @@ -0,0 +1,76 @@ +{ lib, stdenv, llvm_meta, cmake, python3, src, libunwind, version +, enableShared ? !stdenv.hostPlatform.isStatic +, libcxx +}: + +stdenv.mkDerivation rec { + pname = "libcxxabi"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + outputs = [ "out" "dev" ]; + + postUnpack = lib.optionalString stdenv.isDarwin '' + export TRIPLE=x86_64-apple-darwin + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch} + '' + lib.optionalString stdenv.hostPlatform.isWasm '' + patch -p1 -d llvm -i ${./wasm.patch} + ''; + + patches = [ + ./gnu-install-dirs.patch + ]; + + nativeBuildInputs = [ cmake python3 ]; + buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; + + cmakeFlags = [ + "-DLIBCXXABI_LIBCXX_INCLUDES=${libcxx.dev}/include/c++/v1" + ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ + "-DLLVM_ENABLE_LIBCXX=ON" + "-DLIBCXXABI_USE_LLVM_UNWINDER=ON" + ] ++ lib.optionals stdenv.hostPlatform.isWasm [ + "-DLIBCXXABI_ENABLE_THREADS=OFF" + "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF" + ] ++ lib.optionals (!enableShared) [ + "-DLIBCXXABI_ENABLE_SHARED=OFF" + ]; + + 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 + '' + 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 = llvm_meta // { + homepage = "https://libcxxabi.llvm.org/"; + description = "Provides C++ standard library support"; + longDescription = '' + libc++abi is a new implementation of low level support for a standard C++ library. + ''; + # "All of the code in libc++abi is dual licensed under the MIT license and + # the UIUC License (a BSD-like license)": + license = with lib.licenses; [ mit ncsa ]; + maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch new file mode 100644 index 000000000000..5d562dd59a99 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9fb35860d483..5739d9e8af62 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD) + project(libcxxabi CXX C) + ++ include(GNUInstallDirs) ++ + set(PACKAGE_NAME libcxxabi) + set(PACKAGE_VERSION 11.0.0git) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +@@ -195,7 +197,7 @@ set(CMAKE_MODULE_PATH + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) + set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libc++abi libraries should be installed.") + if(LIBCXX_LIBDIR_SUBDIR) + string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) +@@ -204,12 +206,12 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + elseif(LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) + set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++abi libraries should be installed.") + else() + set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR}) + set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++abi libraries should be installed.") + endif() + diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch new file mode 100644 index 000000000000..4ebfe46aa813 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/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/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix new file mode 100644 index 000000000000..b6017e741728 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, llvm_meta, version, src, cmake +, enableShared ? !stdenv.hostPlatform.isStatic +}: + +stdenv.mkDerivation rec { + pname = "libunwind"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + patches = [ + ./gnu-install-dirs.patch + ]; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF"; + + meta = llvm_meta // { + # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst + homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library"; + description = "LLVM's unwinder library"; + longDescription = '' + The unwind library provides a family of _Unwind_* functions implementing + the language-neutral stack unwinding portion of the Itanium C++ ABI (Level + I). It is a dependency of the C++ ABI library, and sometimes is a + dependency of other runtimes. + ''; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch new file mode 100644 index 000000000000..8cd25c56f8cc --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 81eddbc24879..e2afb2002150 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD) + project(libunwind LANGUAGES C CXX ASM) + ++ include(GNUInstallDirs) ++ + set(PACKAGE_NAME libunwind) + set(PACKAGE_VERSION 13.0.0git) + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH + + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libunwind libraries should be installed.") + if(LIBCXX_LIBDIR_SUBDIR) + string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) +@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + endif() + elseif(LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH + "Path where built libunwind libraries should be installed.") + else() + set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH + "Path where built libunwind libraries should be installed.") + endif() + diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix new file mode 100644 index 000000000000..34ac265f4bfd --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/lld/default.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, llvm_meta +, buildLlvmTools +, src +, cmake +, libxml2 +, libllvm +, version +}: + +stdenv.mkDerivation rec { + pname = "lld"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + patches = [ + ./gnu-install-dirs.patch + ]; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libllvm libxml2 ]; + + cmakeFlags = [ + "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" + ]; + + outputs = [ "out" "lib" "dev" ]; + + meta = llvm_meta // { + homepage = "https://lld.llvm.org/"; + description = "The LLVM linker"; + longDescription = '' + LLD is a linker from the LLVM project that is a drop-in replacement for + system linkers and runs much faster than them. It also provides features + that are useful for toolchain developers. + The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and + WebAssembly in descending order of completeness. Internally, LLD consists + of several different linkers. + ''; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch new file mode 100644 index 000000000000..61e2f0e48653 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d4e561b50d8f..cfa5bdd79c2a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(LLD_BUILT_STANDALONE TRUE) + ++ include(GNUInstallDirs) ++ + find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary") + if(NOT LLVM_CONFIG_PATH) + message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH") +@@ -179,7 +181,7 @@ include_directories(BEFORE + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING + PATTERN "*.h" + ) +diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake +index 23df41312403..d62372c88de7 100644 +--- a/cmake/modules/AddLLD.cmake ++++ b/cmake/modules/AddLLD.cmake +@@ -20,9 +20,9 @@ macro(add_lld_library name) + install(TARGETS ${name} + COMPONENT ${name} + ${export_to_lldtargets} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- RUNTIME DESTINATION bin) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) + add_llvm_install_targets(install-${name} +@@ -54,7 +54,7 @@ macro(add_lld_tool name) + + install(TARGETS ${name} + ${export_to_lldtargets} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT ${name}) + + if(NOT CMAKE_CONFIGURATION_TYPES) +@@ -69,5 +69,5 @@ endmacro() + macro(add_lld_symlink name dest) + add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) + # Always generate install targets +- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) ++ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) + endmacro() +diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt +index 5cff736ff57f..64e775c771b9 100644 +--- a/tools/lld/CMakeLists.txt ++++ b/tools/lld/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(lld + ) + + install(TARGETS lld +- RUNTIME DESTINATION bin) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(NOT LLD_SYMLINKS_TO_CREATE) + set(LLD_SYMLINKS_TO_CREATE diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/default.nix new file mode 100644 index 000000000000..96d8b19ee419 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/default.nix @@ -0,0 +1,139 @@ +{ lib, stdenv, llvm_meta +, runCommand +, src +, cmake +, zlib +, ncurses +, swig +, which +, libedit +, libxml2 +, libllvm +, libclang +, python3 +, version +, libobjc +, xpc +, Foundation +, bootstrap_cmds +, Carbon +, Cocoa +, lit +, makeWrapper +, enableManpages ? false +}: + +stdenv.mkDerivation (rec { + pname = "lldb"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + patches = [ + ./procfs.patch + (runCommand "resource-dir.patch" { + clangLibDir = "${libclang.lib}/lib"; + } '' + substitute '${./resource-dir.patch}' "$out" --subst-var clangLibDir + '') + ./gnu-install-dirs.patch + ]; + + outputs = [ "out" "lib" "dev" ]; + + nativeBuildInputs = [ + cmake python3 which swig lit makeWrapper + ] ++ lib.optionals enableManpages [ + python3.pkgs.sphinx python3.pkgs.recommonmark + ]; + + buildInputs = [ + ncurses + zlib + libedit + libxml2 + libllvm + ] ++ lib.optionals stdenv.isDarwin [ + libobjc + xpc + Foundation + bootstrap_cmds + Carbon + Cocoa + ]; + + hardeningDisable = [ "format" ]; + + cmakeFlags = [ + "-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}" + "-DLLVM_ENABLE_RTTI=OFF" + "-DClang_DIR=${libclang.dev}/lib/cmake" + "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit" + ] ++ lib.optionals stdenv.isDarwin [ + "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic + ] ++ lib.optionals enableManpages [ + "-DLLVM_ENABLE_SPHINX=ON" + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + ] ++ lib.optionals doCheck [ + "-DLLDB_TEST_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" + "-DLLDB_TEST_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++" + ]; + + doCheck = false; + + installCheckPhase = '' + if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then + return 1; + fi + ''; + + postInstall = '' + wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/ + + # 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 = llvm_meta // { + homepage = "https://lldb.llvm.org/"; + description = "A next-generation high-performance debugger"; + longDescription = '' + LLDB is a next generation, high-performance debugger. It is built as a set + of reusable components which highly leverage existing libraries in the + larger LLVM Project, such as the Clang expression parser and LLVM + disassembler. + ''; + }; +} // lib.optionalAttrs enableManpages { + pname = "lldb-manpages"; + + buildPhase = '' + make docs-lldb-man + ''; + + propagatedBuildInputs = []; + + # manually install lldb man page + installPhase = '' + 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 = llvm_meta // { + description = "man pages for LLDB ${version}"; + }; +}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch new file mode 100644 index 000000000000..afc945ce2614 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch @@ -0,0 +1,91 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b5633e21c56a..f2f1035e9238 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH + # If we are not building as part of LLVM, build LLDB as a standalone project, + # using LLVM as an external library. + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) ++ include(GNUInstallDirs) ++ + project(lldb) + include(LLDBStandalone) + +diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake +index 4ed5c647c5d2..89f96e710d55 100644 +--- a/cmake/modules/AddLLDB.cmake ++++ b/cmake/modules/AddLLDB.cmake +@@ -107,13 +107,13 @@ function(add_lldb_library name) + endif() + + if(PARAM_SHARED) +- set(install_dest lib${LLVM_LIBDIR_SUFFIX}) ++ set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + if(PARAM_INSTALL_PREFIX) + set(install_dest ${PARAM_INSTALL_PREFIX}) + endif() + # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS + install(TARGETS ${name} COMPONENT ${name} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${install_dest} + ARCHIVE DESTINATION ${install_dest} + FRAMEWORK DESTINATION ${install_dest}) +diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake +index 2fdf1502d055..37364341ff8b 100644 +--- a/cmake/modules/LLDBConfig.cmake ++++ b/cmake/modules/LLDBConfig.cmake +@@ -225,7 +225,7 @@ include_directories(BEFORE + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ + COMPONENT lldb-headers +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN ".cmake" EXCLUDE +@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + COMPONENT lldb-headers +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN ".cmake" EXCLUDE +diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt +index 734167e51bc5..f95761b5df58 100644 +--- a/tools/intel-features/CMakeLists.txt ++++ b/tools/intel-features/CMakeLists.txt +@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT) + endif() + + install(TARGETS lldbIntelFeatures +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) +diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake +index 752113b..010f187 100644 +--- a/cmake/modules/LLDBStandalone.cmake ++++ b/cmake/modules/LLDBStandalone.cmake +@@ -62,7 +62,7 @@ endif() + + # They are used as destination of target generators. + set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) +-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) ++set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + if(WIN32 OR CYGWIN) + # DLL platform -- put DLLs into bin. + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b5633e2..86e4738 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON) + if(LLDB_BUILD_FRAMEWORK) + set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") + else() +- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb") ++ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb") + endif() + get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR) + finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}") diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/procfs.patch new file mode 100644 index 000000000000..b075dbaeee0a --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/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 <sys/ptrace.h> ++#include <asm/ptrace.h> + +-#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 <sys/procfs.h> ++#undef pt_regs ++#else + #include <sys/procfs.h> +-#endif // __ANDROID__ ++#endif diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch new file mode 100644 index 000000000000..e0db80afeb9f --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch @@ -0,0 +1,13 @@ +diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake +index 37364341ff8b..7f74c1a3e257 100644 +--- a/cmake/modules/LLDBConfig.cmake ++++ b/cmake/modules/LLDBConfig.cmake +@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers) + # Iterate over the possible places where the external resource directory + # could be and pick the first that exists. + foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" +- "${LLVM_BUILD_LIBRARY_DIR}" ++ "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@" + "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") + # Build the resource directory path by appending 'clang/<version number>'. + set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}") diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix new file mode 100644 index 000000000000..a15bcc872a6d --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -0,0 +1,224 @@ +{ lib, stdenv, llvm_meta +, pkgsBuildBuild +, src +, fetchpatch +, cmake +, python3 +, libffi +, libbfd +, libpfm +, libxml2 +, ncurses +, version +, release_version +, zlib +, which +, buildLlvmTools +, debugVersion ? false +, enableManpages ? false +, enableSharedLibraries ? !stdenv.hostPlatform.isStatic +, enablePFM ? !(stdenv.isDarwin + || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 + || stdenv.isAarch32 # broken for the armv7l builder +) +, enablePolly ? false +}: + +let + inherit (lib) optional optionals optionalString; + + # Used when creating a version-suffixed symlink of libLLVM.dylib + shortVersion = with lib; + concatStringsSep "." (take 1 (splitString "." release_version)); + +in stdenv.mkDerivation (rec { + pname = "llvm"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + outputs = [ "out" "lib" "dev" "python" ]; + + nativeBuildInputs = [ cmake python3 ] + ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; + + buildInputs = [ libxml2 libffi ] + ++ optional enablePFM libpfm; # exegesis + + propagatedBuildInputs = [ ncurses zlib ]; + + checkInputs = [ which ]; + + patches = [ + ./gnu-install-dirs.patch + + # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611 + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch"; + sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g"; + stripLen = 1; + }) + ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch; + + 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/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" + '' + # Patch llvm-config to return correct library path based on --link-{shared,static}. + + optionalString (enableSharedLibraries) '' + substitute '${./outputs.patch}' ./outputs.patch --subst-var lib + patch -p1 < ./outputs.patch + '' + '' + # FileSystem permissions tests fail with various special bits + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "Path.cpp" "" + rm unittests/Support/Path.cpp + substituteInPlace unittests/IR/CMakeLists.txt \ + --replace "PassBuilderCallbacksTest.cpp" "" + rm unittests/IR/PassBuilderCallbacksTest.cpp + rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test + '' + 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/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 + ''; + + # E.g. mesa.drivers use the build-id as a cache key (see #93946): + LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + + cmakeFlags = with stdenv; [ + "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" + "-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=${buildLlvmTools.llvm}/bin/llvm-tblgen" + ( + let + nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc; + nativeBintools = nativeCC.bintools.bintools; + nativeToolchainFlags = [ + "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" + "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" + "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" + "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" + "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" + ]; + in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}" + ) + ]; + + 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 + moveToOutput "bin/llvm-config*" "$dev" + substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ + --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ + --replace "$out/bin/llvm-config" "$dev/bin/llvm-config" + substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ + --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' + '' + + optionalString (stdenv.isDarwin && enableSharedLibraries) '' + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib + '' + + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native + ''; + + doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl); + + checkTarget = "check-all"; + + requiredSystemFeatures = [ "big-parallel" ]; + meta = llvm_meta // { + homepage = "https://llvm.org/"; + description = "A collection of modular and reusable compiler and toolchain technologies"; + longDescription = '' + The LLVM Project is a collection of modular and reusable compiler and + toolchain technologies. Despite its name, LLVM has little to do with + traditional virtual machines. The name "LLVM" itself is not an acronym; it + is the full name of the project. + LLVM began as a research project at the University of Illinois, with the + goal of providing a modern, SSA-based compilation strategy capable of + supporting both static and dynamic compilation of arbitrary programming + languages. Since then, LLVM has grown to be an umbrella project consisting + of a number of subprojects, many of which are being used in production by + a wide variety of commercial and open source projects as well as being + widely used in academic research. Code in the LLVM project is licensed + under the "Apache 2.0 License with LLVM exceptions". + ''; + }; +} // 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 = llvm_meta // { + description = "man pages for LLVM ${version}"; + }; +}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch new file mode 100644 index 000000000000..68f3c45396f6 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch @@ -0,0 +1,105 @@ +diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt +index ca7c04c565bb..6ed5db5dd4f8 100644 +--- a/tools/polly/CMakeLists.txt ++++ b/tools/polly/CMakeLists.txt +@@ -2,7 +2,11 @@ + if (NOT DEFINED LLVM_MAIN_SRC_DIR) + project(Polly) + cmake_minimum_required(VERSION 3.13.4) ++endif() ++ ++include(GNUInstallDirs) + ++if (NOT DEFINED LLVM_MAIN_SRC_DIR) + # Where is LLVM installed? + find_package(LLVM CONFIG REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR}) +@@ -122,13 +126,13 @@ include_directories( + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING + PATTERN "*.h" + ) + + install(DIRECTORY ${POLLY_BINARY_DIR}/include/ +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "CMakeFiles" EXCLUDE +diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt +index 7cc129ba2e90..137be25e4b80 100644 +--- a/tools/polly/cmake/CMakeLists.txt ++++ b/tools/polly/cmake/CMakeLists.txt +@@ -79,18 +79,18 @@ file(GENERATE + + # Generate PollyConfig.cmake for the install tree. + unset(POLLY_EXPORTS) +-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") ++set(POLLY_INSTALL_PREFIX "") + set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") +-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}") +-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}") ++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}") ++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") + if (POLLY_BUNDLED_ISL) + set(POLLY_CONFIG_INCLUDE_DIRS +- "${POLLY_INSTALL_PREFIX}/include" +- "${POLLY_INSTALL_PREFIX}/include/polly" ++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}" ++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly" + ) + else() + set(POLLY_CONFIG_INCLUDE_DIRS +- "${POLLY_INSTALL_PREFIX}/include" ++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}" + ${ISL_INCLUDE_DIRS} + ) + endif() +@@ -100,12 +100,12 @@ endif() + foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS) + get_target_property(tgt_type ${tgt} TYPE) + if (tgt_type STREQUAL "EXECUTABLE") +- set(tgt_prefix "bin/") ++ set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/") + else() +- set(tgt_prefix "lib/") ++ set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/") + endif() + +- set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") ++ set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") + file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path}) + + if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY") +diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake +index 518a09b45a42..bd9d6f5542ad 100644 +--- a/tools/polly/cmake/polly_macros.cmake ++++ b/tools/polly/cmake/polly_macros.cmake +@@ -44,8 +44,8 @@ macro(add_polly_library name) + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") + install(TARGETS ${name} + EXPORT LLVMExports +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + endif() + set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + endmacro(add_polly_library) +diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt +index 8991094d92c7..178d8ad606bb 100644 +--- a/tools/polly/lib/External/CMakeLists.txt ++++ b/tools/polly/lib/External/CMakeLists.txt +@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL) + install(DIRECTORY + ${ISL_SOURCE_DIR}/include/ + ${ISL_BINARY_DIR}/include/ +- DESTINATION include/polly ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly + FILES_MATCHING + PATTERN "*.h" + PATTERN "CMakeFiles" EXCLUDE diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch new file mode 100644 index 000000000000..18fa5fc6d89c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch @@ -0,0 +1,381 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 135036f509d2..265c36f8211b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -270,15 +270,21 @@ if (CMAKE_BUILD_TYPE AND + message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") + endif() + ++include(GNUInstallDirs) ++ + set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) + +-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") ++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING ++ "Path for binary subdirectory (defaults to 'bin')") + mark_as_advanced(LLVM_TOOLS_INSTALL_DIR) + + set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING + "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)") + mark_as_advanced(LLVM_UTILS_INSTALL_DIR) + ++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING ++ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" ) ++ + # They are used as destination of target generators. + set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) + set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) +@@ -581,9 +587,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF) + option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON) + option (LLVM_ENABLE_BINDINGS "Build bindings." ON) + +-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html" ++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html" + CACHE STRING "Doxygen-generated HTML documentation install directory") +-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html" ++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html" + CACHE STRING "OCamldoc-generated HTML documentation install directory") + + option (LLVM_BUILD_EXTERNAL_COMPILER_RT +@@ -1048,7 +1054,7 @@ endif() + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/llvm include/llvm-c +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT llvm-headers + FILES_MATCHING + PATTERN "*.def" +@@ -1059,7 +1065,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + ) + + install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT llvm-headers + FILES_MATCHING + PATTERN "*.def" +@@ -1073,13 +1079,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + + if (LLVM_INSTALL_MODULEMAPS) + install(DIRECTORY include/llvm include/llvm-c +- DESTINATION include ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT llvm-headers + FILES_MATCHING + PATTERN "module.modulemap" + ) + install(FILES include/llvm/module.install.modulemap +- DESTINATION include/llvm ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm + COMPONENT llvm-headers + RENAME "module.extern.modulemap" + ) +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 9c2b85374307..5531ceeb2eeb 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -818,9 +818,9 @@ macro(add_llvm_library name) + get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) + install(TARGETS ${name} + ${export_to_llvmexports} +- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} +- RUNTIME DESTINATION bin COMPONENT ${name}) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name}) + + if (NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-${name} +@@ -1036,7 +1036,7 @@ function(process_llvm_pass_plugins) + "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})") + install(FILES + ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake +- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} ++ DESTINATION ${LLVM_INSTALL_CMAKE_DIR} + COMPONENT cmake-exports) + + set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def") +@@ -1250,7 +1250,7 @@ macro(add_llvm_example name) + endif() + add_llvm_executable(${name} ${ARGN}) + if( LLVM_BUILD_EXAMPLES ) +- install(TARGETS ${name} RUNTIME DESTINATION examples) ++ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) + endif() + set_target_properties(${name} PROPERTIES FOLDER "Examples") + endmacro(add_llvm_example name) +@@ -1868,7 +1868,7 @@ function(llvm_install_library_symlink name dest type) + set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) + set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) + +- set(output_dir lib${LLVM_LIBDIR_SUFFIX}) ++ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + if(WIN32 AND "${type}" STREQUAL "SHARED") + set(output_dir bin) + endif() +@@ -1879,7 +1879,7 @@ function(llvm_install_library_symlink name dest type) + + endfunction() + +-function(llvm_install_symlink name dest) ++function(llvm_install_symlink name dest output_dir) + cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) + foreach(path ${CMAKE_MODULE_PATH}) + if(EXISTS ${path}/LLVMInstallSymlink.cmake) +@@ -1902,7 +1902,7 @@ function(llvm_install_symlink name dest) + set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) + + install(SCRIPT ${INSTALL_SYMLINK} +- CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" ++ CODE "install_symlink(${full_name} ${full_dest} ${output_dir})" + COMPONENT ${component}) + + if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE) +@@ -1985,7 +1985,8 @@ function(add_llvm_tool_symlink link_name target) + endif() + + if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS) +- llvm_install_symlink(${link_name} ${target}) ++ GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR) ++ llvm_install_symlink(${link_name} ${target} ${output_dir}) + endif() + endif() + endfunction() +@@ -2114,9 +2115,9 @@ function(llvm_setup_rpath name) + # Since BUILD_SHARED_LIBS is only recommended for use by developers, + # hardcode the rpath to build/install lib dir first in this mode. + # FIXME: update this when there is better solution. +- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) ++ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) + elseif(UNIX) +- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) ++ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) + if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") + set_property(TARGET ${name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-z,origin ") +diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake +index 554046b20edf..4d1ad980641e 100644 +--- a/cmake/modules/AddOCaml.cmake ++++ b/cmake/modules/AddOCaml.cmake +@@ -144,9 +144,9 @@ function(add_ocaml_library name) + endforeach() + + if( APPLE ) +- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") ++ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") + elseif( UNIX ) +- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") ++ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") + endif() + list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") + +diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake +index e80c3b5c1cac..482f6d715ef5 100644 +--- a/cmake/modules/AddSphinxTarget.cmake ++++ b/cmake/modules/AddSphinxTarget.cmake +@@ -90,7 +90,7 @@ function (add_sphinx_target builder project) + endif() + elseif (builder STREQUAL html) + string(TOUPPER "${project}" project_upper) +- set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html" ++ set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html" + CACHE STRING "HTML documentation install directory for ${project}") + + # '/.' indicates: copy the contents of the directory directly into +diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt +index 51b6a4fdc284..4adc2acfc074 100644 +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -1,6 +1,6 @@ + include(LLVMDistributionSupport) + +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')") + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + # First for users who use an installed LLVM, create the LLVMExports.cmake file. +@@ -109,13 +109,13 @@ foreach(p ${_count}) + set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} + get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)") + endforeach(p) +-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include") ++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") + set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") +-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}") ++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") + set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") + set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}") +-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin") ++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + + # Generate a default location for lit + if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) +diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake +index 3e6a2c9a2648..52e14d955c60 100644 +--- a/cmake/modules/LLVMInstallSymlink.cmake ++++ b/cmake/modules/LLVMInstallSymlink.cmake +@@ -4,7 +4,7 @@ + + function(install_symlink name target outdir) + set(DESTDIR $ENV{DESTDIR}) +- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/") ++ set(bindir "${DESTDIR}${outdir}/") + + message(STATUS "Creating ${name}") + +diff --git a/docs/CMake.rst b/docs/CMake.rst +index f1ac2c7d4934..c6e1469b5e13 100644 +--- a/docs/CMake.rst ++++ b/docs/CMake.rst +@@ -202,7 +202,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``. + **LLVM_LIBDIR_SUFFIX**:STRING + Extra suffix to append to the directory where libraries are to be + installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` +- to install libraries to ``/usr/lib64``. ++ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. + + Rarely-used CMake variables + --------------------------- +@@ -551,8 +551,8 @@ LLVM-specific variables + + **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING + The path to install Doxygen-generated HTML documentation to. This path can +- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to +- `share/doc/llvm/doxygen-html`. ++ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to ++ `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`. + + **LLVM_LINK_LLVM_DYLIB**:BOOL + If enabled, tools will be linked with the libLLVM shared library. Defaults +@@ -792,9 +792,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``). + + This file is available in two different locations. + +-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where +- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM. +- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. ++* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where ++ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are ++ installed as part of an installed version of LLVM. This is typically ++ ``cmake/llvm/`` within the lib directory. On Linux, this is typically ++ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. + + * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where + ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only +diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt +index bb96edb4b4bf..678c22fb43c8 100644 +--- a/examples/Bye/CMakeLists.txt ++++ b/examples/Bye/CMakeLists.txt +@@ -14,6 +14,6 @@ if (NOT WIN32) + BUILDTREE_ONLY + ) + +- install(TARGETS ${name} RUNTIME DESTINATION examples) ++ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) + set_target_properties(${name} PROPERTIES FOLDER "Examples") + endif() +diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt +index b46319f24fc8..2feabd1954e4 100644 +--- a/include/llvm/CMakeLists.txt ++++ b/include/llvm/CMakeLists.txt +@@ -5,5 +5,5 @@ add_subdirectory(Frontend) + # If we're doing an out-of-tree build, copy a module map for generated + # header files into the build area. + if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") +- configure_file(module.modulemap.build module.modulemap COPYONLY) ++ configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY) + endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") +diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in +index ebe5b73a5c65..70c497be12f5 100644 +--- a/tools/llvm-config/BuildVariables.inc.in ++++ b/tools/llvm-config/BuildVariables.inc.in +@@ -23,6 +23,10 @@ + #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" + #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" + #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" ++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@" ++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" ++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" ++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@" + #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" + #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" + #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@" +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index 1a2f04552d13..44fa7d3eec6b 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -357,12 +357,26 @@ int main(int argc, char **argv) { + ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include"); + } else { + ActivePrefix = CurrentExecPrefix; +- ActiveIncludeDir = ActivePrefix + "/include"; +- SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR)); +- sys::fs::make_absolute(ActivePrefix, path); +- ActiveBinDir = std::string(path.str()); +- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; +- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; ++ { ++ SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR)); ++ sys::fs::make_absolute(ActivePrefix, path); ++ ActiveIncludeDir = std::string(path.str()); ++ } ++ { ++ SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR)); ++ sys::fs::make_absolute(ActivePrefix, path); ++ ActiveBinDir = std::string(path.str()); ++ } ++ { ++ SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX)); ++ sys::fs::make_absolute(ActivePrefix, path); ++ ActiveLibDir = std::string(path.str()); ++ } ++ { ++ SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR)); ++ sys::fs::make_absolute(ActivePrefix, path); ++ ActiveCMakeDir = std::string(path.str()); ++ } + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + +diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt +index 0af29ad762c5..37b99b83e35c 100644 +--- a/tools/lto/CMakeLists.txt ++++ b/tools/lto/CMakeLists.txt +@@ -33,7 +33,7 @@ add_llvm_library(${LTO_LIBRARY_NAME} ${LTO_LIBRARY_TYPE} INSTALL_WITH_TOOLCHAIN + ${SOURCES} DEPENDS intrinsics_gen) + + install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h +- DESTINATION include/llvm-c ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c + COMPONENT LTO) + + if (APPLE) +diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt +index ead73ec13a8f..250362021f17 100644 +--- a/tools/opt-viewer/CMakeLists.txt ++++ b/tools/opt-viewer/CMakeLists.txt +@@ -8,7 +8,7 @@ set (files + + foreach (file ${files}) + install(PROGRAMS ${file} +- DESTINATION share/opt-viewer ++ DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer + COMPONENT opt-viewer) + endforeach (file) + +diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt +index 865436247270..ce1daa62f6ab 100644 +--- a/tools/remarks-shlib/CMakeLists.txt ++++ b/tools/remarks-shlib/CMakeLists.txt +@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC) + endif() + + install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h +- DESTINATION include/llvm-c ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c + COMPONENT Remarks) + + if (APPLE) diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/outputs.patch new file mode 100644 index 000000000000..40096fa3497f --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/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/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix new file mode 100644 index 000000000000..c5a33df97560 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/13/openmp/default.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, llvm_meta +, src +, cmake +, llvm +, perl +, version +}: + +stdenv.mkDerivation rec { + pname = "openmp"; + inherit version; + + inherit src; + sourceRoot = "source/${pname}"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ llvm ]; + + cmakeFlags = [ + "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails + ]; + + meta = llvm_meta // { + homepage = "https://openmp.llvm.org/"; + description = "Support for the OpenMP language"; + longDescription = '' + The OpenMP subproject of LLVM contains the components required to build an + executable OpenMP program that are outside the compiler itself. + Contains the code for the runtime library against which code compiled by + "clang -fopenmp" must be linked before it can run and the library that + supports offload to target devices. + ''; + # "All of the code is dual licensed under the MIT license and the UIUC + # License (a BSD-like license)": + license = with lib.licenses; [ mit ncsa ]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix index dce7cde3713e..9f937ed140fd 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -13,7 +13,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "0ipd4jdxpczgr2w6lzrabymz6dhzj69ywmyybjjc1q397zgrvziy"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/default.nix index d11c08329d54..8205c67da77a 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/5/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/5/default.nix @@ -121,4 +121,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix index d97333bc503a..7ee0943a8886 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -13,7 +13,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/default.nix b/nixpkgs/pkgs/development/compilers/llvm/6/default.nix index a0cc84d8d733..7651b5ab13dc 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/6/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/6/default.nix @@ -122,4 +122,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix index 87ebc3eff025..f6190b799189 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -14,7 +14,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "1n48p8gjarihkws0i2bay5w9bdwyxyxxbpwyng7ba58jb30dlyq5"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix index 4057f206caf1..6864353424f1 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/7/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix @@ -268,4 +268,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix index a3ce09cba976..bbaae803738d 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -14,7 +14,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix index a7a293cfbbf6..34f204be3315 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/8/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix @@ -267,4 +267,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix index a3db5c0ad68d..4dc75bd1c14c 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, libllvm, libcxxabi }: let @@ -14,7 +14,7 @@ stdenv.mkDerivation { inherit version; src = fetch "compiler-rt" "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/default.nix index 8521354dbb8e..8468fc363818 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/9/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/9/default.nix @@ -267,4 +267,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix index cfafe43c3a5f..78c2831a2f35 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, src, cmake, libxml2, libllvm, version, python3 +{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -37,6 +37,10 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-11-12-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -52,12 +56,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch index f6f9336ad5ad..66742e5b1498 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/X86-support-extension.patch @@ -2,9 +2,7 @@ diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index 3a66dd9c3fb..7efc85d9f9f 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt -@@ -301,6 +301,10 @@ if (NOT MSVC) - i386/umoddi3.S - ) +@@ -345,4 +345,8 @@ if (NOT MSVC) + set(i486_SOURCES ${i386_SOURCES}) + set(i586_SOURCES ${i386_SOURCES}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch index 3cc12b94b200..065959d14d46 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch @@ -11,10 +11,10 @@ Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that 3 files changed, 107 deletions(-) diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake -index bc5fb9ff7..b64eb4246 100644 +index bc69ec95c419..9f100fdcec2f 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake -@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type) +@@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type) set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") endif() @@ -23,11 +23,11 @@ index bc5fb9ff7..b64eb4246 100644 - add_custom_command(TARGET ${libname} - POST_BUILD - COMMAND codesign --sign - $<TARGET_FILE:${libname}> -- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} +- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR} - ) - endif() endif() - install(TARGETS ${libname} - ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} + + set(parent_target_arg) 2.14.1 diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch new file mode 100644 index 000000000000..425dc2af01e7 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/darwin-targetconditionals.patch @@ -0,0 +1,71 @@ +diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp +--- a/lib/sanitizer_common/sanitizer_mac.cpp ++++ b/lib/sanitizer_common/sanitizer_mac.cpp +@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) { + // Offset example: + // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4 + constexpr u16 GetOSMajorKernelOffset() { +- if (TARGET_OS_OSX) return 4; +- if (TARGET_OS_IOS || TARGET_OS_TV) return 6; +- if (TARGET_OS_WATCH) return 13; ++#if TARGET_OS_OSX ++ return 4; ++#endif ++#if TARGET_OS_IOS || TARGET_OS_TV ++ return 6; ++#endif ++#if TARGET_OS_WATCH ++ return 13; ++#endif + } + + using VersStr = char[64]; +@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) { + u16 os_major = kernel_major - offset; + + const char *format = "%d.0"; +- if (TARGET_OS_OSX) { +- if (os_major >= 16) { // macOS 11+ +- os_major -= 5; +- } else { // macOS 10.15 and below +- format = "10.%d"; +- } ++#if TARGET_OS_OSX ++ if (os_major >= 16) { // macOS 11+ ++ os_major -= 5; ++ } else { // macOS 10.15 and below ++ format = "10.%d"; + } ++#endif + return internal_snprintf(vers, sizeof(VersStr), format, os_major); + } + +@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) { + // Aligned versions example: + // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6 + static void MapToMacos(u16 *major, u16 *minor) { +- if (TARGET_OS_OSX) +- return; +- +- if (TARGET_OS_IOS || TARGET_OS_TV) ++#if !TARGET_OS_OSX ++#if TARGET_OS_IOS || TARGET_OS_TV + *major += 2; +- else if (TARGET_OS_WATCH) ++#elif TARGET_OS_WATCH + *major += 9; +- else ++#else + UNREACHABLE("unsupported platform"); ++#endif + + if (*major >= 16) { // macOS 11+ + *major -= 5; +@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) { + *minor = *major; + *major = 10; + } ++#endif + } + + static MacosVersion GetMacosAlignedVersionInternal() { diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix index 8aeaabb0cd33..9557f9d2d808 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, version, src, cmake, python3, llvm, libcxxabi }: +{ lib, stdenv, llvm_meta, version, src, cmake, python3, libllvm, libcxxabi }: let @@ -16,7 +16,7 @@ stdenv.mkDerivation { inherit src; sourceRoot = "source/compiler-rt"; - nativeBuildInputs = [ cmake python3 llvm.dev ]; + nativeBuildInputs = [ cmake python3 libllvm.dev ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ @@ -56,11 +56,12 @@ stdenv.mkDerivation { patches = [ ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config - ./gnu-install-dirs.patch # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch + # Prevent a compilation error on darwin + ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch deleted file mode 100644 index 5f025764de1c..000000000000 --- a/nixpkgs/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b44ad2c2118e..d42f5664d448 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4) - # Check if compiler-rt is built as a standalone project. - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) - project(CompilerRT C CXX ASM) -+ include(GNUInstallDirs) - set(COMPILER_RT_STANDALONE_BUILD TRUE) - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - endif() -diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake -index 361538a58e47..f0d8d9ab80f1 100644 ---- a/cmake/Modules/AddCompilerRT.cmake -+++ b/cmake/Modules/AddCompilerRT.cmake -@@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component) - add_custom_target(${target_name} DEPENDS ${dst_file}) - # Install in Clang resource directory. - install(FILES ${file_name} -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR} - COMPONENT ${component}) - add_dependencies(${component} ${target_name}) - -@@ -512,7 +512,7 @@ macro(add_compiler_rt_script name) - add_custom_target(${name} DEPENDS ${dst}) - install(FILES ${dst} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR}) - endmacro(add_compiler_rt_script src name) - - # Builds custom version of libc++ and installs it in <prefix>. -diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake -index 456a8dcda59f..7a09e74c7c79 100644 ---- a/cmake/Modules/CompilerRTDarwinUtils.cmake -+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake -@@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries) - set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR - ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded) - set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR -- ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded) -+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded) - - set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi") - set(CFLAGS_i386 "-march=pentium") -diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake -index f61d487e93a0..f1f46fb9599c 100644 ---- a/cmake/Modules/CompilerRTUtils.cmake -+++ b/cmake/Modules/CompilerRTUtils.cmake -@@ -378,7 +378,7 @@ endfunction() - function(get_compiler_rt_install_dir arch install_dir) - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - get_compiler_rt_target(${arch} target) -- set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE) -+ set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE) - else() - set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE) - endif() -diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake -index 1edab43e7c0d..1aac6b73ff82 100644 ---- a/cmake/base-config-ix.cmake -+++ b/cmake/base-config-ix.cmake -@@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE) - else() - # Take output dir and install path from the user. - set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH -- "Path where built compiler-rt libraries should be stored.") -+ "Path where built compiler-rt build artifacts should be stored.") - set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH - "Path where built compiler-rt executables should be stored.") -- set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH -- "Path where built compiler-rt libraries should be installed.") -+ set(COMPILER_RT_INSTALL_PATH "" CACHE PATH -+ "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.") - option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF) - option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF) - # Use a host compiler to compile/link tests. -@@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR) - set(COMPILER_RT_LIBRARY_OUTPUT_DIR - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) - set(COMPILER_RT_LIBRARY_INSTALL_DIR -- ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR}) -+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR}) - endif() - - if(APPLE) -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index b00e8caa1ddd..0fe64e4862c9 100644 ---- a/include/CMakeLists.txt -+++ b/include/CMakeLists.txt -@@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc") - install(FILES ${SANITIZER_HEADERS} - COMPONENT compiler-rt-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer) - # Install fuzzer headers. - install(FILES ${FUZZER_HEADERS} - COMPONENT compiler-rt-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer) - # Install xray headers. - install(FILES ${XRAY_HEADERS} - COMPONENT compiler-rt-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray) - # Install profile headers. - install(FILES ${PROFILE_HEADERS} - COMPONENT compiler-rt-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile) - - if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs. - add_custom_target(install-compiler-rt-headers -diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt -index a29de8deff1b..d39ff01613d2 100644 ---- a/lib/dfsan/CMakeLists.txt -+++ b/lib/dfsan/CMakeLists.txt -@@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename} - DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt) - add_dependencies(dfsan dfsan_abilist) - install(FILES ${dfsan_abilist_filename} -- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share) -+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix index ef65827fbf2f..300de57b696e 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/default.nix @@ -18,11 +18,11 @@ }: let - release_version = "13.0.0"; + release_version = "14.0.0"; candidate = ""; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; - rev = "1605fce6c3074f8d1dff5a917a1840ffa66abd86"; # When using a Git commit - rev-version = "unstable-2021-06-19"; # When using a Git commit + rev = "ee65938357d5fffe9e586fa155b37268b5a358ac"; # When using a Git commit + rev-version = "unstable-2021-08-13"; # When using a Git commit version = if rev != "" then rev-version else "${release_version}${dash-candidate}"; targetConfig = stdenv.targetPlatform.config; @@ -30,7 +30,7 @@ let owner = "llvm"; repo = "llvm-project"; rev = if rev != "" then rev else "llvmorg-${version}"; - sha256 = "1jf0b9vn4qv5gsvhyg6xsqdkdl4vzn7j4sfcldl8bggcgjmzp0q1"; + sha256 = "10ahc108wbg2rsp50j3mc8h018a453ykg1rivjkhizng80pyllm1"; }; llvm_meta = { @@ -77,18 +77,17 @@ let clang-unwrapped = tools.libclang.out // { outputUnspecified = true; }; - # disabled until recommonmark supports sphinx 3 - #Llvm-manpages = lowPrio (tools.libllvm.override { - # enableManpages = true; - # python3 = pkgs.python3; # don't use python-boot - #}); + llvm-manpages = lowPrio (tools.libllvm.override { + enableManpages = true; + python3 = pkgs.python3; # don't use python-boot + }); clang-manpages = lowPrio (tools.libclang.override { enableManpages = true; python3 = pkgs.python3; # don't use python-boot }); - # disabled until recommonmark supports sphinx 3 + # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins' # lldb-manpages = lowPrio (tools.lldb.override { # enableManpages = true; # python3 = pkgs.python3; # don't use python-boot @@ -265,4 +264,4 @@ let }; }); -in { inherit tools libraries; } // libraries // tools +in { inherit tools libraries release_version; } // libraries // tools diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch index f59d7f8dfafc..744967a6ee0b 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 06ee1d74a03e..6c3c6f8f8d47 100644 +index b1e25358d41a..7fe1f4d85401 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,6 +28,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") +@@ -26,6 +26,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD) project(libcxx CXX C) @@ -11,32 +11,33 @@ index 06ee1d74a03e..6c3c6f8f8d47 100644 set(PACKAGE_NAME libcxx) set(PACKAGE_VERSION 13.0.0git) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") -@@ -409,7 +411,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) +@@ -412,7 +414,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1") -- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) -+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) - set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1") - set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1") - if(LIBCXX_LIBDIR_SUBDIR) -@@ -420,14 +422,14 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR) +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +@@ -426,7 +428,7 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR) set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") -- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX}) -+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX}) - set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1") - set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}") - else() +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +@@ -436,7 +438,7 @@ else() set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1") set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") -- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX}) -+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX}) - set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1") - set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}") - endif() +- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake index 5a8a4a270a1a..c06bae0001aa 100644 --- a/cmake/Modules/HandleLibCXXABI.cmake @@ -51,10 +52,10 @@ index 5a8a4a270a1a..c06bae0001aa 100644 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 87b71f7ba334..d20a783079b7 100644 +index 496429f3841e..1a0c9c0a3159 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -369,21 +369,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY) +@@ -376,21 +376,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY) install(TARGETS cxx_shared ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch index 45641acb0c74..5d562dd59a99 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1e8b73aa38cc..6f7b2a25d205 100644 +index 9fb35860d483..5739d9e8af62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH @@ -11,26 +11,27 @@ index 1e8b73aa38cc..6f7b2a25d205 100644 set(PACKAGE_NAME libcxxabi) set(PACKAGE_VERSION 11.0.0git) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") -@@ -196,7 +198,7 @@ set(CMAKE_MODULE_PATH +@@ -195,7 +197,7 @@ set(CMAKE_MODULE_PATH if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) -- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) -+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libc++abi libraries should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) - string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) -@@ -204,11 +206,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) +@@ -204,12 +206,12 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) elseif(LLVM_LIBRARY_OUTPUT_INTDIR) set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) -- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX}) -+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++abi libraries should be installed.") else() set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR}) set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX}) -- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX}) -+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX}) +- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++abi libraries should be installed.") endif() - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch index 56231cd31b2a..8cd25c56f8cc 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a2c03fd3f8aa..98de2f8ea7c8 100644 +index 81eddbc24879..e2afb2002150 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH @@ -11,24 +11,26 @@ index a2c03fd3f8aa..98de2f8ea7c8 100644 set(PACKAGE_NAME libunwind) set(PACKAGE_VERSION 13.0.0git) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") -@@ -116,17 +118,17 @@ set(CMAKE_MODULE_PATH +@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) -- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) -+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libunwind libraries should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) - string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) +@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) endif() elseif(LLVM_LIBRARY_OUTPUT_INTDIR) set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) -- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) -+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH + "Path where built libunwind libraries should be installed.") else() set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) -- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) -+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) +- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH ++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH + "Path where built libunwind libraries should be installed.") endif() - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/default.nix index f8c7e7b55e67..96d8b19ee419 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/default.nix @@ -19,6 +19,7 @@ , Carbon , Cocoa , lit +, makeWrapper , enableManpages ? false }: @@ -42,7 +43,7 @@ stdenv.mkDerivation (rec { outputs = [ "out" "lib" "dev" ]; nativeBuildInputs = [ - cmake python3 which swig lit + cmake python3 which swig lit makeWrapper ] ++ lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; @@ -53,8 +54,7 @@ stdenv.mkDerivation (rec { libedit libxml2 libllvm - ] - ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ libobjc xpc Foundation @@ -85,7 +85,15 @@ stdenv.mkDerivation (rec { doCheck = false; + installCheckPhase = '' + if [ ! -e "$lib/${python3.sitePackages}/lldb/_lldb.so" ] ; then + return 1; + fi + ''; + postInstall = '' + wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/ + # Editor support # vscode: install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/gnu-install-dirs.patch index 98321f4479e6..afc945ce2614 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/gnu-install-dirs.patch +++ b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/gnu-install-dirs.patch @@ -63,3 +63,29 @@ index 734167e51bc5..f95761b5df58 100644 install(TARGETS lldbIntelFeatures - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) +diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake +index 752113b..010f187 100644 +--- a/cmake/modules/LLDBStandalone.cmake ++++ b/cmake/modules/LLDBStandalone.cmake +@@ -62,7 +62,7 @@ endif() + + # They are used as destination of target generators. + set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) +-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) ++set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + if(WIN32 OR CYGWIN) + # DLL platform -- put DLLs into bin. + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b5633e2..86e4738 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON) + if(LLDB_BUILD_FRAMEWORK) + set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") + else() +- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb") ++ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb") + endif() + get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR) + finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}") diff --git a/nixpkgs/pkgs/development/compilers/llvm/rocm/clang.nix b/nixpkgs/pkgs/development/compilers/llvm/rocm/clang.nix index 45c0bfda1922..d6bfd07d444e 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/rocm/clang.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/rocm/clang.nix @@ -1,7 +1,7 @@ { lib, stdenv , fetchFromGitHub , cmake -, python +, python3 , llvm , clang-tools-extra_src ? null , lld @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { pname = "clang"; - nativeBuildInputs = [ cmake python ]; + nativeBuildInputs = [ cmake python3 ]; buildInputs = [ llvm ]; diff --git a/nixpkgs/pkgs/development/compilers/llvm/update-git.py b/nixpkgs/pkgs/development/compilers/llvm/update-git.py index 880cad1c72b1..488f415f4394 100755 --- a/nixpkgs/pkgs/development/compilers/llvm/update-git.py +++ b/nixpkgs/pkgs/development/compilers/llvm/update-git.py @@ -79,8 +79,14 @@ hash = nix_prefetch_url(f'https://github.com/llvm/llvm-project/archive/{commit[" print('Updating default.nix...') with fileinput.FileInput(DEFAULT_NIX, inplace=True) as f: for line in f: + if match := re.search(r'^ rev-version = "unstable-(.+)";', line): + old_date = match.group(1) result = re.sub(r'^ release_version = ".+";', f' release_version = "{release_version}";', line) result = re.sub(r'^ rev = ".*";', f' rev = "{commit["sha"]}";', result) result = re.sub(r'^ rev-version = ".+";', f' rev-version = "{version}";', result) result = re.sub(r'^ sha256 = ".+";', f' sha256 = "{hash}";', result) print(result, end='') +# Commit the result: +commit_message = f"llvmPackages_git: {old_date} -> {date}" +subprocess.run(['git', 'add', DEFAULT_NIX], check=True) +subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True) diff --git a/nixpkgs/pkgs/development/compilers/llvm/update.sh b/nixpkgs/pkgs/development/compilers/llvm/update.sh index 8f28d34073cd..603c603f275b 100755 --- a/nixpkgs/pkgs/development/compilers/llvm/update.sh +++ b/nixpkgs/pkgs/development/compilers/llvm/update.sh @@ -19,19 +19,26 @@ sed -Ei \ "$FILE" readonly ATTRSET="llvmPackages_$VERSION_MAJOR" -readonly SOURCES=( - "clang-unwrapped.src" - "compiler-rt.src" - "clang-unwrapped.clang-tools-extra_src" - "libcxx.src" - "libcxxabi.src" - "libunwind.src" - "lld.src" - "lldb.src" - "llvm.src" - "llvm.polly_src" - "openmp.src" -) + +if [ "$VERSION_MAJOR" -ge "13" ]; then + readonly SOURCES=( + "llvm.src" + ) +else + readonly SOURCES=( + "clang-unwrapped.src" + "compiler-rt.src" + "clang-unwrapped.clang-tools-extra_src" + "libcxx.src" + "libcxxabi.src" + "libunwind.src" + "lld.src" + "lldb.src" + "llvm.src" + "llvm.polly_src" + "openmp.src" + ) +fi for SOURCE in "${SOURCES[@]}"; do echo "Updating the hash of $SOURCE:" diff --git a/nixpkgs/pkgs/development/compilers/marst/default.nix b/nixpkgs/pkgs/development/compilers/marst/default.nix new file mode 100644 index 000000000000..8412c149c234 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/marst/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchurl +, texinfo +}: + +stdenv.mkDerivation rec { + pname = "marst"; + version = "2.7"; + + src = fetchurl { + url = "mirror://gnu/gnu/${pname}/${pname}-${version}.tar.gz"; + hash = "sha256-Pue50cvjzZ+19iJxfae7VQbxpto7MPgS4jhLh7zk2lA="; + }; + + nativeBuildInputs = [ + texinfo + ]; + + postBuild = '' + makeinfo doc/marst.texi -o doc/marst.info + ''; + + postInstall = '' + install -m644 doc/marst.info -Dt $out/share/info/ + install -m644 doc/marst.pdf -Dt $out/share/doc/${pname}/ + ''; + + meta = with lib; { + homepage = "https://www.gnu.org/software/marst/"; + description = "An Algol-60-to-C translator"; + longDescription = '' + MARST is an Algol-to-C translator. It automatically translates programs + written on the algorithmic language Algol 60 to the C programming + language. + + The MARST package includes three main components: + + - the translator, MARST, that translates Algol 60 programs to the C + programming language. + + - the library, ALGLIB, that contains precompiled standard Algol 60 + procedures and other necessary library routines. This library is to be + used at linking stage. (In the distribution the name libalgol.a is used + for this library.) + + - the converter, MACVT, that allows to convert existing Algol 60 programs + from some other representations to MARST representation. + ''; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix b/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix index 454156c2d280..195f0c0e36f8 100644 --- a/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix +++ b/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix @@ -1,9 +1,11 @@ { lib, stdenv, fetchurl }: -stdenv.mkDerivation { - name = "meta-build-env-0.1"; +stdenv.mkDerivation rec { + pname = "meta-build-env"; + version = "0.1"; + src = fetchurl { - url = "http://www.meta-environment.org/releases/meta-build-env-0.1.tar.gz"; + url = "http://www.meta-environment.org/releases/meta-build-env-${version}.tar.gz"; sha256 = "1imn1gaan4fv73v8w3k3lgyjzkcn7bdp69k6hlz0vqdg17ysd1x3"; }; diff --git a/nixpkgs/pkgs/development/compilers/mezzo/default.nix b/nixpkgs/pkgs/development/compilers/mezzo/default.nix index 1710fb986ead..23c75ae28bb7 100644 --- a/nixpkgs/pkgs/development/compilers/mezzo/default.nix +++ b/nixpkgs/pkgs/development/compilers/mezzo/default.nix @@ -12,7 +12,8 @@ assert check-ocaml-version "4"; stdenv.mkDerivation { - name = "mezzo-0.0.m8"; + pname = "mezzo"; + version = "0.0.m8"; src = fetchFromGitHub { owner = "protz"; diff --git a/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix b/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix index 8cf709c10aea..e7098abb60af 100644 --- a/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix +++ b/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix @@ -1,12 +1,15 @@ { fetchurl, lib, stdenv, makeWrapper, gnum4, texinfo, texLive, automake, - enableX11 ? false, xlibsWrapper ? null }: + autoconf, libtool, ghostscript, ncurses, + enableX11 ? false, xlibsWrapper }: let - version = "10.1.10"; - bootstrapFromC = ! (stdenv.isi686 || stdenv.isx86_64); + version = "11.2"; + bootstrapFromC = ! ((stdenv.isLinux && stdenv.isAarch64) || stdenv.isx86_64); - arch = if stdenv.isi686 then "-i386" - else "-x86-64"; + arch = if stdenv.isLinux && stdenv.isAarch64 then + "-aarch64le" + else + "-x86-64"; in stdenv.mkDerivation { name = if enableX11 then "mit-scheme-x11-${version}" else "mit-scheme-${version}"; @@ -16,49 +19,55 @@ stdenv.mkDerivation { # leads to more efficient code than when building the tarball that contains # generated C code instead of those binaries. src = - if stdenv.isi686 + if stdenv.isLinux && stdenv.isAarch64 then fetchurl { - url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-i386.tar.gz"; - sha256 = "117lf06vcdbaa5432hwqnskpywc6x8ai0gj99h480a4wzkp3vhy6"; + url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-aarch64le.tar.gz"; + sha256 = "11maixldk20wqb5js5p4imq221zz9nf27649v9pqkdf8fv7rnrs9"; } else fetchurl { url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-x86-64.tar.gz"; - sha256 = "1rljv6iddrbssm91c0nn08myj92af36hkix88cc6qwq38xsxs52g"; + sha256 = "17822hs9y07vcviv2af17p3va7qh79dird49nj50bwi9rz64ia3w"; }; - buildInputs = if enableX11 then [xlibsWrapper] else []; + buildInputs = [ ncurses ] ++ lib.optional enableX11 xlibsWrapper; - configurePhase = - '' (cd src && ./configure) - (cd doc && ./configure) - ''; + configurePhase = '' + runHook preConfigure + (cd src && ./configure) + (cd doc && ./configure) + runHook postConfigure + ''; - buildPhase = - '' cd src - ${if bootstrapFromC - then "./etc/make-liarc.sh --prefix=$out" - else "make compile-microcode"} + buildPhase = '' + runHook preBuild + cd src - cd ../doc + ${if bootstrapFromC + then "./etc/make-liarc.sh --prefix=$out" + else "make compile-microcode"} - # Provide a `texinfo.tex'. - export TEXINPUTS="$(echo ${automake}/share/automake-*)" - echo "\$TEXINPUTS is \`$TEXINPUTS'" - make + cd ../doc - cd .. - ''; + make - installPhase = - '' make prefix=$out install -C src - make prefix=$out install -C doc - ''; + cd .. + + runHook postBuild + ''; + + + installPhase = '' + runHook preInstall + make prefix=$out install -C src + make prefix=$out install -C doc + runHook postInstall + ''; - fixupPhase = + postFixup = '' wrapProgram $out/bin/mit-scheme${arch} --set MITSCHEME_LIBRARY_PATH \ $out/lib/mit-scheme${arch} ''; - nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ]; + nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ghostscript autoconf libtool ]; # XXX: The `check' target doesn't exist. doCheck = false; diff --git a/nixpkgs/pkgs/development/compilers/mkcl/default.nix b/nixpkgs/pkgs/development/compilers/mkcl/default.nix index 3656f1e0dd82..e8452f46a8a5 100644 --- a/nixpkgs/pkgs/development/compilers/mkcl/default.nix +++ b/nixpkgs/pkgs/development/compilers/mkcl/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, gmp, gcc }: -with lib; stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "mkcl"; version = "1.1.11"; @@ -11,6 +11,15 @@ with lib; stdenv.mkDerivation rec { sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26"; }; + patches = [ + # "Array sys_siglist[] never was part of the public interface. Replace it with calls to psiginfo()." + (fetchpatch { + name = "sys_siglist.patch"; + url = "https://github.com/jcbeaudoin/MKCL/commit/0777dd08254c88676f4f101117b10786b22111d6.patch"; + sha256 = "1dnr1jzha77nrxs22mclrcqyqvxxn6q1sfn35qjs77fi3jcinjsc"; + }) + ]; + nativeBuildInputs = [ makeWrapper ]; propagatedBuildInputs = [ gmp ]; @@ -18,7 +27,7 @@ with lib; stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; configureFlags = [ - "GMP_CFLAGS=-I${gmp.dev}/include" + "GMP_CFLAGS=-I${lib.getDev gmp}/include" "GMP_LDFLAGS=-L${gmp.out}/lib" ]; @@ -27,9 +36,9 @@ with lib; stdenv.mkDerivation rec { cd contrib/tinycc ./configure --cc=cc \ --elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \ - --crtprefix=${getLib stdenv.cc.libc}/lib \ - --sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \ - --libpaths=${getLib stdenv.cc.libc}/lib + --crtprefix=${lib.getLib stdenv.cc.libc}/lib \ + --sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include \ + --libpaths=${lib.getLib stdenv.cc.libc}/lib )''; postInstall = '' @@ -38,7 +47,7 @@ with lib; stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = { + meta = with lib; { description = "ANSI Common Lisp Implementation"; homepage = "https://common-lisp.net/project/mkcl/"; license = licenses.lgpl2Plus; diff --git a/nixpkgs/pkgs/development/compilers/mlkit/default.nix b/nixpkgs/pkgs/development/compilers/mlkit/default.nix index 1769b31b5a5c..77d2fe6cac9d 100644 --- a/nixpkgs/pkgs/development/compilers/mlkit/default.nix +++ b/nixpkgs/pkgs/development/compilers/mlkit/default.nix @@ -18,7 +18,9 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Standard ML Compiler and Toolkit"; homepage = "https://elsman.com/mlkit/"; + changelog = "https://github.com/melsman/mlkit/blob/v${version}/NEWS.md"; license = licenses.gpl2Plus; + platforms = platforms.unix; maintainers = with maintainers; [ athas ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/mono/6.nix b/nixpkgs/pkgs/development/compilers/mono/6.nix index 04028648a255..1a7297af918e 100644 --- a/nixpkgs/pkgs/development/compilers/mono/6.nix +++ b/nixpkgs/pkgs/development/compilers/mono/6.nix @@ -2,8 +2,8 @@ callPackage ./generic.nix ({ inherit Foundation libobjc; - version = "6.12.0.90"; + version = "6.12.0.122"; srcArchiveSuffix = "tar.xz"; - sha256 = "1b6d0926rd0nkmsppwjgmwsxx1479jjvr1gm7zwk64siml15rpji"; + sha256 = "sha256-KcJ3Zg/F51ExB67hy/jFBXyTcKTN/tovx4G+aYbYnSM="; enableParallelBuilding = true; }) diff --git a/nixpkgs/pkgs/development/compilers/nextpnr/default.nix b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix index efb299854525..949c70318ace 100644 --- a/nixpkgs/pkgs/development/compilers/nextpnr/default.nix +++ b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix @@ -14,21 +14,21 @@ let in stdenv.mkDerivation rec { pname = "nextpnr"; - version = "2021.01.02"; + version = "2021.08.16"; srcs = [ (fetchFromGitHub { owner = "YosysHQ"; repo = "nextpnr"; - rev = "9b9628047c01a970cfe20f83f2b7129ed109440d"; - sha256 = "0pcv96d0n40h2ipywi909hpzlys5b6r4pamc320qk1xxhppmgkmm"; + rev = "b37d133c43c45862bd5c550b5d7fffaa8c49b968"; + sha256 = "0qc9d8cay2j5ggn0mgjq484vv7a14na16s9dmp7bqz7r9cn4b98n"; name = "nextpnr"; }) (fetchFromGitHub { owner = "YosysHQ"; repo = "nextpnr-tests"; - rev = "8f93e7e0f897b1b5da469919c9a43ba28b623b2a"; - sha256 = "0zpd0w49k9l7rs3wmi2v8z5s4l4lad5rprs5l83w13667himpzyc"; + rev = "ccc61e5ec7cc04410462ec3196ad467354787afb"; + sha256 = "09a0bhrphr3rsppryrfak4rhziyj8k3s17kgb0vgm0abjiz0jgam"; name = "nextpnr-tests"; }) ]; diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix index 008d2cd6d075..723b597b88dc 100644 --- a/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix +++ b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix @@ -1,9 +1,9 @@ import ./generic.nix { major_version = "4"; minor_version = "13"; - patch_version = "0-alpha2"; + patch_version = "0-beta1"; src = fetchTarball { - url = "https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.0~alpha2.tar.xz"; - sha256 = "0krb0254i6ihbymjn6mwgzcfrzsvpk9hbagl0agm6wml21zpcsif"; + url = "https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.0~beta1.tar.xz"; + sha256 = "0dbz69p1kqabjvzaasy2malfdfn4b93s504x2xs0dl5l3fa3p6c3"; }; } diff --git a/nixpkgs/pkgs/development/compilers/ocaml/generic.nix b/nixpkgs/pkgs/development/compilers/ocaml/generic.nix index d9853dd642ab..2dd959600eac 100644 --- a/nixpkgs/pkgs/development/compilers/ocaml/generic.nix +++ b/nixpkgs/pkgs/development/compilers/ocaml/generic.nix @@ -81,37 +81,33 @@ stdenv.mkDerivation (args // { }; meta = with lib; { - homepage = "http://caml.inria.fr/ocaml"; + homepage = "https://ocaml.org/"; branch = versionNoPatch; license = with licenses; [ qpl /* compiler */ lgpl2 /* library */ ]; - description = "Most popular variant of the Caml language"; - - longDescription = - '' - OCaml is the most popular variant of the Caml language. From a - language standpoint, it extends the core Caml language with a - fully-fledged object-oriented layer, as well as a powerful module - system, all connected by a sound, polymorphic type system featuring - type inference. - - The OCaml system is an industrial-strength implementation of this - language, featuring a high-performance native-code compiler (ocamlopt) - for 9 processor architectures (IA32, PowerPC, AMD64, Alpha, Sparc, - Mips, IA64, HPPA, StrongArm), as well as a bytecode compiler (ocamlc) - and an interactive read-eval-print loop (ocaml) for quick development - and portability. The OCaml distribution includes a comprehensive - standard library, a replay debugger (ocamldebug), lexer (ocamllex) and - parser (ocamlyacc) generators, a pre-processor pretty-printer (camlp4) - and a documentation generator (ocamldoc). - ''; + description = "OCaml is an industrial-strength programming language supporting functional, imperative and object-oriented styles"; + + longDescription = '' + OCaml is a general purpose programming language with an emphasis on expressiveness and safety. Developed for more than 20 years at Inria by a group of leading researchers, it has an advanced type system that helps catch your mistakes without getting in your way. It's used in environments where a single mistake can cost millions and speed matters, is supported by an active community, and has a rich set of libraries and development tools. It's widely used in teaching for its power and simplicity. + + Strengths: + * A powerful type system, equipped with parametric polymorphism and type inference. For instance, the type of a collection can be parameterized by the type of its elements. This allows defining some operations over a collection independently of the type of its elements: sorting an array is one example. Furthermore, type inference allows defining such operations without having to explicitly provide the type of their parameters and result. + * User-definable algebraic data types and pattern-matching. New algebraic data types can be defined as combinations of records and sums. Functions that operate over such data structures can then be defined by pattern matching, a generalized form of the well-known switch statement, which offers a clean and elegant way of simultaneously examining and naming data. + * Automatic memory management, thanks to a fast, unobtrusive, incremental garbage collector. + * Separate compilation of standalone applications. Portable bytecode compilers allow creating stand-alone applications out of Caml Light or OCaml programs. A foreign function interface allows OCaml code to interoperate with C code when necessary. Interactive use of OCaml is also supported via a “read-evaluate-print” loop. + + In addition, OCaml features: + * A sophisticated module system, which allows organizing modules hierarchically and parameterizing a module over a number of other modules. + * An expressive object-oriented layer, featuring multiple inheritance, parametric and virtual classes. + * Efficient native code compilers. In addition to its bytecode compiler, OCaml offers a compiler that produces efficient machine code for many architectures. + + Learn more at: https://ocaml.org/learn/description.html + ''; platforms = with platforms; linux ++ darwin; broken = stdenv.isAarch64 && !lib.versionAtLeast version "4.06"; }; }) - - diff --git a/nixpkgs/pkgs/development/compilers/opendylan/default.nix b/nixpkgs/pkgs/development/compilers/opendylan/default.nix index 45b2454259f7..1ffc85a6ada5 100644 --- a/nixpkgs/pkgs/development/compilers/opendylan/default.nix +++ b/nixpkgs/pkgs/development/compilers/opendylan/default.nix @@ -2,7 +2,8 @@ {lib, stdenv, fetchgit, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }: stdenv.mkDerivation { - name = "opendylan-2016.1pre"; + pname = "opendylan"; + version = "2016.1pre"; src = fetchgit { url = "https://github.com/dylan-lang/opendylan"; diff --git a/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix index ae045ddfdba0..0b158a169321 100644 --- a/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix +++ b/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix @@ -65,6 +65,12 @@ let EOF ''; + # fixupPhase is moving the man to share/man which breaks it because it's a + # relative symlink. + postFixup = '' + ln -nsf ../zulu-11.jdk/Contents/Home/man $out/share/man + ''; + passthru = { home = jdk; }; diff --git a/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix b/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix index 9478f83477c8..1d6776303bf0 100644 --- a/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix +++ b/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix @@ -65,6 +65,12 @@ let EOF ''; + # fixupPhase is moving the man to share/man which breaks it because it's a + # relative symlink. + postFixup = '' + ln -nsf ../zulu-${lib.versions.major version}.jdk/Contents/Home/man $out/share/man + ''; + passthru = { home = jdk; }; diff --git a/nixpkgs/pkgs/development/compilers/openjdk/jre_minimal_test1.nix b/nixpkgs/pkgs/development/compilers/openjdk/jre_minimal_test1.nix deleted file mode 100644 index eebd11fb2fdf..000000000000 --- a/nixpkgs/pkgs/development/compilers/openjdk/jre_minimal_test1.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ runCommand -, callPackage -, jdk -, jre_minimal -}: - -let - hello = callPackage tests/hello.nix { - jdk = jdk; - jre = jre_minimal; - }; -in - runCommand "test" {} '' - ${hello}/bin/hello | grep "Hello, world!" - touch $out - '' diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix index 228dbf9b14e9..1d741fd8be2d 100644 --- a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix +++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, writeText, gradleGen, pkg-config, perl, cmake -, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg, python, ruby +, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg, python2, ruby , openjdk11-bootstrap }: let @@ -20,7 +20,7 @@ let }; buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg ]; - nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python ruby ]; + nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python2 ruby ]; dontUseCmakeConfigure = true; diff --git a/nixpkgs/pkgs/development/compilers/osl/default.nix b/nixpkgs/pkgs/development/compilers/osl/default.nix index 100676448131..eeaba75c0de4 100644 --- a/nixpkgs/pkgs/development/compilers/osl/default.nix +++ b/nixpkgs/pkgs/development/compilers/osl/default.nix @@ -1,6 +1,6 @@ { clangStdenv, lib, fetchFromGitHub, cmake, zlib, openexr, openimageio, llvm, boost165, flex, bison, partio, pugixml, -util-linux, python +util-linux, python3 }: let boost_static = boost165.override { enableStatic = true; }; @@ -26,7 +26,7 @@ in clangStdenv.mkDerivation rec { zlib openexr openimageio llvm partio pugixml util-linux # needed just for hexdump - python # CMake doesn't check this? + python3 # CMake doesn't check this? ]; # TODO: How important is partio? CMake doesn't seem to find it meta = with lib; { diff --git a/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix b/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix index 3f40a4d7889e..43fe247b79fb 100644 --- a/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix +++ b/nixpkgs/pkgs/development/compilers/ponyc/pony-corral.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation ( rec { pname = "corral"; - version = "0.5.1"; + version = "0.5.3"; src = fetchFromGitHub { owner = "ponylang"; repo = pname; rev = version; - sha256 = "1g4dkf5hsnykn3x6yx6ycjzmzzr1nwl59lj13j7zyka1ibv53hwf"; + sha256 = "sha256-27J1Y3+tbZK7RX+63xVV2eaX/LF525vBR3Ff9EYDEl0="; }; buildInputs = [ ponyc ]; diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix b/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix index adf9dd13c71f..9b71975f5023 100644 --- a/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix +++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix @@ -18,19 +18,20 @@ let in stdenv.mkDerivation rec { pname = "purescript"; - version = "0.14.3"; + version = "0.14.4"; + # These hashes can be updated automatically by running the ./update.sh script. src = if stdenv.isDarwin then fetchurl { url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos.tar.gz"; - sha256 = "1ipksp6kx3h030xf1y3y30gazrdz893pklanwak27hbqfy3ckssj"; + sha256 = "0m6zwb5f890d025zpn006qr8cky6zhjycap5az9zh6h47jfbrcf9"; } else fetchurl { url = "https://github.com/${pname}/${pname}/releases/download/v${version}/linux64.tar.gz"; - sha256 = "158jyjpfgd84gbwpxqj41mvpy0fmb1d1iqq2h42sc7041v2f38p0"; + sha256 = "0hgsh6l52z873b2zk3llvqik18ifika48lmr71qyhlqf250ng9m0"; }; @@ -51,8 +52,11 @@ in stdenv.mkDerivation rec { $PURS --bash-completion-script $PURS > $out/share/bash-completion/completions/purs-completion.bash ''; - passthru.tests = { - minimal-module = pkgs.callPackage ./test-minimal-module {}; + passthru = { + updateScript = ./update.sh; + tests = { + minimal-module = pkgs.callPackage ./test-minimal-module {}; + }; }; meta = with lib; { diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh b/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh new file mode 100755 index 000000000000..ea6663d810c4 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/update.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl gnused jq -I nixpkgs=. +# +# This script will update the purescript derivation to the latest version. + +set -eo pipefail + +# This is the directory of this update.sh script. +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +purescript_derivation_file="${script_dir}/default.nix" + +# This is the current revision of PureScript in Nixpkgs. +old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$purescript_derivation_file")" + +# This is the latest release version of PureScript on GitHub. +new_version=$(curl --silent "https://api.github.com/repos/purescript/purescript/releases" | jq '.[0].tag_name' --raw-output | sed -e 's/v//') + +echo "Updating purescript from old version v${old_version} to new version v${new_version}." +echo + +echo "Fetching both old and new release tarballs for Darwin and Linux in order to confirm hashes." +echo +old_linux_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/linux64.tar.gz")" +echo "v${old_version} linux tarball hash (current version): $old_linux_version_hash" +new_linux_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/linux64.tar.gz")" +echo "v${new_version} linux tarball hash: $new_linux_version_hash" +old_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/macos.tar.gz")" +echo "v${old_version} darwin tarball hash (current version): $old_darwin_version_hash" +new_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/macos.tar.gz")" +echo "v${new_version} darwin tarball hash: $new_darwin_version_hash" +echo + +echo "Replacing version and hashes in ${purescript_derivation_file}." +sed -i -e "s/${old_linux_version_hash}/${new_linux_version_hash}/" "$purescript_derivation_file" +sed -i -e "s/${old_darwin_version_hash}/${new_darwin_version_hash}/" "$purescript_derivation_file" +sed -i -e "s/${old_version}/${new_version}/" "$purescript_derivation_file" +echo + +echo "Finished. Make sure you run the following commands to confirm PureScript builds correctly:" +echo ' - `nix build -L -f ./. purescript`' +echo ' - `nix build -L -f ./. purescript.passthru.tests.minimal-module`' +echo ' - `sudo nix build -L -f ./. spago.passthru.tests --option sandbox relaxed`' diff --git a/nixpkgs/pkgs/development/compilers/rgbds/default.nix b/nixpkgs/pkgs/development/compilers/rgbds/default.nix index 6bc74971c4e9..00b20abbda8a 100644 --- a/nixpkgs/pkgs/development/compilers/rgbds/default.nix +++ b/nixpkgs/pkgs/development/compilers/rgbds/default.nix @@ -1,23 +1,19 @@ {lib, stdenv, fetchFromGitHub, bison, flex, pkg-config, libpng}: -# TODO: byacc is the recommended parser generator but due to https://github.com/rednex/rgbds/issues/333 -# it does not work for the moment. We should switch back to byacc as soon as the fix is integrated -# in a published version. - stdenv.mkDerivation rec { pname = "rgbds"; - version = "0.4.2"; + version = "0.5.1"; src = fetchFromGitHub { - owner = "rednex"; + owner = "gbdev"; repo = "rgbds"; rev = "v${version}"; - sha256 = "0lygj7jzjlq4w0mkiir7ycysrd1p1akyvzrppjcchja05mi8wy9p"; + sha256 = "11b1hg2m2f60q5622rb0nxhrzzylsxjx0c8inbxifi6lvmj9ak4x"; }; nativeBuildInputs = [ bison flex pkg-config libpng ]; installFlags = [ "PREFIX=\${out}" ]; meta = with lib; { - homepage = "https://rednex.github.io/rgbds/"; + homepage = "https://rgbds.gbdev.io/"; description = "A free assembler/linker package for the Game Boy and Game Boy Color"; license = licenses.mit; longDescription = diff --git a/nixpkgs/pkgs/development/compilers/rust/default.nix b/nixpkgs/pkgs/development/compilers/rust/default.nix index fee21023c4c2..3e6f3a044fb4 100644 --- a/nixpkgs/pkgs/development/compilers/rust/default.nix +++ b/nixpkgs/pkgs/development/compilers/rust/default.nix @@ -38,8 +38,11 @@ "armv5tel" = "armv5te"; "riscv64" = "riscv64gc"; }.${cpu.name} or cpu.name; + vendor_ = platform.rustc.platform.vendor or { + "w64" = "pc"; + }.${vendor.name} or vendor.name; in platform.rustc.config - or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}"; + or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}"; # Returns the name of the rust target if it is standard, or the json file # containing the custom target spec. diff --git a/nixpkgs/pkgs/development/compilers/sbcl/common.nix b/nixpkgs/pkgs/development/compilers/sbcl/common.nix index eb3f6aba200c..d81d1bf8f630 100644 --- a/nixpkgs/pkgs/development/compilers/sbcl/common.nix +++ b/nixpkgs/pkgs/development/compilers/sbcl/common.nix @@ -1,6 +1,6 @@ { version, sha256 }: -{ lib, stdenv, fetchurl, writeText, sbclBootstrap +{ lib, stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" , threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system) , disableImmobileSpace ? false @@ -22,6 +22,14 @@ stdenv.mkDerivation rec { buildInputs = [texinfo]; + patches = lib.optional + (lib.versionAtLeast version "2.1.2" && lib.versionOlder version "2.1.8") + (fetchpatch { + # Fix segfault on ARM when reading large core files + url = "https://github.com/sbcl/sbcl/commit/8fa3f76fba2e8572e86ac6fc5754e6b2954fc774.patch"; + sha256 = "1ic531pjnws1k3xd03a5ixbq8cn10dlh2nfln59k0vbm0253g3lv"; + }); + postPatch = '' echo '"${version}.nixos"' > version.lisp-expr diff --git a/nixpkgs/pkgs/development/compilers/scala-runners/default.nix b/nixpkgs/pkgs/development/compilers/scala-runners/default.nix index e379bf4e38e9..0f0de015af5f 100644 --- a/nixpkgs/pkgs/development/compilers/scala-runners/default.nix +++ b/nixpkgs/pkgs/development/compilers/scala-runners/default.nix @@ -1,16 +1,17 @@ -{ stdenv, lib, fetchFromGitHub, jre, coursier }: +{ stdenv, lib, fetchFromGitHub, coursier }: stdenv.mkDerivation rec { pname = "scala-runners"; - version = "unstable-2020-02-02"; + version = "unstable-2021-07-28"; src = fetchFromGitHub { repo = pname; owner = "dwijnand"; - rev = "95e03c9f9de0fe0ab61eeb6dea2a364f9d081d31"; - sha256 = "0mvlc6fxsh5d6gsyak9n3g98g4r061n8pir37jpiqb7z00m9lfrx"; + rev = "9bf096ca81f4974d7327e291eac291e22b344a8f"; + sha256 = "032fds5nr102h1lc81n9jc60jmxzivi4md4hcjrlqn076hfhj4ax"; }; + dontBuild = true; installPhase = '' mkdir -p $out/bin $out/lib sed -ie "s| cs | ${coursier}/bin/coursier |" scala-runner diff --git a/nixpkgs/pkgs/development/compilers/scala/2.x.nix b/nixpkgs/pkgs/development/compilers/scala/2.x.nix index fe821f18c156..1ffdc5ec0263 100644 --- a/nixpkgs/pkgs/development/compilers/scala/2.x.nix +++ b/nixpkgs/pkgs/development/compilers/scala/2.x.nix @@ -1,5 +1,5 @@ -{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils -, writeScript, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }: +{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript +, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }: with lib; @@ -20,8 +20,8 @@ let }; "2.12" = { - version = "2.12.13"; - sha256 = "17548sx7liskkadqiqaajmwp2w7bh9m2d8hp2mwyg8yslmjx4pcc"; + version = "2.12.14"; + sha256 = "/X4+QDIogBOinAoUR8WX+vew5Jl2LA2YHbIQmel4BCY="; pname = "scala_2_12"; }; diff --git a/nixpkgs/pkgs/development/compilers/sdcc/default.nix b/nixpkgs/pkgs/development/compilers/sdcc/default.nix index d0ebb57920bc..28a461b09883 100644 --- a/nixpkgs/pkgs/development/compilers/sdcc/default.nix +++ b/nixpkgs/pkgs/development/compilers/sdcc/default.nix @@ -23,6 +23,12 @@ stdenv.mkDerivation rec { configureFlags = map (f: "--disable-${f}-port") excludedPorts; + preConfigure = '' + if test -n "''${dontStrip-}"; then + export STRIP=none + fi + ''; + meta = { description = "Small Device C Compiler"; longDescription = '' diff --git a/nixpkgs/pkgs/development/compilers/seexpr/default.nix b/nixpkgs/pkgs/development/compilers/seexpr/default.nix index 7fc1fc7b1b6d..5dfa08c45727 100644 --- a/nixpkgs/pkgs/development/compilers/seexpr/default.nix +++ b/nixpkgs/pkgs/development/compilers/seexpr/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, libpng, zlib, qt4, -bison, flex, libGLU, pythonPackages +bison, flex, libGLU, python2Packages }: stdenv.mkDerivation { @@ -13,7 +13,7 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ libGLU libpng zlib qt4 pythonPackages.pyqt4 bison flex ]; + buildInputs = [ libGLU libpng zlib qt4 python2Packages.pyqt4 bison flex ]; meta = with lib; { description = "Embeddable expression evaluation engine from Disney Animation"; homepage = "https://www.disneyanimation.com/technology/seexpr.html"; diff --git a/nixpkgs/pkgs/development/compilers/stalin/default.nix b/nixpkgs/pkgs/development/compilers/stalin/default.nix index f47086b1ca25..50603919b8b3 100644 --- a/nixpkgs/pkgs/development/compilers/stalin/default.nix +++ b/nixpkgs/pkgs/development/compilers/stalin/default.nix @@ -1,7 +1,8 @@ { fetchurl, lib, stdenv, ncompress, libX11 }: stdenv.mkDerivation rec { - name = "stalin-0.11"; + pname = "stalin"; + version = "0.11"; src = fetchurl { url = "ftp://ftp.ecn.purdue.edu/qobi/stalin.tar.Z"; @@ -22,16 +23,16 @@ stdenv.mkDerivation rec { mkdir -p "$out/share/emacs/site-lisp" cp stalin.el "$out/share/emacs/site-lisp" - mkdir -p "$out/doc/${name}" - cp README "$out/doc/${name}" + mkdir -p "$out/doc/stalin-${version}" + cp README "$out/doc/stalin-${version}" - mkdir -p "$out/share/${name}/include" - cp "include/"* "$out/share/${name}/include" + mkdir -p "$out/share/stalin-${version}/include" + cp "include/"* "$out/share/stalin-${version}/include" substituteInPlace "$out/bin/stalin" \ - --replace "$PWD/include/stalin" "$out/share/${name}/include/stalin" + --replace "$PWD/include/stalin" "$out/share/stalin-${version}/include/stalin" substituteInPlace "$out/bin/stalin" \ - --replace "$PWD/include" "$out/share/${name}/include" + --replace "$PWD/include" "$out/share/stalin-${version}/include" ''; meta = { diff --git a/nixpkgs/pkgs/development/compilers/swift/default.nix b/nixpkgs/pkgs/development/compilers/swift/default.nix index 530115602673..7fc2485da019 100644 --- a/nixpkgs/pkgs/development/compilers/swift/default.nix +++ b/nixpkgs/pkgs/development/compilers/swift/default.nix @@ -12,12 +12,13 @@ , swig , bash , libxml2 -, clang -, python +, clang_10 +, python3 , ncurses , libuuid , libbsd , icu +, libgcc , autoconf , libtool , automake @@ -35,9 +36,14 @@ }: let - version = "5.1.1"; + version = "5.4.2"; - fetch = { repo, sha256, fetchSubmodules ? false }: + # These dependency versions can be found in utils/update_checkout/update-checkout-config.json. + swiftArgumentParserVersion = "0.3.0"; + yamsVersion = "3.0.1"; + swiftFormatVersion = "0.50400.0"; + + fetchSwiftRelease = { repo, sha256, fetchSubmodules ? false }: fetchFromGitHub { owner = "apple"; inherit repo sha256 fetchSubmodules; @@ -45,63 +51,87 @@ let name = "${repo}-${version}-src"; }; + # Sources based on utils/update_checkout/update_checkout-config.json. sources = { - llvm = fetch { - repo = "swift-llvm"; - sha256 = "00ldd9dby6fl6nk3z17148fvb7g9x4jkn1afx26y51v8rwgm1i7f"; - }; - compilerrt = fetch { - repo = "swift-compiler-rt"; - sha256 = "1431f74l0n2dxn728qp65nc6hivx88fax1wzfrnrv19y77br05wj"; - }; - clang = fetch { - repo = "swift-clang"; - sha256 = "0n7k6nvzgqp6h6bfqcmna484w90db3zv4sh5rdh89wxyhdz6rk4v"; - }; - clangtools = fetch { - repo = "swift-clang-tools-extra"; - sha256 = "0snp2rpd60z239pr7fxpkj332rkdjhg63adqvqdkjsbrxcqqcgqa"; + swift = fetchSwiftRelease { + repo = "swift"; + sha256 = "0qrkqkwpmk312fi12kwwyihin01qb7sphhdz5c6an8j1rjfd9wbv"; }; - indexstore = fetch { - repo = "indexstore-db"; - sha256 = "1gwkqkdmpd5hn7555dpdkys0z50yh00hjry2886h6rx7avh5p05n"; + cmark = fetchSwiftRelease { + repo = "swift-cmark"; + sha256 = "0340j9x2n40yx61ma2pgqfbn3a9ijrh20iwzd1zxqq87rr76hh3z"; }; - sourcekit = fetch { - repo = "sourcekit-lsp"; - sha256 = "0k84ssr1k7grbvpk81rr21ii8csnixn9dp0cga98h6i1gshn8ml4"; + llbuild = fetchSwiftRelease { + repo = "swift-llbuild"; + sha256 = "0d7sj5a9b5c1ry2209cpccic5radf9s48sp1lahqzmd1pdx3n7pi"; }; - cmark = fetch { - repo = "swift-cmark"; - sha256 = "079smm79hbwr06bvghd2sb86b8gpkprnzlyj9kh95jy38xhlhdnj"; + argumentParser = fetchFromGitHub { + owner = "apple"; + repo = "swift-argument-parser"; + rev = swiftArgumentParserVersion; + sha256 = "15vv7hnffa84142q97dwjcn196p2bg8nfh89d6nnix0i681n1qfd"; + name = "swift-argument-parser-${swiftArgumentParserVersion}"; }; - lldb = fetch { - repo = "swift-lldb"; - sha256 = "0j787475f0nlmvxqblkhn3yrvn9qhcb2jcijwijxwq95ar2jdygs"; + driver = fetchSwiftRelease { + repo = "swift-driver"; + sha256 = "1j08273haqv7786rkwsmw7g103glfwy1d2807490id9lagq3r66z"; }; - llbuild = fetch { - repo = "swift-llbuild"; - sha256 = "1n2s5isxyl6b6ya617gdzjbw68shbvd52vsfqc1256rk4g448v8b"; + toolsSupportCore = fetchSwiftRelease { + repo = "swift-tools-support-core"; + sha256 = "07gm28ki4px7xzrplvk9nd1pp5r9nyi87l21i0rcbb3r6wrikxb4"; }; - pm = fetch { + swiftpm = fetchSwiftRelease { repo = "swift-package-manager"; - sha256 = "1a49jmag5mpld9zr96g8a773334mrz1c4nyw38gf4p6sckf4jp29"; + sha256 = "05linnzlidxamzl3723zhyrfm24pk2cf1x66a3nk0cxgnajw0vzx"; + }; + syntax = fetchSwiftRelease { + repo = "swift-syntax"; + sha256 = "1y9agx9bg037xjhkwc28xm28kjyqydgv21s4ijgy5l51yg1g0daj"; }; - xctest = fetch { + # TODO: possibly re-add stress-tester. + corelibsXctest = fetchSwiftRelease { repo = "swift-corelibs-xctest"; - sha256 = "0rxy9sq7i0s0kxfkz0hvdp8zyb40h31f7g4m0kry36qk82gzzh89"; + sha256 = "00c68580yr12yxshl0hxyhp8psm15fls3c7iqp52hignyl4v745r"; }; - foundation = fetch { + corelibsFoundation = fetchSwiftRelease { repo = "swift-corelibs-foundation"; - sha256 = "1iiiijsnys0r3hjcj1jlkn3yszzi7hwb2041cnm5z306nl9sybzp"; + sha256 = "1jyadm2lm7hhik8n8wacfiffpdwqsgnilwmcw22qris5s2drj499"; }; - libdispatch = fetch { + corelibsLibdispatch = fetchSwiftRelease { repo = "swift-corelibs-libdispatch"; - sha256 = "0laqsizsikyjhrzn0rghvxd8afg4yav7cbghvnf7ywk9wc6kpkmn"; + sha256 = "1s46c0hrxi42r43ff5f1pq2imb3hs05adfpwfxkilgqyb5svafsp"; fetchSubmodules = true; }; - swift = fetch { - repo = "swift"; - sha256 = "0m4r1gzrnn0s1c7haqq9dlmvpqxbgbkbdfmq6qaph869wcmvdkvy"; + # TODO: possibly re-add integration-tests. + # Linux does not support Xcode playgrounds. + # We provide our own ninja. + # We provider our own icu. + yams = fetchFromGitHub { + owner = "jpsim"; + repo = "Yams"; + rev = yamsVersion; + sha256 = "13md54y7lalrpynrw1s0w5yw6rrjpw46fml9dsk2m3ph1bnlrqrq"; + name = "Yams-${yamsVersion}"; + }; + # We provide our own CMake. + indexstoreDb = fetchSwiftRelease { + repo = "indexstore-db"; + sha256 = "1ap3hiq2jd3cn10d8d674xysq27by878mvq087a80681r8cdivn3"; + }; + sourcekitLsp = fetchSwiftRelease { + repo = "sourcekit-lsp"; + sha256 = "02m9va0lsn2hnwkmgrbgj452sbyaswwmq14lqvxgnb7gssajv4gc"; + }; + format = fetchFromGitHub { + owner = "apple"; + repo = "swift-format"; + rev = swiftFormatVersion; + sha256 = "0skmmggsh31f3rnqcrx43178bc7scrjihibnwn68axagasgbqn4k"; + name = "swift-format-${swiftFormatVersion}-src"; + }; + llvmProject = fetchSwiftRelease { + repo = "llvm-project"; + sha256 = "166hd9d2i55zj70xjb1qmbblbfyk8hdb2qv974i07j6cvynn30lm"; }; }; @@ -112,6 +142,7 @@ let libblocksruntime libbsd libedit + libgcc libuuid libxml2 ncurses @@ -119,6 +150,8 @@ let swig ]; + python = (python3.withPackages (ps: [ps.six])); + cmakeFlags = [ "-DGLIBC_INCLUDE_PATH=${stdenv.cc.libc.dev}/include" "-DC_INCLUDE_DIRS=${lib.makeSearchPathOutput "dev" "include" devInputs}:${libxml2.dev}/include/libxml2" @@ -136,6 +169,7 @@ stdenv.mkDerivation { cmake coreutils findutils + git gnumake libtool makeWrapper @@ -147,11 +181,12 @@ stdenv.mkDerivation { which ]; buildInputs = devInputs ++ [ - clang + clang_10 ]; - # TODO: Revisit what's propagated and how + # TODO: Revisit what needs to be propagated and how. propagatedBuildInputs = [ + libgcc libgit2 python ]; @@ -164,32 +199,33 @@ stdenv.mkDerivation { cd src export SWIFT_SOURCE_ROOT=$PWD - cp -r ${sources.llvm} llvm - cp -r ${sources.compilerrt} compiler-rt - cp -r ${sources.clang} clang - cp -r ${sources.clangtools} clang-tools-extra - cp -r ${sources.indexstore} indexstore-db - cp -r ${sources.sourcekit} sourcekit-lsp + cp -r ${sources.swift} swift cp -r ${sources.cmark} cmark - cp -r ${sources.lldb} lldb cp -r ${sources.llbuild} llbuild - cp -r ${sources.pm} swiftpm - cp -r ${sources.xctest} swift-corelibs-xctest - cp -r ${sources.foundation} swift-corelibs-foundation - cp -r ${sources.libdispatch} swift-corelibs-libdispatch - cp -r ${sources.swift} swift + cp -r ${sources.argumentParser} swift-argument-parser + cp -r ${sources.driver} swift-driver + cp -r ${sources.toolsSupportCore} swift-tools-support-core + cp -r ${sources.swiftpm} swiftpm + cp -r ${sources.syntax} swift-syntax + # TODO: possibly re-add stress-tester. + cp -r ${sources.corelibsXctest} swift-corelibs-xctest + cp -r ${sources.corelibsFoundation} swift-corelibs-foundation + cp -r ${sources.corelibsLibdispatch} swift-corelibs-libdispatch + # TODO: possibly re-add integration-tests. + cp -r ${sources.yams} yams + cp -r ${sources.indexstoreDb} indexstore-db + cp -r ${sources.sourcekitLsp} sourcekit-lsp + cp -r ${sources.format} swift-format + cp -r ${sources.llvmProject} llvm-project chmod -R u+w . ''; patchPhase = '' - # Glibc 2.31 fix - patch -p1 -i ${./patches/swift-llvm.patch} - - # Just patch all the things for now, we can focus this later + # Just patch all the things for now, we can focus this later. patchShebangs $SWIFT_SOURCE_ROOT - # TODO eliminate use of env. + # TODO: eliminate use of env. find -type f -print0 | xargs -0 sed -i \ -e 's|/usr/bin/env|${coreutils}/bin/env|g' \ -e 's|/usr/bin/make|${gnumake}/bin/make|g' \ @@ -197,16 +233,13 @@ stdenv.mkDerivation { -e 's|/bin/cp|${coreutils}/bin/cp|g' \ -e 's|/usr/bin/file|${file}/bin/file|g' - substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \ - --replace '/usr/include' "${stdenv.cc.libc.dev}/include" - substituteInPlace swift/utils/build-script-impl \ - --replace '/usr/include/c++' "${gccForLibs}/include/c++" - patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch} + # Build configuration patches. patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch} patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} patch -p1 -d swift -i ${./patches/0003-build-presets-linux-don-t-build-extra-libs.patch} patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} - + substituteInPlace swift/cmake/modules/SwiftConfigureSDK.cmake \ + --replace '/usr/include' "${stdenv.cc.libc.dev}/include" sed -i swift/utils/build-presets.ini \ -e 's/^test-installable-package$/# \0/' \ -e 's/^test$/# \0/' \ @@ -214,41 +247,37 @@ stdenv.mkDerivation { -e 's/^long-test$/# \0/' \ -e 's/^stress-test$/# \0/' \ -e 's/^test-optimized$/# \0/' \ - \ -e 's/^swift-install-components=autolink.*$/\0;editor-integration/' - substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \ - --replace 'SysRoot + "/lib' '"${glibc}/lib" "' - substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \ - --replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "' - patch -p1 -d clang -i ${./patches/llvm-toolchain-dir.patch} - patch -p1 -d clang -i ${./purity.patch} - - # Workaround hardcoded dep on "libcurses" (vs "libncurses"): + # LLVM toolchain patches. + patch -p1 -d llvm-project/clang -i ${./patches/0005-clang-toolchain-dir.patch} + patch -p1 -d llvm-project/clang -i ${./patches/0006-clang-purity.patch} + substituteInPlace llvm-project/clang/lib/Driver/ToolChains/Linux.cpp \ + --replace 'SysRoot + "/lib' '"${glibc}/lib" "' \ + --replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "' \ + --replace 'LibDir = "lib";' 'LibDir = "${glibc}/lib";' \ + --replace 'LibDir = "lib64";' 'LibDir = "${glibc}/lib";' \ + --replace 'LibDir = X32 ? "libx32" : "lib64";' 'LibDir = "${glibc}/lib";' + + # Substitute ncurses for curses in llbuild. sed -i 's/curses/ncurses/' llbuild/*/*/CMakeLists.txt - # uuid.h is not part of glibc, but of libuuid - sed -i 's|''${GLIBC_INCLUDE_PATH}/uuid/uuid.h|${libuuid.dev}/include/uuid/uuid.h|' swift/stdlib/public/Platform/glibc.modulemap.gyb + sed -i 's/curses/ncurses/' llbuild/*/*/*/CMakeLists.txt - # Compatibility with glibc 2.30 - # Adapted from https://github.com/apple/swift-package-manager/pull/2408 - patch -p1 -d swiftpm -i ${./patches/swift-package-manager-glibc-2.30.patch} - # https://github.com/apple/swift/pull/27288 - patch -p1 -d swift -i ${fetchpatch { - url = "https://github.com/apple/swift/commit/f968f4282d53f487b29cf456415df46f9adf8748.patch"; - sha256 = "1aa7l66wlgip63i4r0zvi9072392bnj03s4cn12p706hbpq0k37c"; - }} + # uuid.h is not part of glibc, but of libuuid. + sed -i 's|''${GLIBC_INCLUDE_PATH}/uuid/uuid.h|${libuuid.dev}/include/uuid/uuid.h|' swift/stdlib/public/Platform/glibc.modulemap.gyb + # Support library build script patches. PREFIX=''${out/#\/} - substituteInPlace indexstore-db/Utilities/build-script-helper.py \ - --replace usr "$PREFIX" - substituteInPlace sourcekit-lsp/Utilities/build-script-helper.py \ - --replace usr "$PREFIX" + substituteInPlace swift/utils/swift_build_support/swift_build_support/products/benchmarks.py \ + --replace \ + "'--toolchain', toolchain_path," \ + "'--toolchain', '/build/install/$PREFIX'," + substituteInPlace swift/benchmark/scripts/build_script_helper.py \ + --replace \ + "swiftbuild_path = os.path.join(args.toolchain, \"usr\", \"bin\", \"swift-build\")" \ + "swiftbuild_path = os.path.join(args.toolchain, \"bin\", \"swift-build\")" substituteInPlace swift-corelibs-xctest/build_script.py \ --replace usr "$PREFIX" - substituteInPlace swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c \ - --replace "if !TARGET_OS_ANDROID" "if TARGET_OS_MAC || TARGET_OS_BSD" - substituteInPlace swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c \ - --replace "if !TARGET_OS_ANDROID" "if TARGET_OS_MAC || TARGET_OS_BSD" ''; configurePhase = '' @@ -265,17 +294,15 @@ stdenv.mkDerivation { ''; buildPhase = '' - # explicitly include C++ headers to prevent errors where stdlib.h is not found from cstdlib - export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE" - # During the Swift build, a full local LLVM build is performed and the resulting clang is invoked. - # This compiler is not using the Nix wrappers, so it needs some help to find things. + # Explicitly include C++ headers to prevent errors where stdlib.h is not found from cstdlib. + export NIX_CFLAGS_COMPILE="$(< ${clang_10}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE" + + # During the Swift build, a full local LLVM build is performed and the resulting clang is + # invoked. This compiler is not using the Nix wrappers, so it needs some help to find things. export NIX_LDFLAGS_BEFORE="-rpath ${gccForLibs.lib}/lib -L${gccForLibs.lib}/lib $NIX_LDFLAGS_BEFORE" - # However, we want to use the wrapped compiler whenever possible. - export CC="${clang}/bin/clang" - # fix for https://bugs.llvm.org/show_bug.cgi?id=39743 - # see also https://forums.swift.org/t/18138/15 - export CCC_OVERRIDE_OPTIONS="#x-fmodules s/-fmodules-cache-path.*//" + # However, we want to use the wrapped compiler whenever possible. + export CC="${clang_10}/bin/clang" $SWIFT_SOURCE_ROOT/swift/utils/build-script \ --preset=buildbot_linux \ @@ -290,14 +317,31 @@ stdenv.mkDerivation { checkInputs = [ file ]; checkPhase = '' - # FIXME: disable non-working tests - rm $SWIFT_SOURCE_ROOT/swift/test/Driver/static-stdlib-linux.swift # static linkage of libatomic.a complains about missing PIC - rm $SWIFT_SOURCE_ROOT/swift/validation-test/Python/build_swift.swift # install_prefix not passed properly + # Remove compiler build system tests which fail due to our modified default build profile and + # nixpkgs-provided version of CMake. + rm $SWIFT_SOURCE_ROOT/swift/validation-test/BuildSystem/infer_implies_install_all.test + rm $SWIFT_SOURCE_ROOT/swift/validation-test/BuildSystem/infer_dumps_deps_if_verbose_build.test + + # This test apparently requires Python 2 (strings are assumed to be bytes-like), but the build + # process overall now otherwise requires Python 3 (which is what we have updated to). A fix PR + # has been submitted upstream. + rm $SWIFT_SOURCE_ROOT/swift/validation-test/SIL/verify_all_overlays.py + + # TODO: consider fixing and re-adding. This test fails due to a non-standard "install_prefix". + rm $SWIFT_SOURCE_ROOT/swift/validation-test/Python/build_swift.swift + + # We cannot handle the SDK location being in "Weird Location" due to Nix isolation. + rm $SWIFT_SOURCE_ROOT/swift/test/DebugInfo/compiler-flags.swift - # match the swift wrapper in the install phase - export LIBRARY_PATH=${icu}/lib:${libuuid.out}/lib + # TODO: Fix issue with ld.gold invoked from script finding crtbeginS.o and crtendS.o. + rm $SWIFT_SOURCE_ROOT/swift/test/IRGen/ELF-remove-autolink-section.swift - checkTarget=check-swift-all + # TODO: consider using stress-tester and integration-test. + + # Match the wrapped version of Swift to be installed. + export LIBRARY_PATH=${icu}/lib:${libgcc}/lib:${libuuid.out}/lib:$l + + checkTarget=check-swift-all-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name} ninjaFlags='-C buildbot_linux/swift-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}' ninjaCheckPhase ''; @@ -305,19 +349,26 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out - # Extract the generated tarball into the store + # Extract the generated tarball into the store. tar xf $INSTALLABLE_PACKAGE -C $out --strip-components=3 ''${out/#\/} find $out -type d -empty -delete - # fix installation weirdness, also present in Apple’s official tarballs + # Fix installation weirdness, also present in Apple’s official tarballs. mv $out/local/include/indexstore $out/include rmdir $out/local/include $out/local rm -r $out/bin/sdk-module-lists $out/bin/swift-api-checker.py wrapProgram $out/bin/swift \ + --set CC $out/bin/clang \ + --suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \ + --suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include \ + --suffix LIBRARY_PATH : ${icu}/lib:${libgcc}/lib:${libuuid.out}/lib + + wrapProgram $out/bin/swiftc \ + --set CC $out/bin/clang \ --suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \ --suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include \ - --suffix LIBRARY_PATH : ${icu}/lib:${libuuid.out}/lib + --suffix LIBRARY_PATH : ${icu}/lib:${libgcc}/lib:${libuuid.out}/lib ''; # Hack to avoid build and install directories in RPATHs. @@ -326,14 +377,11 @@ stdenv.mkDerivation { meta = with lib; { description = "The Swift Programming Language"; homepage = "https://github.com/apple/swift"; - maintainers = with maintainers; [ dtzWill ]; + maintainers = with maintainers; [ dtzWill trepetti ]; license = licenses.asl20; - # Swift doesn't support 32bit Linux, unknown on other platforms. + # Swift doesn't support 32-bit Linux, unknown on other platforms. platforms = platforms.linux; badPlatforms = platforms.i686; - broken = true; # 2021-01-29 - knownVulnerabilities = [ - "CVE-2020-9861" - ]; + timeout = 86400; # 24 hours. }; } diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch index 60b2996b3405..6c42921cd233 100644 --- a/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch @@ -2,12 +2,12 @@ Don't build Ninja, we use our own. --- a/utils/build-presets.ini +++ b/utils/build-presets.ini -@@ -745,7 +745,7 @@ swiftpm - +@@ -779,7 +779,7 @@ swiftpm + dash-dash - + -build-ninja +# build-ninja + install-llvm install-swift install-lldb - install-llbuild diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch index 5ca6bf1354dc..0b4c2cc55c4f 100644 --- a/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch @@ -1,8 +1,8 @@ -allow custom install prefix +Use custom install prefix. ---- a/utils/build-presets.ini 2019-04-11 14:51:40.060259462 +0200 -+++ b/utils/build-presets.ini 2019-04-11 15:16:17.471137969 +0200 -@@ -752,7 +752,7 @@ +--- a/utils/build-presets.ini ++++ b/utils/build-presets.ini +@@ -788,7 +788,7 @@ install-swiftpm install-xctest install-libicu diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch index 0a66af9e5137..7d626e187755 100644 --- a/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch @@ -1,17 +1,17 @@ Disable targets, where we use Nix packages. ---- a/utils/build-presets.ini 2019-04-11 15:19:57.845178834 +0200 -+++ b/utils/build-presets.ini 2019-04-11 15:27:42.041297057 +0200 -@@ -740,8 +740,6 @@ +--- a/utils/build-presets.ini ++++ b/utils/build-presets.ini +@@ -776,8 +776,6 @@ llbuild swiftpm xctest -libicu -libcxx - + dash-dash - -@@ -751,9 +749,7 @@ + +@@ -785,9 +785,7 @@ install-llbuild install-swiftpm install-xctest diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch index 304b53a1dbf1..3cacdfc0c55e 100644 --- a/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch @@ -1,11 +1,11 @@ -plumb extra-cmake-options +Plumb extra-cmake-options. --- a/utils/build-presets.ini +++ b/utils/build-presets.ini -@@ -766,6 +766,8 @@ install-destdir=%(install_destdir)s +@@ -812,6 +812,8 @@ # Path to the .tar.gz package we would create. installable-package=%(installable_package)s - + +extra-cmake-options=%(extra_cmake_options)s + [preset: buildbot_linux] diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch new file mode 100644 index 000000000000..40d7728cf788 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch @@ -0,0 +1,13 @@ +Use the Nix include dirs and gcc runtime dir, when no sysroot is configured. + +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -574,7 +574,7 @@ + + // Check for configure-time C include directories. + StringRef CIncludeDirs(C_INCLUDE_DIRS); +- if (CIncludeDirs != "") { ++ if (CIncludeDirs != "" && (SysRoot.empty() || SysRoot == "/")) { + SmallVector<StringRef, 5> dirs; + CIncludeDirs.split(dirs, ":"); + for (StringRef dir : dirs) { diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0006-clang-purity.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0006-clang-purity.patch new file mode 100644 index 000000000000..928c1db6dee8 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/swift/patches/0006-clang-purity.patch @@ -0,0 +1,16 @@ +Apply the "purity" patch (updated for 5.4.2). + +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -488,11 +488,5 @@ + if (Args.hasArg(options::OPT_rdynamic)) + CmdArgs.push_back("-export-dynamic"); +- +- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) { +- CmdArgs.push_back("-dynamic-linker"); +- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + +- ToolChain.getDynamicLinker(Args))); +- } + } + + CmdArgs.push_back("-o"); diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch b/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch deleted file mode 100644 index c05db5208012..000000000000 --- a/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch +++ /dev/null @@ -1,13 +0,0 @@ -The Nix glibc headers do not use include/x86_64-linux-gnu subdirectories. - ---- swift/stdlib/public/Platform/CMakeLists.txt 2019-04-09 20:14:44.493801403 +0200 -+++ swift/stdlib/public/Platform/CMakeLists.txt 2019-04-09 20:14:44.577800593 +0200 -@@ -77,7 +77,7 @@ - endif() - - set(GLIBC_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}") -- set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}") -+ set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}") - - if(NOT "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}" STREQUAL "/" AND NOT "${sdk}" STREQUAL "ANDROID") - set(GLIBC_INCLUDE_PATH "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}${GLIBC_INCLUDE_PATH}") diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch deleted file mode 100644 index c22b5c820c85..000000000000 --- a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch +++ /dev/null @@ -1,24 +0,0 @@ -Use the Nix include dirs and gcc runtime dir, when no sysroot is configured. - ---- clang/lib/Driver/ToolChains/Linux.cpp 2018-10-05 18:01:15.731109551 +0200 -+++ clang/lib/Driver/ToolChains/Linux.cpp 2018-10-05 18:00:27.959509924 +0200 -@@ -665,7 +665,7 @@ - - // Check for configure-time C include directories. - StringRef CIncludeDirs(C_INCLUDE_DIRS); -- if (CIncludeDirs != "") { -+ if (CIncludeDirs != "" && (SysRoot.empty() || SysRoot == "/")) { - SmallVector<StringRef, 5> dirs; - CIncludeDirs.split(dirs, ":"); - for (StringRef dir : dirs) { ---- clang/lib/Driver/ToolChains/Gnu.cpp 2019-10-26 09:49:27.003752743 +0200 -+++ clang/lib/Driver/ToolChains/Gnu.cpp 2019-10-26 09:50:49.067236497 +0200 -@@ -1743,7 +1743,7 @@ - // If we have a SysRoot, ignore GCC_INSTALL_PREFIX. - // GCC_INSTALL_PREFIX specifies the gcc installation for the default - // sysroot and is likely not valid with a different sysroot. -- if (!SysRoot.empty()) -+ if (!(SysRoot.empty() || SysRoot == "/")) - return ""; - - return GCC_INSTALL_PREFIX; diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/swift-llvm.patch b/nixpkgs/pkgs/development/compilers/swift/patches/swift-llvm.patch deleted file mode 100644 index fcd9533fd72a..000000000000 --- a/nixpkgs/pkgs/development/compilers/swift/patches/swift-llvm.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -index bc6675bf4..2f3514b64 100644 ---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -1129,8 +1129,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); - CHECK_SIZE_AND_OFFSET(ipc_perm, gid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); --#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) --/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ -+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) -+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit -+ on many architectures. */ - CHECK_SIZE_AND_OFFSET(ipc_perm, mode); - #endif - -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -index de69852d3..652d5cb3b 100644 ---- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -204,26 +204,13 @@ namespace __sanitizer { - u64 __unused1; - u64 __unused2; - #elif defined(__sparc__) --#if defined(__arch64__) - unsigned mode; -- unsigned short __pad1; --#else -- unsigned short __pad1; -- unsigned short mode; - unsigned short __pad2; --#endif - unsigned short __seq; - unsigned long long __unused1; - unsigned long long __unused2; --#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) -- unsigned int mode; -- unsigned short __seq; -- unsigned short __pad1; -- unsigned long __unused1; -- unsigned long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch b/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch deleted file mode 100644 index 14ef38497645..000000000000 --- a/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/Sources/Basic/Process.swift b/Sources/Basic/Process.swift -index f388c769..8f208691 100644 ---- a/Sources/Basic/Process.swift -+++ b/Sources/Basic/Process.swift -@@ -322,7 +322,10 @@ public final class Process: ObjectIdentifierProtocol { - defer { posix_spawn_file_actions_destroy(&fileActions) } - - // Workaround for https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=89e435f3559c53084498e9baad22172b64429362 -- let devNull = strdup("/dev/null") -+ // Change allowing for newer version of glibc -+ guard let devNull = strdup("/dev/null") else { -+ throw SystemError.posix_spawn(0, arguments) -+ } - defer { free(devNull) } - // Open /dev/null as stdin. - posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0) -@@ -348,7 +351,7 @@ public final class Process: ObjectIdentifierProtocol { - - let argv = CStringArray(arguments) - let env = CStringArray(environment.map({ "\($0.0)=\($0.1)" })) -- let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray) -+ let rv = posix_spawnp(&processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray) - - guard rv == 0 else { - throw SystemError.posix_spawn(rv, arguments) diff --git a/nixpkgs/pkgs/development/compilers/swift/purity.patch b/nixpkgs/pkgs/development/compilers/swift/purity.patch deleted file mode 100644 index 4133e89c2830..000000000000 --- a/nixpkgs/pkgs/development/compilers/swift/purity.patch +++ /dev/null @@ -1,18 +0,0 @@ -"purity" patch for 5.0 - ---- a/lib/Driver/ToolChains/Gnu.cpp -+++ b/lib/Driver/ToolChains/Gnu.cpp -@@ -402,13 +402,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, - if (!Args.hasArg(options::OPT_static)) { - if (Args.hasArg(options::OPT_rdynamic)) - CmdArgs.push_back("-export-dynamic"); -- -- if (!Args.hasArg(options::OPT_shared)) { -- const std::string Loader = -- D.DyldPrefix + ToolChain.getDynamicLinker(Args); -- CmdArgs.push_back("-dynamic-linker"); -- CmdArgs.push_back(Args.MakeArgString(Loader)); -- } - } - - CmdArgs.push_back("-o"); diff --git a/nixpkgs/pkgs/development/compilers/terra/default.nix b/nixpkgs/pkgs/development/compilers/terra/default.nix index ac1851a683bf..9919973de241 100644 --- a/nixpkgs/pkgs/development/compilers/terra/default.nix +++ b/nixpkgs/pkgs/development/compilers/terra/default.nix @@ -50,7 +50,6 @@ in stdenv.mkDerivation rec { ] ++ lib.optional enableCUDA "-DTERRA_ENABLE_CUDA=ON"; doCheck = true; - enableParallelBuilding = true; hardeningDisable = [ "fortify" ]; outputs = [ "bin" "dev" "out" "static" ]; @@ -82,7 +81,7 @@ in stdenv.mkDerivation rec { meta = with lib; { description = "A low-level counterpart to Lua"; - homepage = "http://terralang.org/"; + homepage = "https://terralang.org/"; platforms = platforms.x86_64; maintainers = with maintainers; [ jb55 seylerius thoughtpolice ]; license = licenses.mit; diff --git a/nixpkgs/pkgs/development/compilers/vala/default.nix b/nixpkgs/pkgs/development/compilers/vala/default.nix index e3a005564d06..8f93a6746ea2 100644 --- a/nixpkgs/pkgs/development/compilers/vala/default.nix +++ b/nixpkgs/pkgs/development/compilers/vala/default.nix @@ -69,7 +69,7 @@ let # so that it can be used to regenerate documentation. patches = lib.optionals disableGraphviz [ graphvizPatch ./gvc-compat.patch ]; configureFlags = lib.optional disableGraphviz "--disable-graphviz"; - preBuild = lib.optional disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; + preBuild = lib.optionalString disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; outputs = [ "out" "devdoc" ]; @@ -100,7 +100,7 @@ let homepage = "https://wiki.gnome.org/Projects/Vala"; license = licenses.lgpl21Plus; platforms = platforms.unix; - maintainers = with maintainers; [ antono jtojnar peterhoeg maxeaubrey ]; + maintainers = with maintainers; [ antono jtojnar peterhoeg maxeaubrey ] ++ teams.pantheon.members; }; }); diff --git a/nixpkgs/pkgs/development/compilers/vlang/default.nix b/nixpkgs/pkgs/development/compilers/vlang/default.nix index 326fb9eff7d0..1535411149d6 100644 --- a/nixpkgs/pkgs/development/compilers/vlang/default.nix +++ b/nixpkgs/pkgs/development/compilers/vlang/default.nix @@ -1,6 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, upx ? null }: - -assert stdenv.hostPlatform.isUnix -> upx != null; +{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx }: stdenv.mkDerivation rec { pname = "vlang"; @@ -25,16 +23,15 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glfw freetype openssl ] ++ lib.optional stdenv.hostPlatform.isUnix upx; - buildPhase = '' - runHook preBuild - cc -std=gnu11 $CFLAGS -w -o v $vc/v.c -lm $LDFLAGS - # vlang seems to want to write to $HOME/.vmodules, - # so lets give it a writable HOME - HOME=$PWD ./v -prod self - # Exclude thirdparty/vschannel as it is windows-specific. - find thirdparty -path thirdparty/vschannel -prune -o -type f -name "*.c" -execdir cc -std=gnu11 $CFLAGS -w -c {} $LDFLAGS ';' - runHook postBuild - ''; + nativeBuildInputs = [ makeWrapper ]; + + makeFlags = [ + "local=1" + "VC=${vc}" + # vlang seems to want to write to $HOME/.vmodules , so lets give + # it a writable HOME + "HOME=$TMPDIR" + ]; installPhase = '' runHook preInstall @@ -43,6 +40,7 @@ stdenv.mkDerivation rec { cp -r {cmd,vlib,thirdparty} $out/lib mv v $out/lib ln -s $out/lib/v $out/bin/v + wrapProgram $out/bin/v --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]} runHook postInstall ''; diff --git a/nixpkgs/pkgs/development/compilers/vyper/default.nix b/nixpkgs/pkgs/development/compilers/vyper/default.nix index 74c2503523e8..431afe5ec205 100644 --- a/nixpkgs/pkgs/development/compilers/vyper/default.nix +++ b/nixpkgs/pkgs/development/compilers/vyper/default.nix @@ -14,20 +14,21 @@ in buildPythonPackage rec { pname = "vyper"; - version = "0.2.11"; + version = "0.2.16"; src = fetchPypi { inherit pname version; - sha256 = "e763561a161c35c03b92a0c176096dd9b4c78ab003c2f08324d443f459b3de84"; + sha256 = "6cf347440716964012d46686faefc9c689f01872f19736287a63aa8652ac3ddd"; }; nativeBuildInputs = [ pytest-runner ]; + # Replace the dynamic commit hash lookup with the hash from the tag postPatch = '' substituteInPlace setup.py \ --replace 'asttokens==' 'asttokens>=' \ --replace 'subprocess.check_output("git rev-parse HEAD".split())' "' '" \ - --replace 'commithash.decode("utf-8").strip()' "'069936fa3fee8646ff362145593128d7ef07da38'" + --replace 'commithash.decode("utf-8").strip()' "'6e7dba7a8b5f29762d3470da4f44634b819c808d'" ''; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/compilers/yosys/default.nix b/nixpkgs/pkgs/development/compilers/yosys/default.nix index a0c02e26db0c..7a733ce2cb9b 100644 --- a/nixpkgs/pkgs/development/compilers/yosys/default.nix +++ b/nixpkgs/pkgs/development/compilers/yosys/default.nix @@ -34,13 +34,13 @@ stdenv.mkDerivation rec { pname = "yosys"; - version = "0.9+4052"; + version = "0.9+4276"; src = fetchFromGitHub { owner = "YosysHQ"; repo = "yosys"; - rev = "687f381b6985d9dda7e11535628e2fafff267af5"; - sha256 = "15lcj798ckh9zwvdqb5gnvicilsxjyxv01gcviijg310hq62n7vf"; + rev = "75a4cdfc8afc10fed80e43fb1ba31c7edaf6e361"; + sha256 = "13xb7ny6i0kr6z6xkj9wmmcj551si7w05r3cghq8h8wkikyh6c8p"; }; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix index 58fef968e46d..6e436cd0043b 100644 --- a/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix +++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/bluespec.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation { pname = "yosys-bluespec"; - version = "2021.01.17"; + version = "2021.08.19"; src = fetchFromGitHub { owner = "thoughtpolice"; repo = "yosys-bluespec"; - rev = "3cfa22c2810b840f406610efe3d7657477c1b0ed"; - sha256 = "1r48128yisw5lpziaj3hq88acghwi94pvm4735xajx8dl79jkcng"; + rev = "bcea1635c97747acd3bcb5b8f1968b3f57ae62bc"; + sha256 = "0ipx9yjngs3haksdb440wlydviszwqnxgzynpp7yic2x3ai7i8m1"; }; buildInputs = [ yosys readline zlib bluespec ]; diff --git a/nixpkgs/pkgs/development/compilers/zulu/8.nix b/nixpkgs/pkgs/development/compilers/zulu/8.nix index 6fcdacf535b8..48573c672415 100644 --- a/nixpkgs/pkgs/development/compilers/zulu/8.nix +++ b/nixpkgs/pkgs/development/compilers/zulu/8.nix @@ -70,6 +70,9 @@ in stdenv.mkDerivation { mkdir -p $out cp -r ./* "$out/" + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + mkdir -p $out/nix-support printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs diff --git a/nixpkgs/pkgs/development/compilers/zulu/default.nix b/nixpkgs/pkgs/development/compilers/zulu/default.nix index 81edb8b469a8..dee1a4527607 100644 --- a/nixpkgs/pkgs/development/compilers/zulu/default.nix +++ b/nixpkgs/pkgs/development/compilers/zulu/default.nix @@ -22,11 +22,11 @@ }: let - version = "11.41.23"; - openjdk = "11.0.8"; + version = "11.50.19"; + openjdk = "11.0.12"; - sha256_linux = "f8aee4ab30ca11ab3c8f401477df0e455a9d6b06f2710b2d1b1ddcf06067bc79"; - sha256_darwin = "643c6648cc4374f39e830e4fcb3d68f8667893d487c07eb7091df65937025cc3"; + sha256_linux = "b8e8a63b79bc312aa90f3558edbea59e71495ef1a9c340e38900dd28a1c579f3"; + sha256_darwin = "9bc6874932f7f88d0a48220d3200449ddf7dc5c0e82af2df2738bc13d21b0e4e"; platform = if stdenv.isDarwin then "macosx" else "linux"; hash = if stdenv.isDarwin then sha256_darwin else sha256_linux; @@ -71,7 +71,10 @@ in stdenv.mkDerivation { installPhase = '' mkdir -p $out cp -r ./* "$out/" - + '' + lib.optionalString stdenv.isLinux '' + # jni.h expects jni_md.h to be in the header search path. + ln -s $out/include/linux/*_md.h $out/include/ + '' + '' mkdir -p $out/nix-support printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs |