diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers')
82 files changed, 896 insertions, 1529 deletions
diff --git a/nixpkgs/pkgs/development/compilers/bigloo/default.nix b/nixpkgs/pkgs/development/compilers/bigloo/default.nix index c4fa5712ea63..d61d34276a30 100644 --- a/nixpkgs/pkgs/development/compilers/bigloo/default.nix +++ b/nixpkgs/pkgs/development/compilers/bigloo/default.nix @@ -1,5 +1,5 @@ { fetchurl, lib, stdenv, autoconf, automake, libtool, gmp -, darwin +, darwin, libunistring }: stdenv.mkDerivation rec { @@ -13,9 +13,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake libtool ]; - buildInputs = lib.optional stdenv.isDarwin + buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices - ; + libunistring + ]; propagatedBuildInputs = [ gmp ]; diff --git a/nixpkgs/pkgs/development/compilers/crystal/build-package.nix b/nixpkgs/pkgs/development/compilers/crystal/build-package.nix index 67c8128f6b5d..2328e76ad770 100644 --- a/nixpkgs/pkgs/development/compilers/crystal/build-package.nix +++ b/nixpkgs/pkgs/development/compilers/crystal/build-package.nix @@ -10,7 +10,7 @@ , format ? "make" , installManPages ? true # Specify binaries to build in the form { foo.src = "src/foo.cr"; } - # The default `crystal build` options can be overridden with { foo.options = [ "--no-debug" ]; } + # The default `crystal build` options can be overridden with { foo.options = [ "--optionname" ]; } , crystalBinaries ? { } , ... }@args: @@ -32,8 +32,7 @@ let }) (import shardsFile)); - # we previously had --no-debug here but that is not recommended by upstream - defaultOptions = [ "--release" "--progress" "--verbose" ]; + defaultOptions = [ "--release" "--progress" "--verbose" "--no-debug" ]; buildDirectly = shardsFile == null || crystalBinaries != { }; @@ -120,7 +119,7 @@ stdenv.mkDerivation (mkDerivationArgs // { installCheckPhase = args.installCheckPhase or '' for f in $out/bin/*; do - $f --help + $f --help > /dev/null done ''; diff --git a/nixpkgs/pkgs/development/compilers/crystal/default.nix b/nixpkgs/pkgs/development/compilers/crystal/default.nix index 8fc4a15efced..29e826c88d66 100644 --- a/nixpkgs/pkgs/development/compilers/crystal/default.nix +++ b/nixpkgs/pkgs/development/compilers/crystal/default.nix @@ -56,6 +56,7 @@ let buildCommand = '' mkdir -p $out tar --strip-components=1 -C $out -xf ${src} + patchShebangs $out/bin/crystal ''; }; @@ -93,6 +94,10 @@ let outputs = [ "out" "lib" "bin" ]; postPatch = '' + export TMP=$(mktemp -d) + export HOME=$TMP + mkdir -p $HOME/test + # Add dependency of crystal to docs to avoid issue on flag changes between releases # https://github.com/crystal-lang/crystal/pull/8792#issuecomment-614004782 substituteInPlace Makefile \ @@ -103,39 +108,35 @@ let ln -sf spec/compiler spec/std - # Dirty fix for when no sandboxing is enabled - rm -rf /tmp/crystal - mkdir -p /tmp/crystal + mkdir -p $TMP/crystal substituteInPlace spec/std/file_spec.cr \ --replace '/bin/ls' '${coreutils}/bin/ls' \ - --replace '/usr/share' '/tmp/crystal' \ - --replace '/usr' '/tmp' + --replace '/usr/share' "$TMP/crystal" \ + --replace '/usr' "$TMP" \ + --replace '/tmp' "$TMP" substituteInPlace spec/std/process_spec.cr \ --replace '/bin/cat' '${coreutils}/bin/cat' \ --replace '/bin/ls' '${coreutils}/bin/ls' \ --replace '/usr/bin/env' '${coreutils}/bin/env' \ --replace '"env"' '"${coreutils}/bin/env"' \ - --replace '"/usr"' '"/tmp"' - - substituteInPlace spec/std/socket/tcp_server_spec.cr \ - --replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "' + --replace '/usr' "$TMP" \ + --replace '/tmp' "$TMP" substituteInPlace spec/std/system_spec.cr \ --replace '`hostname`' '`${hostname}/bin/hostname`' - # See https://github.com/crystal-lang/crystal/pull/8640 - substituteInPlace spec/std/http/cookie_spec.cr \ - --replace '01 Jan 2020' '01 Jan #{Time.utc.year + 2}' - # See https://github.com/crystal-lang/crystal/issues/8629 substituteInPlace spec/std/socket/udp_socket_spec.cr \ --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"' + ''; - # See https://github.com/crystal-lang/crystal/pull/8699 - substituteInPlace spec/std/xml/xml_spec.cr \ - --replace 'it "handles errors"' 'pending "handles errors"' + # Defaults are 4 + preBuild = '' + export CRYSTAL_WORKERS=$NIX_BUILD_CORES + export threads=$NIX_BUILD_CORES + export CRYSTAL_CACHE_DIR=$TMP ''; buildInputs = commonBuildInputs extraBuildInputs; @@ -197,9 +198,6 @@ let checkTarget = "compiler_spec"; preCheck = '' - export HOME=/tmp - mkdir -p $HOME/test - export LIBRARY_PATH=${lib.makeLibraryPath checkInputs}:$LIBRARY_PATH export PATH=${lib.makeBinPath checkInputs}:$PATH ''; @@ -214,69 +212,41 @@ let license = licenses.asl20; maintainers = with maintainers; [ david50407 fabianhjr manveru peterhoeg ]; platforms = builtins.attrNames archs; - # Error running at_exit handler: Nil assertion failed - broken = lib.versions.minor version == "32" && stdenv.isDarwin; + broken = lib.versionOlder version "0.36.1" && stdenv.isDarwin; }; }) ); in rec { - binaryCrystal_0_31 = genericBinary { - version = "0.31.1"; + binaryCrystal_1_0 = genericBinary { + version = "1.0.0"; sha256s = { - x86_64-linux = "0r8salf572xrnr4m6ll9q5hz6jj8q7ff1rljlhmqb1r26a8mi2ih"; - i686-linux = "0hridnis5vvrswflx0q67xfg5hryhz6ivlwrb9n4pryj5d1gwjrr"; - x86_64-darwin = "1dgxgv0s3swkc5cwawzgpbc6bcd2nx4hjxc7iw2h907y1vgmbipz"; + x86_64-linux = "1949argajiyqyq09824yj3wjyv88gd8wbf20xh895saqfykiq880"; + i686-linux = "0w0f4fwr2ijhx59i7ppicbh05hfmq7vffmgl7lal6im945m29vch"; + x86_64-darwin = "01n0rf8zh551vv8wq3h0ifnsai0fz9a77yq87xx81y9dscl9h099"; }; }; - crystal_0_31 = generic { - version = "0.31.1"; - sha256 = "1dswxa32w16gnc6yjym12xj7ibg0g6zk3ngvl76lwdjqb1h6lwz8"; - doCheck = false; # 5 checks are failing now - binary = binaryCrystal_0_31; - }; - - crystal_0_32 = generic { - version = "0.32.1"; - sha256 = "120ndi3nhh2r52hjvhwfb49cdggr1bzdq6b8xg7irzavhjinfza6"; - binary = crystal_0_31; - }; - - crystal_0_33 = generic { - version = "0.33.0"; - sha256 = "1zg0qixcws81s083wrh54hp83ng2pa8iyyafaha55mzrh8293jbi"; - binary = crystal_0_32; - }; - - crystal_0_34 = generic { - version = "0.34.0"; - sha256 = "110lfpxk9jnqyznbfnilys65ixj5sdmy8pvvnlhqhc3ccvrlnmq4"; - binary = crystal_0_33; - }; - - crystal_0_35 = generic { - version = "0.35.1"; - sha256 = "0p51bjl1nsvwsm64lqq421dcsxa201w7wwq8plw4r8wqarpq0g69"; - binary = crystal_0_34; - # Needs git to build as per https://github.com/crystal-lang/crystal/issues/9789 - extraBuildInputs = [ git ]; + crystal_1_0 = generic { + version = "1.0.0"; + sha256 = "sha256-RI+a3w6Rr+uc5jRf7xw0tOenR+q6qii/ewWfID6dbQ8="; + binary = binaryCrystal_1_0; }; - crystal_0_36 = generic { - version = "0.36.1"; - sha256 = "sha256-5rjrvwZKM4lHpmxLyUVbi0Zw98xT+iJKonxwfUwS/Wk="; - binary = crystal_0_35; + crystal_1_1 = generic { + version = "1.1.1"; + sha256 = "sha256-hhhT3reia8acZiPsflwfuD638Ll2JiXwMfES1TyGyNQ="; + binary = crystal_1_0; }; - crystal_1_0 = generic { - version = "1.0.0"; - sha256 = "sha256-RI+a3w6Rr+uc5jRf7xw0tOenR+q6qii/ewWfID6dbQ8="; - binary = crystal_0_36; + crystal_1_2 = generic { + version = "1.2.0"; + sha256 = "sha256-38mmsolzmCnv+MFUMc+AEiklDLBHIr/jqXMLzc0nVq4="; + binary = crystal_1_1; }; - crystal = crystal_1_0; + crystal = crystal_1_2; crystal2nix = callPackage ./crystal2nix.nix { }; } diff --git a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix index 56880826a19c..38c2fae60347 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -3,7 +3,7 @@ , sha512 }: -assert builtins.elem type [ "aspnetcore" "netcore" "sdk"]; +assert builtins.elem type [ "aspnetcore" "runtime" "sdk"]; { lib, stdenv , fetchurl , libunwind @@ -17,7 +17,7 @@ assert builtins.elem type [ "aspnetcore" "netcore" "sdk"]; let pname = if type == "aspnetcore" then "aspnetcore-runtime" - else if type == "netcore" then + else if type == "runtime" then "dotnet-runtime" else "dotnet-sdk"; @@ -30,12 +30,12 @@ let "Unsupported system: ${stdenv.hostPlatform.system}"); urls = { aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; - netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; + runtime = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; }; descriptions = { - aspnetcore = "ASP .NET Core runtime ${version}"; - netcore = ".NET Core runtime ${version}"; + aspnetcore = "ASP.NET Core Runtime ${version}"; + runtime = ".NET Runtime ${version}"; sdk = ".NET SDK ${version}"; }; in stdenv.mkDerivation rec { diff --git a/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix index a38d44e37efa..c99af4e62ae5 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix @@ -5,7 +5,7 @@ in assert lib.assertMsg ((builtins.length packages) != 0) ''You must include at least one package, e.g `with dotnetCorePackages; combinePackages [ - sdk_3_0 aspnetcore_2_1 + sdk_3_1 aspnetcore_5_0 ];`'' ; buildEnv { name = "dotnet-core-combined"; diff --git a/nixpkgs/pkgs/development/compilers/dotnet/default.nix b/nixpkgs/pkgs/development/compilers/dotnet/default.nix index 89d7f4c7d922..5b4740c22e51 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/default.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/default.nix @@ -1,6 +1,6 @@ /* How to combine packages for use in development: -dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_2 sdk_3_0 sdk aspnetcore_2_1 ]; +dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_5_0 aspnetcore_5_0 ]; Hashes below are retrived from: https://dotnet.microsoft.com/download/dotnet @@ -9,75 +9,19 @@ https://dotnet.microsoft.com/download/dotnet let buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {}; buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; }); - buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; }); - buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; }); + buildNetRuntime = attrs: buildDotnet (attrs // { type = "runtime"; }); + buildNetSdk = attrs: buildDotnet (attrs // { type = "sdk"; }); in rec { combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {}; - # v2.1.22 (LTS) + # EOL - aspnetcore_2_1 = buildAspNetCore { - version = "2.1.22"; - sha512 = { - x86_64-linux = "27v3a69dgnnb4lz5p2dn2qwadb8vpnqwdy6mnnqfp1dl4kgg3izvriz2268if272sy6flcz5lckjlmn0i0i1jci5zypc7x9kykj991l"; - aarch64-linux = null; # no aarch64 version of this package is available - x86_64-darwin = "0xh06jmzx2cfq51hv9l4h72hbfyh3r0wlla217821gi0hlw6xcc0gb3b4xmqcs240fllqnwrnrwz0axi3xi21wacgn3xbcmzpbi6jml"; - }; - }; - - netcore_2_1 = buildNetCore { - version = "2.1.22"; - sha512 = { - x86_64-linux = "0c2b31l59izcxbhz5wzjpjkdl550s5p3aid4vyghq468vyf67pm0npjny50c172b63vw0ikfbps2b2hj16hpifp116gj4b5llmqjhyc"; - aarch64-linux = "3llai3d2xpgbr7a4ndg9wqfpnb5zb8k07dicc57a6cmniiqyqigyxinhpx2k0l45mbnihjsr5k1rih3r6bwlj241v67iwd2i0dpqd8a"; - x86_64-darwin = "106mx6a4rwcvq41v54c1yx89156s43n889im9g0q2pvm7054q8b6xm6qrnymzmj5i2i6awyk0z02j5pfiyh35sw9afxb3695ymsb3v8"; - }; - }; - - sdk_2_1 = buildNetCoreSdk { - version = "2.1.810"; - sha512 = { - x86_64-linux = "388nrba5f7z9syq23xh3k45rzy3iys58s32ya7a0q9mwdf1y3haw7yvbq79cn08741hhqdi73mip8jf50f4s64mbr62ay1p76zsrkj5"; - aarch64-linux = "2vs8bhk63cjrqkm5n164ahc6bdz58aq9vmhaiyy27krp7wlkz4gpiva9153h7mywhk709l1qc7cddj99qsh2ygv6axjfigbhgrzslqi"; - x86_64-darwin = "3qxlgbd0np0w8wmp98mhp4cqgva4zglqf7k9kzqbwxfwr5s795kap7rs5w0cy7h0bsvj0ygx3d5nzyn9hp3fsswx4jl4mkvillnvjzy"; - }; - }; - - # v2.2 - - sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 3.1"; - - # v3.0.2 (Maintenance) - - aspnetcore_3_0 = buildAspNetCore { - version = "3.0.3"; - sha512 = { - x86_64-linux = "342v6kxxbxky09d1c392vvr9rm30lf75wccka1bk2h4advlcga5nlgv93g7vrq48bsyxfi5gc36r3b0dlwl1g409g5mlk1042n6d0yq"; - aarch64-linux = "2xkg4q88q5jw6jdz6cxj8vsjr475nd0fcvifkv1shdm2j9dsjy233hwpxbr140m5n5ggyh6z99238z9j4kp2az977y8y8irz8m8ppvf"; - x86_64-darwin = "2p04j6p4j93pan71ih13hv57zxalcirh0n3vfjq0cfb80pbhf1f5cgxl24pw6kifh6hhh38rj62c4mr69lxzlqc8sfcfaws8dyz2avm"; - }; - }; - - netcore_3_0 = buildNetCore { - version = "3.0.3"; - sha512 = { - x86_64-linux = "32ykpcw2xx708r2lxcwcbxnmy4sk159rlfjfvkw990qh7n79pm3lm2qwa3zhqcslznmpg18kwxz8qb5fgsa0h49g843xx4kyai0n7rx"; - aarch64-linux = "1lp8din7d5jv5fkyq1a7m01i1xg9jwpiljvam1kcyzsnwzvi0cb4ji336cfx4lqrn95gvc75gkzi6q8b4fz0h21gvk6z6kmlcr63nyg"; - x86_64-darwin = "0s20k7xawwd09xhy4xdcxp1rw6jd418ibrvhb509dnj480g48xryda2203g4mpswd24v2kx0n9qzxgbrbq9lvasfglkxi84bbqayp83"; - }; - }; - - sdk_3_0 = buildNetCoreSdk { - version = "3.0.103"; - sha512 = { - x86_64-linux = "2diiplgxs92fkb6ym68b02d79z4qn63x5qlky5lvr757c1zkh0vfpk3khawdg94kdn4qkn6dmyqr0msxqgmiqyhp63cadzqq4vx7b12"; - aarch64-linux = "32843q2lj7dgciq62g9v1q31vwfjyv5vaxrz712d942mcg5lyzjygwri106bv4naq3a22131ldzwnsifbdn2vq1iz60raqdb7ss9vnf"; - x86_64-darwin = "3apswk2bhalgi0hm7h2j9p152jvp39h4xilxxzix5j1n36b442l1pwk7lj7019lxafjqkz5y850xkfcp14ks5wcvs33xs2c0aqwxvcn"; - }; - }; + sdk_2_1 = throw "Dotnet SDK 2.1 is EOL, please use 3.1 (LTS) or 5.0 (Current)"; + sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 3.1 (LTS) or 5.0 (Current)"; + sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 3.1 (LTS) or 5.0 (Current)"; - # v3.1.1 (LTS) + # v3.1 (LTS) aspnetcore_3_1 = buildAspNetCore { version = "3.1.19"; @@ -88,7 +32,7 @@ rec { }; }; - netcore_3_1 = buildNetCore { + runtime_3_1 = buildNetRuntime { version = "3.1.19"; sha512 = { x86_64-linux = "2cf268cc13bb4739203a18a9160aac58f2088e8ec275b1f7ef2fe2b74bc16edfdfbeb886a74fc9421edbf2899fa9e3ee7ea2734a83b1800b4a9848fb7e10bbbe"; @@ -97,7 +41,7 @@ rec { }; }; - sdk_3_1 = buildNetCoreSdk { + sdk_3_1 = buildNetSdk { version = "3.1.413"; sha512 = { x86_64-linux = "2a0824f11aba0b79d3f9a36af0395649bc9b4137e61b240a48dccb671df0a5b8c2086054f8e495430b7ed6c344bb3f27ac3dfda5967d863718a6dadeca951a83"; @@ -106,7 +50,7 @@ rec { }; }; - # v5.0.0 + # v5.0 (Current) aspnetcore_5_0 = buildAspNetCore { version = "5.0.10"; @@ -117,7 +61,7 @@ rec { }; }; - net_5_0 = buildNetCore { + runtime_5_0 = buildNetRuntime { version = "5.0.10"; sha512 = { x86_64-linux = "421b00d5751381e6bf829dcba8fa0d781f0efd065be492739d60a4bef2b7b362dbec77fa3289e2ee45cab40616f95318fc214699ffe2f33aa15e77c2d163841c"; @@ -126,7 +70,7 @@ rec { }; }; - sdk_5_0 = buildNetCoreSdk { + sdk_5_0 = buildNetSdk { version = "5.0.401"; sha512 = { x86_64-linux = "a444d44007709ceb68d8f72dec0531e17f85f800efc0007ace4fa66ba27f095066930e6c6defcd2f85cdedea2fec25e163f5da461c1c2b8563e5cd7cb47091e0"; diff --git a/nixpkgs/pkgs/development/compilers/edk2/default.nix b/nixpkgs/pkgs/development/compilers/edk2/default.nix index 1a6685e91411..aaf59ca1ef57 100644 --- a/nixpkgs/pkgs/development/compilers/edk2/default.nix +++ b/nixpkgs/pkgs/development/compilers/edk2/default.nix @@ -36,13 +36,13 @@ buildType = if stdenv.isDarwin then edk2 = buildStdenv.mkDerivation { pname = "edk2"; - version = "202102"; + version = "202108"; # submodules src = fetchgit { url = "https://github.com/tianocore/edk2"; rev = "edk2-stable${edk2.version}"; - sha256 = "1292hfbqz4wyikdf6glqdy80n9zpy54gnfngqnyv05908hww6h82"; + sha256 = "1ps244f7y43afxxw6z95xscy24f9mpp8g0mfn90rd4229f193ba2"; }; buildInputs = [ libuuid pythonEnv ]; diff --git a/nixpkgs/pkgs/development/compilers/flutter/default.nix b/nixpkgs/pkgs/development/compilers/flutter/default.nix index f7dc6f8e87c3..940b379173fb 100644 --- a/nixpkgs/pkgs/development/compilers/flutter/default.nix +++ b/nixpkgs/pkgs/development/compilers/flutter/default.nix @@ -4,18 +4,32 @@ let getPatches = dir: let files = builtins.attrNames (builtins.readDir dir); in map (f: dir + ("/" + f)) files; - version = "2.2.1"; + version = "2.5.1"; channel = "stable"; filename = "flutter_linux_${version}-${channel}.tar.xz"; -in -{ + + # Decouples flutter derivation from dart derivation, + # use specific dart version to not need to bump dart derivation when bumping flutter. + dartVersion = "2.14.2"; + dartSourceBase = "https://storage.googleapis.com/dart-archive/channels"; + dartForFlutter = dart.override { + version = dartVersion; + sources = { + "${dartVersion}-x86_64-linux" = fetchurl { + url = "${dartSourceBase}/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip"; + sha256 = "1gr2dr683kz0a0k6rcn4jcbxf9fr2xlzi5fcgn1lzrrxvys2lddx"; + }; + }; + }; +in { mkFlutter = mkFlutter; stable = mkFlutter rec { - inherit dart version; + inherit version; + dart = dartForFlutter; pname = "flutter"; src = fetchurl { - url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; - sha256 = "009pwk2casz10gibgjpz08102wxmkq9iq3994b3c2q342g6526g0"; + url = "https://storage.googleapis.com/flutter_infra_release/releases/${channel}/linux/${filename}"; + sha256 = "12ycz7iasrc9p9c6zr95l6llyji3za43gsx8cmr2kjfiv23bcrv2"; }; patches = getPatches ./patches; }; diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix index 5cab3b929f75..e0ede49b0919 100644 --- a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix +++ b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix @@ -8,12 +8,10 @@ { bash , buildFHSUserEnv , cacert -, coreutils , git , runCommand , stdenv , lib -, fetchurl , alsa-lib , dbus , expat @@ -33,6 +31,7 @@ , nspr , nss , systemd +, which }: let drvName = "flutter-${version}"; @@ -74,10 +73,27 @@ let ''; installPhase = '' + runHook preInstall + mkdir -p $out cp -r . $out mkdir -p $out/bin/cache/ ln -sf ${dart} $out/bin/cache/dart-sdk + + runHook postInstall + ''; + + doInstallCheck = true; + installCheckInputs = [ which ]; + installCheckPhase = '' + runHook preInstallCheck + + export HOME="$(mktemp -d)" + $out/bin/flutter config --android-studio-dir $HOME + $out/bin/flutter config --android-sdk $HOME + $out/bin/flutter --version | fgrep -q '${version}' + + runHook postInstallCheck ''; }; diff --git a/nixpkgs/pkgs/development/compilers/fstar/default.nix b/nixpkgs/pkgs/development/compilers/fstar/default.nix index dac50fc781bb..a8a7e2076c1c 100644 --- a/nixpkgs/pkgs/development/compilers/fstar/default.nix +++ b/nixpkgs/pkgs/development/compilers/fstar/default.nix @@ -17,19 +17,20 @@ in stdenv.mkDerivation rec { pname = "fstar"; - version = "2021.09.11"; + version = "2021.09.30"; src = fetchFromGitHub { owner = "FStarLang"; repo = "FStar"; rev = "v${version}"; - sha256 = "1aqk6fx77zcb7mcm78dk4l4zzd323qiv7yc7hvc38494yf6gk8a0"; + sha256 = "gqy9iaLZlTyv9ufHrUG87ta2xyc1OaZ/KRGhAzB+wsQ="; }; nativeBuildInputs = [ makeWrapper installShellFiles ]; buildInputs = [ z3 + sedlex-2_3 ] ++ (with ocamlPackages; [ ocaml findlib @@ -42,7 +43,6 @@ stdenv.mkDerivation rec { menhir menhirLib pprint - sedlex-2_3 ppxlib ppx_deriving ppx_deriving_yojson @@ -53,6 +53,8 @@ stdenv.mkDerivation rec { buildFlags = [ "libs" ]; + enableParallelBuilding = true; + postPatch = '' patchShebangs ulib/gen_mllib.sh substituteInPlace src/ocaml-output/Makefile --replace '$(COMMIT)' 'v${version}' @@ -74,6 +76,6 @@ stdenv.mkDerivation rec { license = licenses.asl20; changelog = "https://github.com/FStarLang/FStar/raw/v${version}/CHANGES.md"; platforms = with platforms; darwin ++ linux; - maintainers = with maintainers; [ gebner ]; + maintainers = with maintainers; [ gebner pnmadelaine ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix index a1598d3d3f07..f9dd0465b925 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix @@ -73,7 +73,9 @@ let majorVersion = "10"; ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch + + ++ [ ../libsanitizer-no-cyclades.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; diff --git a/nixpkgs/pkgs/development/compilers/gcc/11/default.nix b/nixpkgs/pkgs/development/compilers/gcc/11/default.nix index 7b7f542de0cf..850b267441fd 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/11/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/11/default.nix @@ -78,7 +78,9 @@ let majorVersion = "11"; }) # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch + + ++ [ ../libsanitizer-no-cyclades.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix b/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix index 98332290a078..c192c603c883 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix @@ -86,6 +86,13 @@ let majorVersion = "4"; ../struct-ucontext-4.8.patch ../sigsegv-not-declared.patch ../res_state-not-declared.patch + # gcc-11 compatibility + (fetchpatch { + name = "gcc4-char-reload.patch"; + url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58"; + includes = [ "gcc/reload.h" ]; + sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM="; + }) ]; javaEcj = fetchurl { @@ -307,7 +314,7 @@ stdenv.mkDerivation ({ compiler used in the GNU system including the GNU/Linux variant. ''; - maintainers = with lib.maintainers; [ peti veprbl ]; + maintainers = with lib.maintainers; [ veprbl ]; platforms = lib.platforms.unix; badPlatforms = [ "x86_64-darwin" ]; diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix index a15cb770fdfa..70278c237d4c 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix @@ -98,7 +98,18 @@ let majorVersion = "4"; { commit = "98c7bf9ddc80db965d69d61521b1c7a1cec32d9a"; sha256 = "1d7pfdv1q23nf0wadw7jbp6d6r7pnzjpbyxgbdfv7j1vr9l1bp60"; } { commit = "3dc76b53ad896494ca62550a7a752fecbca3f7a2"; sha256 = "0jvdzfpvfdmklfcjwqblwq1i22iqis7ljpvm7adra5d7zf2xk7xz"; } { commit = "1e961ed49b18e176c7457f53df2433421387c23b"; sha256 = "04dnqqs4qsvz4g8cq6db5id41kzys7hzhcaycwmc9rpqygs2ajwz"; } - { commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }]; + { commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }] + + ++ [ + ../libsanitizer-no-cyclades-9.patch + # gcc-11 compatibility + (fetchpatch { + name = "gcc4-char-reload.patch"; + url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58"; + includes = [ "gcc/reload.h" ]; + sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM="; + }) + ]; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -319,7 +330,7 @@ stdenv.mkDerivation ({ compiler used in the GNU system including the GNU/Linux variant. ''; - maintainers = with lib.maintainers; [ peti veprbl ]; + maintainers = with lib.maintainers; [ veprbl ]; platforms = lib.platforms.unix; badPlatforms = [ "x86_64-darwin" ]; diff --git a/nixpkgs/pkgs/development/compilers/gcc/6/default.nix b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix index df4a632db05d..1809d7ae42ef 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/6/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix @@ -87,7 +87,9 @@ let majorVersion = "6"; ++ optional (targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch { url = "https://git.alpinelinux.org/aports/plain/main/gcc/gcc-6.1-musl-libssp.patch?id=5e4b96e23871ee28ef593b439f8c07ca7c7eb5bb"; sha256 = "1jf1ciz4gr49lwyh8knfhw6l5gvfkwzjy90m7qiwkcbsf4a3fqn2"; - }); + }) + + ++ [ ../libsanitizer-no-cyclades-9.patch ]; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -342,8 +344,6 @@ stdenv.mkDerivation ({ compiler used in the GNU system including the GNU/Linux variant. ''; - maintainers = with lib.maintainers; [ peti ]; - platforms = lib.platforms.unix; }; } diff --git a/nixpkgs/pkgs/development/compilers/gcc/7/default.nix b/nixpkgs/pkgs/development/compilers/gcc/7/default.nix index 44e8b38fdf80..dcb7d0b91f6f 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/7/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/7/default.nix @@ -84,7 +84,9 @@ let majorVersion = "7"; ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch + + ++ [ ../libsanitizer-no-cyclades-9.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; diff --git a/nixpkgs/pkgs/development/compilers/gcc/8/default.nix b/nixpkgs/pkgs/development/compilers/gcc/8/default.nix index b264d37418e8..a6fd34c60cc3 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/8/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/8/default.nix @@ -71,7 +71,9 @@ let majorVersion = "8"; ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch + + ++ [ ../libsanitizer-no-cyclades-9.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; diff --git a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix index 43b2e0b5ef51..604d90fa7828 100644 --- a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix +++ b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix @@ -87,7 +87,9 @@ let majorVersion = "9"; ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch # Obtain latest patch with ../update-mcfgthread-patches.sh - ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; + ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch + + ++ [ ../libsanitizer-no-cyclades-9.patch ]; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; diff --git a/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades-9.patch b/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades-9.patch new file mode 100644 index 000000000000..072403d1495f --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades-9.patch @@ -0,0 +1,82 @@ +https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2b40941d23b1570cdd90083b58fa0f66aa58c86e +https://gcc.gnu.org/PR100379 +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -365,15 +365,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include <sys/procfs.h> + #endif + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ax25_parms_struct_sz; +- extern unsigned struct_cyclades_monitor_sz; + extern unsigned struct_input_keymap_entry_sz; + extern unsigned struct_ipx_config_data_sz; + extern unsigned struct_kbdiacrs_sz; +@@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t { + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- extern unsigned IOCTL_CYGETDEFTHRESH; +- extern unsigned IOCTL_CYGETDEFTIMEOUT; +- extern unsigned IOCTL_CYGETMON; +- extern unsigned IOCTL_CYGETTHRESH; +- extern unsigned IOCTL_CYGETTIMEOUT; +- extern unsigned IOCTL_CYSETDEFTHRESH; +- extern unsigned IOCTL_CYSETDEFTIMEOUT; +- extern unsigned IOCTL_CYSETTHRESH; +- extern unsigned IOCTL_CYSETTIMEOUT; + extern unsigned IOCTL_EQL_EMANCIPATE; + extern unsigned IOCTL_EQL_ENSLAVE; + extern unsigned IOCTL_EQL_GETMASTRCFG; +-- +2.27.0 diff --git a/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades.patch b/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades.patch new file mode 100644 index 000000000000..e2155cd0c982 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/gcc/libsanitizer-no-cyclades.patch @@ -0,0 +1,83 @@ +https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2bf34b9f4e446bf9be7f04458058dd5319fb396e +https://gcc.gnu.org/PR100379 +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -366,15 +366,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -130,7 +130,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include <sys/procfs.h> + #endif + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -443,7 +442,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -809,15 +807,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -974,7 +974,6 @@ extern unsigned struct_vt_mode_sz; + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ax25_parms_struct_sz; +-extern unsigned struct_cyclades_monitor_sz; + extern unsigned struct_input_keymap_entry_sz; + extern unsigned struct_ipx_config_data_sz; + extern unsigned struct_kbdiacrs_sz; +@@ -1319,15 +1318,6 @@ extern unsigned IOCTL_VT_WAITACTIVE; + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +-extern unsigned IOCTL_CYGETDEFTHRESH; +-extern unsigned IOCTL_CYGETDEFTIMEOUT; +-extern unsigned IOCTL_CYGETMON; +-extern unsigned IOCTL_CYGETTHRESH; +-extern unsigned IOCTL_CYGETTIMEOUT; +-extern unsigned IOCTL_CYSETDEFTHRESH; +-extern unsigned IOCTL_CYSETDEFTIMEOUT; +-extern unsigned IOCTL_CYSETTHRESH; +-extern unsigned IOCTL_CYSETTIMEOUT; + extern unsigned IOCTL_EQL_EMANCIPATE; + extern unsigned IOCTL_EQL_ENSLAVE; + extern unsigned IOCTL_EQL_GETMASTRCFG; +-- +2.33.0 + 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 c21096b5920e..bf909016ac22 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -40,12 +40,14 @@ let # nixpkgs uses for the respective system. defaultLibc = { i686-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; sha256 = "0bvwisl4w0z5z8z0da10m9sv0mhm9na2qm43qxr8zl23mn32mblx"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } # 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). @@ -53,43 +55,51 @@ let ]; }; x86_64-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; sha256 = "0chnzy9j23b2wa8clx5arwz8wnjfxyjmz9qkj548z14cqf13slcl"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } ]; }; armv7l-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; sha256 = "1j41cq5d3rmlgz7hzw8f908fs79gc5mn3q5wz277lk8zdf19g75v"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } ]; }; aarch64-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; sha256 = "14smwl3741ixnbgi0l51a7kh7xjkiannfqx15b72svky0y4l3wjw"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } { nixPackage = numactl; fileToCheckFor = null; } ]; }; x86_64-darwin = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; sha256 = "1hngyq14l4f950hzhh2d204ca2gfc98pc9xdasxihzqd1jq75dzd"; }; exePathForLibraryCheck = null; # we don't have a library check for darwin yet archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = null; } { nixPackage = libiconv; fileToCheckFor = null; } ]; @@ -98,12 +108,14 @@ let # Binary distributions for the musl libc for the respective system. musl = { x86_64-linux = { + variantSuffix = "-musl"; src = { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz"; sha256 = "0xpcbyaxqyhbl6f0i3s4rp2jm67nqpkfh2qlbj3i2fiaix89ml0l"; }; exePathForLibraryCheck = "bin/ghc"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*` # instead of `libtinfo.so.*.` { nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; } @@ -121,11 +133,8 @@ let libPath = lib.makeLibraryPath ( - [ - gmp - ] # Add arch-specific libraries. - ++ map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries + map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries ); libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" @@ -135,11 +144,16 @@ in stdenv.mkDerivation rec { inherit version; - - name = "ghc-${version}-binary"; + pname = "ghc-binary${binDistUsed.variantSuffix}"; src = fetchurl binDistUsed.src; + # Note that for GHC 8.10 versions <= 8.10.5, the GHC HQ musl bindist + # has a `gmp` dependency: + # https://gitlab.haskell.org/ghc/ghc/-/commit/8306501020cd66f683ad9c215fa8e16c2d62357d + # Related nixpkgs issues: + # * https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922452843 + nativeBuildInputs = [ perl ]; propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ] @@ -147,6 +161,9 @@ stdenv.mkDerivation rec { # 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. + # Concrete cases are listed in: + # https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922459988 + # # 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 @@ -154,6 +171,12 @@ stdenv.mkDerivation rec { # (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.) + # + # For GHC >= 8.10.6, `gmp` was switched out for `integer-simple` + # (https://gitlab.haskell.org/ghc/ghc/-/commit/8306501020cd66f683ad9c215fa8e16c2d62357d), + # fixing the above-mentioned release issue, + # and for GHC >= 9.* it is not clear as of writing whether that switch + # will be made there too. ++ lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this # Set LD_LIBRARY_PATH or equivalent so that the programs running as part diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix index ad106f2f2a54..58be16dc5693 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -41,12 +41,14 @@ let # nixpkgs uses for the respective system. defaultLibc = { i686-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; sha256 = "fbfc1ef194f4e7a4c0da8c11cc69b17458a4b928b609b3622c97acc4acd5c5ab"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } # 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). @@ -54,54 +56,64 @@ let ]; }; x86_64-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; sha256 = "a13719bca87a0d3ac0c7d4157a4e60887009a7f1a8dbe95c4759ec413e086d30"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } ]; }; armv7l-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; sha256 = "3949c31bdf7d3b4afb765ea8246bca4ca9707c5d988d9961a244f0da100956a2"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } ]; }; aarch64-linux = { + variantSuffix = ""; src = { url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; sha256 = "fad2417f9b295233bf8ade79c0e6140896359e87be46cb61cd1d35863d9d0e55"; }; exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } { nixPackage = numactl; fileToCheckFor = null; } ]; }; x86_64-darwin = { + variantSuffix = ""; 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 = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = null; } { nixPackage = libiconv; fileToCheckFor = null; } ]; }; aarch64-darwin = { + variantSuffix = ""; 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 = gmp; fileToCheckFor = null; } { nixPackage = ncurses6; fileToCheckFor = null; } { nixPackage = libiconv; fileToCheckFor = null; } ]; @@ -110,12 +122,15 @@ let # Binary distributions for the musl libc for the respective system. musl = { x86_64-linux = { + variantSuffix = "-musl-integer-simple"; src = { url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz"; sha256 = "16903df850ef73d5246f2ff169cbf57ecab76c2ac5acfa9928934282cfad575c"; }; exePathForLibraryCheck = "bin/ghc"; archSpecificLibraries = [ + # No `gmp` here, since this is an `integer-simple` bindist. + # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*` # instead of `libtinfo.so.*.` { nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; } @@ -133,11 +148,8 @@ let libPath = lib.makeLibraryPath ( - [ - gmp - ] # Add arch-specific libraries. - ++ map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries + map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries ); libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" @@ -147,26 +159,25 @@ in stdenv.mkDerivation rec { inherit version; - - name = "ghc-${version}-binary"; + pname = "ghc-binary${binDistUsed.variantSuffix}"; src = fetchurl binDistUsed.src; + # Note that for GHC 8.10 versions >= 8.10.6, the GHC HQ musl bindist + # uses `integer-simple` and has no `gmp` dependency: + # https://gitlab.haskell.org/ghc/ghc/-/commit/8306501020cd66f683ad9c215fa8e16c2d62357d + # Related nixpkgs issues: + # * https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922452843 + # TODO: When this file is copied to `ghc-9.*-binary.nix`, determine whether + # the GHC 9 branch also switched from `gmp` to `integer-simple` via the + # currently-open issue: + # https://gitlab.haskell.org/ghc/ghc/-/issues/20059 + # and update this comment accordingly. + 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. @@ -227,9 +238,9 @@ stdenv.mkDerivation rec { 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; + # Note that musl bindists do not contain them, # see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231 + # However, musl bindists >= 8.10.6 use `integer-simple`, not `gmp`. '' find . -name integer-gmp.buildinfo \ -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix index 411146569ab0..7e59bd974a25 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix @@ -141,10 +141,16 @@ let targetPackages.stdenv.cc.bintools.bintools ]; + # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. + variantSuffix = lib.concatStrings [ + (lib.optionalString stdenv.hostPlatform.isMusl "-musl") + (lib.optionalString enableIntegerSimple "-integer-simple") + ]; + in stdenv.mkDerivation (rec { version = "8.10.7"; - name = "${targetPrefix}ghc-${version}"; + pname = "${targetPrefix}ghc${variantSuffix}"; src = fetchurl { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; @@ -341,10 +347,6 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; 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 d30275dee124..b1126fda7d26 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -34,8 +34,7 @@ in stdenv.mkDerivation rec { version = "8.6.5"; - - name = "ghc-${version}-binary"; + pname = "ghc-binary"; # https://downloads.haskell.org/~ghc/8.6.5/ src = fetchurl ({ diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix b/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix index e2a65a19791b..1d31ffba4111 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix @@ -149,10 +149,16 @@ let targetPackages.stdenv.cc.bintools.bintools ]; + # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. + variantSuffix = lib.concatStrings [ + (lib.optionalString stdenv.hostPlatform.isMusl "-musl") + (lib.optionalString enableIntegerSimple "-integer-simple") + ]; + in stdenv.mkDerivation (rec { version = "8.8.4"; - name = "${targetPrefix}ghc-${version}"; + pname = "${targetPrefix}ghc${variantSuffix}"; src = fetchurl { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; @@ -340,10 +346,11 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; 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; + # integer-simple builds are broken with musl when bootstrapping using + # GHC 8.10.2 and below, however it is not possible to reverse bootstrap + # GHC 8.8.4 with GHC 8.10.7. + # See https://github.com/NixOS/nixpkgs/pull/138523#issuecomment-927339953 + broken = hostPlatform.isMusl && enableIntegerSimple; }; 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 af740c01f5bf..a673276239a2 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix @@ -135,10 +135,16 @@ let targetPackages.stdenv.cc.bintools.bintools ]; + # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. + variantSuffix = lib.concatStrings [ + (lib.optionalString stdenv.hostPlatform.isMusl "-musl") + (lib.optionalString enableIntegerSimple "-integer-simple") + ]; + in stdenv.mkDerivation (rec { version = "9.0.1"; - name = "${targetPrefix}ghc-${version}"; + pname = "${targetPrefix}ghc${variantSuffix}"; src = fetchurl { url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; @@ -303,10 +309,6 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; 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 index b565870addb2..703ba0a705c2 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/9.2.1.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/9.2.1.nix @@ -2,7 +2,7 @@ # build-tools , bootPkgs -, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx, xattr +, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, xattr , bash , libiconv ? null, ncurses @@ -134,16 +134,32 @@ let targetPackages.stdenv.cc.bintools.bintools ]; + # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. + variantSuffix = lib.concatStrings [ + (lib.optionalString stdenv.hostPlatform.isMusl "-musl") + (lib.optionalString enableIntegerSimple "-integer-simple") + ]; + in stdenv.mkDerivation (rec { version = "9.2.0.20210821"; - name = "${targetPrefix}ghc-${version}"; + pname = "${targetPrefix}ghc${variantSuffix}"; src = fetchurl { url = "https://downloads.haskell.org/ghc/9.2.1-rc1/ghc-${version}-src.tar.xz"; sha256 = "1q2pppxv2avhykyxvyq72r5p97rkkiqp19b77yhp85ralbcp4ivw"; }; + patches = [ + # picked from release branch, remove with the next release candidate, + # see https://gitlab.haskell.org/ghc/ghc/-/issues/19950#note_373726 + (fetchpatch { + name = "fix-darwin-link-failure.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/77456387025ca74299ecc70621cbdb62b1b6ffc9.patch"; + sha256 = "1g8smrn7hj8cbp9fhrylvmrb15s0xd8lhdgxqnx0asnd4az82gj8"; + }) + ]; + enableParallelBuilding = true; outputs = [ "out" "doc" ]; @@ -306,14 +322,6 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; 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; - hydraPlatforms = lib.remove "x86_64-darwin" ghc.meta.platforms; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/nixpkgs/pkgs/development/compilers/ghc/head.nix b/nixpkgs/pkgs/development/compilers/ghc/head.nix index cb2cd79a482c..9cca803ab279 100644 --- a/nixpkgs/pkgs/development/compilers/ghc/head.nix +++ b/nixpkgs/pkgs/development/compilers/ghc/head.nix @@ -145,11 +145,17 @@ let targetPackages.stdenv.cc.bintools.bintools ]; + # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. + variantSuffix = lib.concatStrings [ + (lib.optionalString stdenv.hostPlatform.isMusl "-musl") + (lib.optionalString enableNativeBignum "-native-bignum") + ]; + in stdenv.mkDerivation (rec { inherit version; inherit (src) rev; - name = "${targetPrefix}ghc-${version}"; + pname = "${targetPrefix}ghc${variantSuffix}"; src = fetchgit { url = "https://gitlab.haskell.org/ghc/ghc.git/"; diff --git a/nixpkgs/pkgs/development/compilers/go/1.16.nix b/nixpkgs/pkgs/development/compilers/go/1.16.nix index f8cdf7198eef..acd04c24a3be 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.8"; + version = "1.16.9"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-jyqMJLeTN1syQ9+C/bDIOHSG3MioksocmRqpms4Ia5g="; + sha256 = "sha256-ChzH/XvSBEj3Hr7WTYRhOIUNUJmxjPXMEKT8RRYNjD0="; }; # perl is used for testing go vet diff --git a/nixpkgs/pkgs/development/compilers/go/1.17.nix b/nixpkgs/pkgs/development/compilers/go/1.17.nix index 84bb70a4cf35..2f62c450c2e0 100644 --- a/nixpkgs/pkgs/development/compilers/go/1.17.nix +++ b/nixpkgs/pkgs/development/compilers/go/1.17.nix @@ -50,11 +50,11 @@ in stdenv.mkDerivation rec { pname = "go"; - version = "1.17.1"; + version = "1.17.2"; src = fetchurl { url = "https://dl.google.com/go/go${version}.src.tar.gz"; - sha256 = "sha256-SdwIM5dwrNVhMxLbjBQer2F3mZVXe4nZO1Qe+DBn5bE="; + sha256 = "sha256-IlXrPk6CTdfV/Nwuf4RTQ3HBhjEuVG+xCGo0wXdS9DE="; }; # perl is used for testing go vet diff --git a/nixpkgs/pkgs/development/compilers/gprolog/default.nix b/nixpkgs/pkgs/development/compilers/gprolog/default.nix index 16a7552dd4e3..6868ca9f8d8f 100644 --- a/nixpkgs/pkgs/development/compilers/gprolog/default.nix +++ b/nixpkgs/pkgs/development/compilers/gprolog/default.nix @@ -63,7 +63,6 @@ stdenv.mkDerivation rec { declarativity of logic programming. ''; - maintainers = [ lib.maintainers.peti ]; platforms = lib.platforms.unix; }; } diff --git a/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch deleted file mode 100644 index 0477c6c556f1..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch +++ /dev/null @@ -1,291 +0,0 @@ -diff --git a/mx.py b/mx.py -index a0b9315..b7d67a0 100755 ---- a/mx.py -+++ b/mx.py -@@ -238,21 +238,7 @@ def _check_file_with_sha1(path, sha1, sha1path, mustExist=True, newFile=False, l - f.write(value or sha1OfFile(path)) - - if exists(path): -- if sha1Check and sha1: -- if not _sha1CachedValid() or (newFile and sha1 != _sha1Cached()): -- logv('Create/update SHA1 cache file ' + sha1path) -- _writeSha1Cached() -- -- if sha1 != _sha1Cached(): -- computedSha1 = sha1OfFile(path) -- if sha1 == computedSha1: -- warn('Fixing corrupt SHA1 cache file ' + sha1path) -- _writeSha1Cached(computedSha1) -- return True -- if logErrors: -- size = os.path.getsize(path) -- log_error('SHA1 of {} [size: {}] ({}) does not match expected value ({})'.format(TimeStampFile(path), size, computedSha1, sha1)) -- return False -+ return True - elif mustExist: - if logErrors: - log_error("'{}' does not exist".format(path)) -@@ -1057,46 +1043,8 @@ class SuiteImport: - version = import_dict.get("version") - suite_dir = None - version_from = import_dict.get("versionFrom") -- if version_from and version: -- abort("In import for '{}': 'version' and 'versionFrom' can not be both set".format(name), context=context) -- if version is None and version_from is None: -- if not (in_subdir and (importer.vc_dir != importer.dir or isinstance(importer, BinarySuite))): -- abort("In import for '{}': No version given and not a 'subdir' suite of the same repository".format(name), context=context) -- if importer.isSourceSuite(): -- suite_dir = join(importer.vc_dir, name) -- version = importer.version() -- if urls is None: -- if not in_subdir: -- if import_dict.get("subdir") is None and importer.vc_dir != importer.dir: -- warn("In import for '{}': No urls given but 'subdir' is not set, assuming 'subdir=True'".format(name), context) -- in_subdir = True -- else: -- abort("In import for '{}': No urls given and not a 'subdir' suite".format(name), context=context) -- return SuiteImport(name, version, None, None, dynamicImport=dynamicImport, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir) -- # urls a list of alternatives defined as dicts -- if not isinstance(urls, list): -- abort('suite import urls must be a list', context=context) -- urlinfos = [] -- mainKind = None -- for urlinfo in urls: -- if isinstance(urlinfo, dict) and urlinfo.get('url') and urlinfo.get('kind'): -- kind = urlinfo.get('kind') -- if not VC.is_valid_kind(kind): -- abort('suite import kind ' + kind + ' illegal', context=context) -- else: -- abort('suite import url must be a dict with {"url", kind", attributes', context=context) -- vc = vc_system(kind) -- if kind != 'binary': -- assert not mainKind or mainKind == kind, "Only expecting one non-binary kind" -- mainKind = kind -- url = mx_urlrewrites.rewriteurl(urlinfo.get('url')) -- urlinfos.append(SuiteImportURLInfo(url, kind, vc)) -- vc_kind = None -- if mainKind: -- vc_kind = mainKind -- elif urlinfos: -- vc_kind = 'binary' -- return SuiteImport(name, version, urlinfos, vc_kind, dynamicImport=dynamicImport, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir) -+ suite_dir = join(get_env('MX_GIT_CACHE_DIR'), name) -+ return SuiteImport(name, version, [], None, True, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir) - - @staticmethod - def get_source_urls(source, kind=None): -@@ -1467,8 +1415,6 @@ class Suite(object): - :type dists: list[Distribution] - """ - def __init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=False): -- if primary is True and vc_dir is None: -- abort("The primary suite must be in a vcs repository") - self.imported_by = [] if primary else [importing_suite] - self.mxDir = mxDir - self.dir = dirname(mxDir) -@@ -1496,7 +1442,7 @@ class Suite(object): - self._outputRoot = None - self._preloaded_suite_dict = None - self.vc = vc -- self.vc_dir = vc_dir -+ self.vc_dir = get_env('MX_GIT_CACHE_DIR') - self._preload_suite_dict() - self._init_imports() - if load: -@@ -2405,7 +2351,9 @@ class Repository(SuiteConstituent): - class SourceSuite(Suite): - """A source suite""" - def __init__(self, mxDir, primary=False, load=True, internal=False, importing_suite=None, dynamicallyImported=False): -- vc, vc_dir = VC.get_vc_root(dirname(mxDir), abortOnError=False) -+ vc, vc_dir_test = VC.get_vc_root(dirname(mxDir), abortOnError=False) -+ vc_dir = get_env('MX_GIT_CACHE_DIR') -+ warn("LOOKING FOR: " + mxDir) - Suite.__init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=dynamicallyImported) - logvv("SourceSuite.__init__({}), got vc={}, vc_dir={}".format(mxDir, self.vc, self.vc_dir)) - self.projects = [] -@@ -2454,17 +2402,7 @@ class SourceSuite(Suite): - """ - Gets the release tag from VC or create a time based once if VC is unavailable - """ -- if snapshotSuffix not in self._releaseVersion: -- _version = self._get_early_suite_dict_property('version') -- if _version and self.getMxCompatibility().addVersionSuffixToExplicitVersion(): -- if not self.is_release(): -- _version = _version + '-' + snapshotSuffix -- if not _version: -- _version = self.vc.release_version_from_tags(self.vc_dir, self.name, snapshotSuffix=snapshotSuffix) -- if not _version: -- _version = 'unknown-{0}-{1}'.format(platform.node(), time.strftime('%Y-%m-%d_%H-%M-%S_%Z')) -- self._releaseVersion[snapshotSuffix] = _version -- return self._releaseVersion[snapshotSuffix] -+ return get_env('version') - - def scm_metadata(self, abortOnError=False): - scm = self.scm -@@ -2993,12 +2931,35 @@ def _find_suite_import(importing_suite, suite_import, fatalIfMissing=True, load= - Attempts to locate an existing suite in the local context - Returns the path to the mx.name dir if found else None - """ -- if mode == 'binary': -- # binary suites are always stored relative to the importing suite in mx-private directory -- return importing_suite._find_binary_suite_dir(suite_import.name) -+ warn("FAKE CLONE: " + str(suite_import)) -+ if (suite_import.name == "truffle"): -+ return join(get_env('TMP'), "source", "truffle", "mx.truffle") -+ if (suite_import.name == "graal-nodejs"): -+ return join(get_env('MX_GIT_CACHE_DIR'), "graaljs", "graal-nodejs", "mx.graal-nodejs") -+ if (suite_import.name == "truffleruby"): -+ return join(get_env('MX_GIT_CACHE_DIR'), "truffleruby", "mx.truffleruby") -+ if (suite_import.name == "graalpython"): -+ return join(get_env('MX_GIT_CACHE_DIR'), "graalpython", "mx.graalpython") -+ if (suite_import.name == "vm"): -+ return join(get_env('TMP'), "source", "vm", "mx.vm") -+ if (suite_import.name == "fastr"): -+ return join(get_env('MX_GIT_CACHE_DIR'), "fastr", "mx.fastr") -+ if (suite_import.name == "sdk"): -+ return join(get_env('TMP'), "source", "sdk", "mx.sdk") -+ if (suite_import.name == "graal-js"): -+ return join(get_env('MX_GIT_CACHE_DIR'), "graaljs", "graal-js", "mx.graal-js") -+ if (suite_import.name == "regex"): -+ return join(get_env('TMP'), "source", "regex", "mx.regex") -+ if (suite_import.name == "substratevm"): -+ return join(get_env('TMP'), "source", "substratevm", "mx.substratevm") -+ if (suite_import.name == "tools"): -+ return join(get_env('TMP'), "source", "tools", "mx.tools") -+ if (suite_import.name == "sulong"): -+ return join(get_env('TMP'), "source", "sulong", "mx.sulong") -+ if (suite_import.name == "compiler"): -+ return join(get_env('TMP'), "source", "compiler", "mx.compiler") - else: -- # use the SuiteModel to locate a local source copy of the suite -- return _suitemodel.find_suite_dir(suite_import) -+ return join(get_env('MX_GIT_CACHE_DIR'), suite_import.name) - - def _get_import_dir(url, mode): - """Return directory where the suite will be cloned to""" -@@ -3816,7 +3777,7 @@ def getmtime(name): - """ - Wrapper for builtin open function that handles long path names on Windows. - """ -- return os.path.getmtime(_safe_path(name)) -+ return 315532800 - - - def stat(name): -@@ -4062,57 +4023,8 @@ def _attempt_download(url, path, jarEntryName=None): - return False - - def download(path, urls, verbose=False, abortOnError=True, verifyOnly=False): -- """ -- Attempts to downloads content for each URL in a list, stopping after the first successful download. -- If the content cannot be retrieved from any URL, the program is aborted, unless abortOnError=False. -- The downloaded content is written to the file indicated by `path`. -- """ -- if not verifyOnly: -- ensure_dirname_exists(path) -- assert not path.endswith(os.sep) -- -- # https://docs.oracle.com/javase/7/docs/api/java/net/JarURLConnection.html -- jarURLPattern = re.compile('jar:(.*)!/(.*)') -- verify_errors = {} -- for url in urls: -- if not verifyOnly or verbose: -- log('Downloading ' + url + ' to ' + path) -- m = jarURLPattern.match(url) -- jarEntryName = None -- if m: -- url = m.group(1) -- jarEntryName = m.group(2) -- -- if not _opts.trust_http and (url.lower().startswith('http://') or url.lower().startswith('ftp://')): -- warn('Downloading from non-https URL {}. Use --trust-http mx option to suppress this warning.'.format(url)) -- -- if verifyOnly: -- try: -- conn = _urlopen(url, timeout=10) -- conn.close() -- except (IOError, socket.timeout) as e: -- _suggest_tlsv1_error(e) -- verify_errors[url] = e -- else: -- for i in range(4): -- if i != 0: -- time.sleep(1) -- warn('Retry {} to download from {}'.format(i, url)) -- if _attempt_download(url, path, jarEntryName): -- return True # Download was successful -- -- if verifyOnly and len(verify_errors) < len(urls): # verify-mode at least one success -> success -- return True -- else: # Either verification error or no download was successful -- msg = 'Could not download to ' + path + ' from any of the following URLs: ' + ', '.join(urls) -- if verifyOnly: # verify-mode -> print error details -- for url, e in verify_errors.items(): -- msg += '\n ' + url + ': ' + str(e) -- if abortOnError: -- abort(msg) -- else: -- warn(msg) -- return False -+ print("FAKE download(path={} urls={} verbose={} abortOnError={} verifyOnly={})".format(path, urls, verbose, abortOnError, verifyOnly)) -+ return True - - def update_file(path, content, showDiff=False): - """ -@@ -7887,30 +7799,6 @@ class PackedResourceLibrary(ResourceLibrary): - - def get_path(self, resolve): - extract_path = _make_absolute(self.extract_path, self.suite.dir) -- download_path = super(PackedResourceLibrary, self).get_path(resolve) -- if resolve and self._check_extract_needed(extract_path, download_path): -- extract_path_tmp = tempfile.mkdtemp(suffix=basename(extract_path), dir=dirname(extract_path)) -- try: -- # extract archive -- Extractor.create(download_path).extract(extract_path_tmp) -- # ensure modification time is up to date -- os.utime(extract_path_tmp, None) -- logv("Moving temporary directory {} to {}".format(extract_path_tmp, extract_path)) -- try: -- # attempt atomic overwrite -- os.rename(extract_path_tmp, extract_path) -- except OSError: -- # clean destination & re-try for cases where atomic overwrite doesn't work -- rmtree(extract_path, ignore_errors=True) -- os.rename(extract_path_tmp, extract_path) -- except OSError as ose: -- # Rename failed. Race with other process? -- if self._check_extract_needed(extract_path, download_path): -- # ok something really went wrong -- abort("Extracting {} failed!".format(download_path), context=ose) -- finally: -- rmtree(extract_path_tmp, ignore_errors=True) -- - return extract_path - - def _check_download_needed(self): -@@ -8430,7 +8318,7 @@ class VC(_with_metaclass(ABCMeta, object)): - :param str branch: a branch name - :param bool abortOnError: if True abort on error - """ -- abort(self.kind + " update_to_branch is not implemented") -+ self.run(['hg', vcdir] + cmd) - - def is_release_from_tags(self, vcdir, prefix): - """ -@@ -8831,7 +8719,7 @@ class HgConfig(VC): - return None - - def parent_info(self, vcdir, abortOnError=True): -- out = self.hg_command(vcdir, ["log", "-r", ".", "--template", "{author}|||{date|hgdate}"], abortOnError=abortOnError) -+ out = _check_output_str(["hg", '-R', vcdir, "log", "-r", ".", "--template", "{author}|||{date|hgdate}"]) - author, date = out.split("|||") - ts, _ = date.split(" ") - return self._sanitize_parent_info({ -@@ -14069,6 +13957,7 @@ class Archiver(SafeFileCreation): - - def _add_zip(self, filename, archive_name, provenance): - self._add_provenance(archive_name, provenance) -+ os.utime(filename, (315532800, 315532800)) - self.zf.write(filename, archive_name) - - def _add_str_zip(self, data, archive_name, provenance): diff --git a/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch b/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch deleted file mode 100644 index 38a29fd8fbfd..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c b/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c -index 16b869354d8..3691739d13b 100644 ---- a/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c -+++ b/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c -@@ -41,11 +41,3 @@ int sigsetjmp(sigjmp_buf env, int savesigs) { - WARN_UNSUPPORTED(sigsetjmp); - return 0; - } -- --void longjmp(jmp_buf env, int val) { -- ERR_UNSUPPORTED(longjmp); --} -- --void siglongjmp(sigjmp_buf env, int val) { -- ERR_UNSUPPORTED(siglongjmp); --} diff --git a/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch deleted file mode 100644 index bb9a00687124..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py -index 8889c5ad810..add211a45c5 100644 ---- a/truffle/mx.truffle/mx_truffle.py -+++ b/truffle/mx.truffle/mx_truffle.py -@@ -695,6 +695,7 @@ class LibffiBuildTask(mx.AbstractNativeBuildTask): - os.path.relpath(self.subject.delegate.dir, self.subject.suite.vc_dir)] - for patch in self.subject.patches: - mx.run(git_apply + [patch], cwd=self.subject.suite.vc_dir) -+ mx.run(['cp', os.path.join(os.getenv('TMP'), 'truffle.make'), os.path.join(self.subject.delegate.dir, 'Makefile')]) - - self.delegate.logBuild() - self.delegate.build() diff --git a/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch deleted file mode 100644 index 0aa1bc9b88dd..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/mx.jvmci/mx_jvmci.py b/mx.jvmci/mx_jvmci.py -index 491fc19ab9..b4ddc03abb 100644 ---- a/mx.jvmci/mx_jvmci.py -+++ b/mx.jvmci/mx_jvmci.py -@@ -192,6 +192,7 @@ class HotSpotVMJDKDeployedDist(JDKDeployedDist): - if m.name in _hs_deploy_map: - targetDir = join(jdkDir, _hs_deploy_map[m.name]) - mx.logv('Deploying {} from {} to {}'.format(m.name, dist.name, targetDir)) -+ subprocess.call(["chmod", "-R", "+rw", targetDir]) - tar.extract(m, targetDir) - - """ diff --git a/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch b/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch deleted file mode 100644 index 06f693db9f63..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/tool/jt.rb b/tool/jt.rb -index 870d88edcb..0a6e4c367b 100755 ---- a/tool/jt.rb -+++ b/tool/jt.rb -@@ -152,13 +152,16 @@ module Utilities - end - - def find_mx -- if which('mx') -- 'mx' -+ if ENV.key?("MX_GIT_CACHE_DIR") -+ "mx-internal" - else -- mx_repo = find_or_clone_repo("https://github.com/graalvm/mx.git") -- "#{mx_repo}/mx" -+ if which('mx') -+ 'mx' -+ else -+ mx_repo = find_or_clone_repo("https://github.com/graalvm/mx.git") -+ "#{mx_repo}/mx" -+ end - end -- end - - def find_launcher(use_native) - if use_native -@@ -444,8 +447,8 @@ module Commands - --no-sforceimports do not run sforceimports before building - parser build the parser - options build the options -- graalvm build a minimal JVM-only GraalVM containing only TruffleRuby, -- available by default in mxbuild/truffleruby-jvm, -+ graalvm build a minimal JVM-only GraalVM containing only TruffleRuby, -+ available by default in mxbuild/truffleruby-jvm, - the Ruby is symlinked into rbenv or chruby if available - --graal include the GraalVM Compiler in the build - --native build native ruby image as well, available in mxbuild/truffleruby-native -@@ -491,7 +494,7 @@ module Commands - jt test compiler run compiler tests - jt test integration [TESTS] run integration tests - jt test bundle [--jdebug] tests using bundler -- jt test gems [TESTS] tests using gems -+ jt test gems [TESTS] tests using gems - jt test ecosystem [TESTS] tests using the wider ecosystem such as bundler, Rails, etc - jt test cexts [--no-openssl] [--no-gems] [test_names...] - run C extension tests (set GEM_HOME) diff --git a/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch deleted file mode 100644 index 43ca3e168327..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/mx.fastr/mx_copylib.py b/mx.fastr/mx_copylib.py -index 4f57e1954..db45220d9 100644 ---- a/mx.fastr/mx_copylib.py -+++ b/mx.fastr/mx_copylib.py -@@ -54,6 +54,9 @@ def _copylib(lib, libpath, plain_libpath_base, target): - else: - try: - if platform.system() == 'Linux': -+ # https://github.com/oracle/fastr/issues/110 -+ if libpath.endswith("libgcc_s.so"): -+ libpath = libpath + ".1" - output = subprocess.check_output(['objdump', '-p', libpath]) - elif platform.system() == 'SunOS': - output = subprocess.check_output(['elfdump', '-d', libpath]) diff --git a/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch b/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch deleted file mode 100644 index 96cca7ed239b..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c b/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c -index dcf081316..c2cb4879b 100644 ---- a/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c -+++ b/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c -@@ -20,8 +20,10 @@ - - #include <Rinternals.h> - #include <stdlib.h> -+#include <rlocale.h> - - #include <R_ext/eventloop.h> -+#include <R_ext/GraphicsEngine.h> - #include <Defn.h> - - Rboolean known_to_be_latin1 = FALSE; -@@ -166,3 +168,69 @@ int Scollate(SEXP a, SEXP b) { - void z_prec_r(Rcomplex *r, Rcomplex *x, double digits) { - unimplemented("z_prec_r"); - } -+ -+int Rf_AdobeSymbol2ucs2(int n) { -+ unimplemented("Rf_AdobeSymbol2ucs2"); -+ return 0; -+} -+ -+size_t Mbrtowc(wchar_t *wc, const char *s, size_t n, mbstate_t *ps) { -+ unimplemented("Mbrtowc"); -+ return 0; -+} -+ -+double R_GE_VStrHeight(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd) { -+ unimplemented("R_GE_VStrHeight"); -+ return 0; -+} -+ -+void R_GE_VText(double x, double y, const char * const s, cetype_t enc, -+ double x_justify, double y_justify, double rotation, -+ const pGEcontext gc, pGEDevDesc dd) { -+ unimplemented("R_GE_VText"); -+} -+ -+double R_GE_VStrWidth(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd) { -+ unimplemented("R_GE_VStrWidth"); -+} -+ -+void setulb(int n, int m, double *x, double *l, double *u, int *nbd, -+ double *f, double *g, double factr, double *pgtol, -+ double *wa, int * iwa, char *task, int iprint, int *isave) { -+ unimplemented("setulb"); -+} -+ -+void genptry(int n, double *p, double *ptry, double scale, void *ex) { -+ unimplemented("genptry"); -+} -+ -+double EXP(double x) { -+ unimplemented("EXP"); -+ return 0; -+} -+ -+double LOG(double x) { -+ unimplemented("LOG"); -+ return 0; -+} -+ -+Rwchar_t Rf_utf8toucs32(wchar_t high, const char *s) { -+ unimplemented("Rf_utf8toucs32"); -+ return 0; -+} -+ -+size_t mbtoucs(unsigned int *wc, const char *s, size_t n) { -+ unimplemented("mbtoucs"); -+ return (size_t) 0; -+} -+ -+ -+int DispatchOrEval(SEXP call, SEXP op, const char *generic, SEXP args, -+ SEXP rho, SEXP *ans, int dropmissing, int argsevald) { -+ unimplemented("DispatchOrEval"); -+ return 0; -+} -+ -+void ENSURE_NAMEDMAX (SEXP x) { -+ unimplemented("ENSURE_NAMEDMAX"); -+} diff --git a/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch b/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch deleted file mode 100644 index 1aea044c8023..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/mx.jvmci/suite.py b/mx.jvmci/suite.py -index 9690c0a38f..fa1d36b7e1 100644 ---- a/mx.jvmci/suite.py -+++ b/mx.jvmci/suite.py -@@ -241,18 +241,7 @@ suite = { - "workingSets" : "JVMCI,HotSpot,SPARC", - }, - -- "jdk.vm.ci.hotspot.jfr" : { -- "subDir" : "jvmci", -- "sourceDirs" : ["src"], -- "dependencies" : [ -- "jdk.vm.ci.hotspot", -- "JFR", -- ], -- "checkstyle" : "jdk.vm.ci.hotspot", -- "javaCompliance" : "1.8", -- "profile" : "", -- "workingSets" : "JVMCI,HotSpot", -- }, -+ - - "hotspot" : { - "native" : True, -@@ -354,7 +343,7 @@ suite = { - "jdk.vm.ci.hotspot.aarch64", - "jdk.vm.ci.hotspot.amd64", - "jdk.vm.ci.hotspot.sparc", -- "jdk.vm.ci.hotspot.jfr", -+ - ], - "distDependencies" : [ - "JVMCI_SERVICES", diff --git a/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch b/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch deleted file mode 100644 index cf8bd4050662..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java -index 23a76357fd2..f13694b6ed7 100644 ---- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java -+++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java -@@ -249,15 +249,6 @@ public final class SizeAndSignednessVerifier extends NativeInfoTreeVisitor { - } - - private void checkSignedness(boolean isUnsigned, ResolvedJavaType type, ResolvedJavaMethod method) { -- if (isSigned(type)) { -- if (isUnsigned) { -- addError("Type " + type.toJavaName(false) + " is signed, but accessed C value is unsigned", method); -- } -- } else if (nativeLibs.isWordBase(type)) { -- /* every Word type other than Signed is assumed to be unsigned. */ -- if (!isUnsigned) { -- addError("Type " + type.toJavaName(false) + " is unsigned, but accessed C value is signed", method); -- } -- } -+ - } - } diff --git a/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py b/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py deleted file mode 100644 index afb6b5681679..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py -index b89163ef983..0fd0138b336 100644 ---- a/substratevm/mx.substratevm/mx_substratevm.py -+++ b/substratevm/mx.substratevm/mx_substratevm.py -@@ -189,7 +189,7 @@ if str(svm_java_compliance().value) not in GRAAL_COMPILER_FLAGS_MAP: - mx.abort("Substrate VM does not support this Java version: " + str(svm_java_compliance())) - GRAAL_COMPILER_FLAGS = GRAAL_COMPILER_FLAGS_BASE + GRAAL_COMPILER_FLAGS_MAP[str(svm_java_compliance().value)] - --IMAGE_ASSERTION_FLAGS = ['-H:+VerifyGraalGraphs', '-H:+VerifyPhases'] -+IMAGE_ASSERTION_FLAGS = ['-H:+VerifyGraalGraphs', '-H:+VerifyPhases', '-H:+ReportExceptionStackTraces'] - suite = mx.suite('substratevm') - svmSuites = [suite] - clibraryDists = ['SVM_HOSTED_NATIVE'] diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix index 54cc917a5be0..1aa1fbc11775 100644 --- a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix +++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/default.nix @@ -16,6 +16,6 @@ in { graalvm11-ce = mkGraal rec { version = "21.2.0"; javaVersion = "11"; - platforms = ["x86_64-linux" "x86_64-darwin"]; + platforms = ["x86_64-linux" "aarch64-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 index 50a3b53c579c..5b3cdf75bc5b 100644 --- a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/repository.nix +++ b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/repository.nix @@ -10,17 +10,26 @@ , gtkSupport ? true, cairo, glib, gtk3 }: let - platform = if stdenv.isDarwin then "darwin-amd64" else "linux-amd64"; + platform = { + aarch64-linux = "linux-aarch64"; + x86_64-linux = "linux-amd64"; + x86_64-darwin = "darwin-amd64"; + }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + 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-aarch64" = "sha256-u9841eaHH347JHCrm5u3YGZ9RSTuKiDq368TY2otAYw="; "11-linux-amd64" = "0w7lhvxm4nggqdcl4xrhdd3y6dqw9jhyca9adjkp508n4lqf1lxv"; "11-darwin-amd64" = "0dnahicdl0vhrbiml9z9nbb7k75hbsjj8rs246i1lwril12dqb7n"; }.${javaVersionPlatform}; @@ -29,6 +38,7 @@ let (fetchurl { sha256 = { "8-linux-amd64" = "1jlvrxdlbsmlk3ia43h9m29kmmdn83h6zdlnf8qb7bm38c84nhsc"; + "11-linux-aarch64" = "sha256-7W5gkhj2kON2ocrGpyH/OL/phOyHkjNDId2CtyUAEWY="; "11-linux-amd64" = "1ybd7a6ii6582skr0nkxx7bccsa7gkg0yriql2h1lcz0rfzcdi3g"; "11-darwin-amd64" = "1jdy845vanmz05zx5b9227gb1msh9wdrz2kf3fx9z54ssd9qgdhm"; }.${javaVersionPlatform}; @@ -37,6 +47,7 @@ let (fetchurl { sha256 = { "8-linux-amd64" = "18ip0ay06q1pryqs8ja988mvk9vw475c0nfjcznnsd1zp296p6jc"; + "11-linux-aarch64" = "sha256-i9ysgqbI52PiXofZQ5AnPSzs2TeR8An5CIYzcwhx28o="; "11-linux-amd64" = "1jszz97mkqavxzyhx5jxhi43kqjxk9c36j5l5hy3kn8sdfmbplm4"; "11-darwin-amd64" = "1767ryhv2cn5anlys63ysax1p8ag79bykac1xfrjfan8yv6d8ybl"; }.${javaVersionPlatform}; @@ -44,20 +55,23 @@ let }) (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-aarch64" = "sha256-Lkc/mq1w18+PQ5McvLGyQBSOz/TMSUgwioRZ0Dtyhm4="; "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"; }) + ] ++ lib.optionals (platform == "amd64") [ + # graalpython is not available on aarch64 platforms yet + (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"; + }) ]; buildInputs = lib.optionals stdenv.isLinux [ @@ -124,43 +138,64 @@ let exit 1 fi - unpack_jar ''${arr[1]} - unpack_jar ''${arr[2]} - unpack_jar ''${arr[3]} - unpack_jar ''${arr[4]} + for jar in "''${arr[@]:1}"; do + unpack_jar "$jar" + done ''; - installPhase = { - "8-linux-amd64" = '' + outputs = [ "out" "lib" ]; + + installPhase = let + nativePRNGWorkaround = path: '' # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html - substituteInPlace $out/jre/lib/security/java.security \ + substituteInPlace ${path} \ --replace file:/dev/random file:/dev/./urandom \ --replace NativePRNGBlocking SHA1PRNG - + ''; + copyClibrariesToOut = basepath: '' # 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) + ln -s $f ${basepath}/${platform}/$(basename $f) + done + ''; + copyClibrariesToLib = '' + # add those libraries to $lib output too, so we can use them with + # `native-image -H:CLibraryPath=''${graalvm11-ce.lib}/lib ...` and reduce + # closure size by not depending on GraalVM $out (that is much bigger) + mkdir -p $lib/lib + for f in ${glibc}/lib/*; do + ln -s $f $lib/lib/$(basename $f) done + ''; + in { + "8-linux-amd64" = '' + ${nativePRNGWorkaround "$out/jre/lib/security/java.security"} + + ${copyClibrariesToOut "$out/jre/lib/svm/clibraries"} + + ${copyClibrariesToLib} # 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 + ${nativePRNGWorkaround "$out/conf/security/java.security"} - # 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 + ${copyClibrariesToOut "$out/lib/svm/clibraries"} + + ${copyClibrariesToLib} + ''; + "11-linux-aarch64" = '' + ${nativePRNGWorkaround "$out/conf/security/java.security"} + + ${copyClibrariesToOut "$out/lib/svm/clibraries"} + + ${copyClibrariesToLib} ''; "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 + # create empty $lib/lib to avoid breaking builds + mkdir -p $lib/lib + ${nativePRNGWorkaround "$out/conf/security/java.security"} ''; }.${javaVersionPlatform} + '' # jni.h expects jni_md.h to be in the header search path. @@ -203,53 +238,60 @@ let doInstallCheck = true; installCheckPhase = '' - echo ${ - lib.escapeShellArg '' - public class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello World"); - } + 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 - ''}''; + } + '' + } > 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' + '' + } + + ${ + lib.optionalString (platform == "amd64") '' + echo "Testing interpreted languages" + $out/bin/graalpython -c 'print(1 + 1)' + $out/bin/ruby -e 'puts(1 + 1)' + + echo '1 + 1' | $out/bin/graalpython + '' + } + + ${# 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 + # TODO: "truffleruby: an internal exception escaped out of the interpreter" + # error on linux-aarch64 + lib.optionalString (platform == "linux-amd64") '' + echo '1 + 1' | $out/bin/irb + '' + } + + ${# TODO: Doesn't work on MacOS, we have this error: + # "Launching JShell execution engine threw: Operation not permitted (Bind failed)" + lib.optionalString (javaVersion == "11" && stdenv.isLinux) '' + echo '1 + 1' | $out/bin/jshell + '' + }''; passthru.home = graalvmXXX-ce; @@ -264,6 +306,7 @@ let glittershark babariviere ericdallo + thiagokokada ]; platforms = platforms; }; diff --git a/nixpkgs/pkgs/development/compilers/graalvm/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/default.nix deleted file mode 100644 index 069c4655ea46..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/default.nix +++ /dev/null @@ -1,540 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial_4, python27, setJavaClassPath, - which, zlib, makeWrapper, openjdk, unzip, git, clang, llvm, icu, ruby, glibc, bash, gcc, libobjc, - xcodebuild, gfortran, readline, bzip2, xz, pcre, curl, ed, libresolv, libiconv, writeScriptBin, - openssl, perl, CoreFoundation, Foundation, JavaNativeFoundation, JavaRuntimeSupport, JavaVM, Cocoa -}: - -let - version = "19.2.1"; - mercurial = mercurial_4; - truffleMake = ./truffle.make; - makeMxGitCache = list: out: '' - mkdir ${out} - ${lib.concatMapStrings ({ url, name, rev, sha256 }: '' - mkdir -p ${out}/${name} - cp -rf ${fetchgit { inherit url rev sha256; }}/* ${out}/${name} - '' - ) list} - - # # GRAAL-NODEJS # # - chmod -R +rw ${out} - sed -i "s|#include \"../../../../mxbuild/trufflenode/coremodules/node_snapshots.h\"| \ - #include \"$NIX_BUILD_TOP/mxbuild/graal-nodejs/trufflenode/coremodules/node_snapshots.h\"|g" \ - ${out}/graaljs/graal-nodejs/deps/v8/src/graal/callbacks.cc - - # patch the shebang in python script runner - chmod -R +rw ${out}/graaljs/graal-nodejs/mx.graal-nodejs/python2 - patchShebangs ${out}/graaljs/graal-nodejs/mx.graal-nodejs/python2/python - - # # TUFFLE-RUBY # # - (cd ${out}/truffleruby && git apply ${./005_tool_jt.rb.patch}) - patchShebangs ${out}/truffleruby/tool/query-versions-json.rb - - substituteInPlace ${out}/truffleruby/src/main/c/Makefile \ - --replace '(MX_HOME)/mx' '(MX_HOME)/mx-internal' - - substituteInPlace ${out}/truffleruby/src/processor/java/org/truffleruby/processor/BuildInformationProcessor.java \ - --replace 'trufflerubyHome = findHome();' \ - 'trufflerubyHome = new File(System.getenv("MX_GIT_CACHE_DIR"), "truffleruby");' \ - --replace tool/query-versions-json.rb 'ruby tool/query-versions-json.rb' \ - --replace 'revision = runCommand("git rev-parse --short=8 HEAD");' \ - 'revision = "${version}";' \ - --replace 'compileDate = runCommand("git log -1 --date=short --pretty=format:%cd");' \ - 'compileDate = "1970-01-01";' - - substituteInPlace ${out}/truffleruby/mx.truffleruby/mx_truffleruby.py \ - --replace "mx_binary = join(mx._mx_home, 'mx')" "mx_binary = join(mx._mx_home, 'mx-internal')" - - # # FASTR # # - (cd ${out}/fastr && git apply ${ ./006_mx_copylib.py.patch }) - (cd ${out}/fastr && git apply ${ ./007_unimplemented.c.patch }) - substituteInPlace ${out}/fastr/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java \ - --replace 'File suiteRoot = srcGenDir.getCanonicalFile().getParentFile().getParentFile().getParentFile();' \ - 'File suiteRoot = new File(System.getenv("MX_GIT_CACHE_DIR"), "fastr");' - - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/gnur/Makefile.libs \ - --replace 'mx -p' 'mx-internal -p' - - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/include/Makefile \ - --replace 'mx -p' 'mx-internal -p' - - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/fficall/Makefile \ - --replace 'mx -p' 'mx-internal -p' - - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native.recommended/Makefile \ - --replace 'mx -p' 'mx-internal -p' - - # Make sure that the logs aren't hidden when compiling gnur - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/gnur/Makefile.gnur \ - --replace '> gnur_configure.log 2>&1' "" \ - --replace '> gnur_make.log 2>&1' "" - - substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/run/Linux/Renviron \ - --replace /bin/ "" \ - --replace /usr/bin/ "" - - sed -i "s|exec \$mx|exec mx-internal|g" ${out}/fastr/com.oracle.truffle.r.native/run/*.sh - chmod +x ${out}/fastr/com.oracle.truffle.r.native/run/*.sh - patchShebangs ${out}/fastr/com.oracle.truffle.r.native/run/*.sh - - cd ${out} - hg init - hg add - hg commit -m 'dummy commit' - hg tag ${lib.escapeShellArg "vm${version}"} - hg checkout ${lib.escapeShellArg "vm${version}"} - ''; - - # pre-download some cache entries ('mx' will not be able to download under nixbld) - makeMxCache = list: - stdenv.mkDerivation { - name = "mx-cache"; - nativeBuildInputs = [ unzip ]; - buildCommand = with lib; '' - mkdir $out - ${lib.concatMapStrings - ({url, name, sha1, isNinja ? false}: '' - install -D ${fetchurl { inherit url sha1; }} $out/${name} - echo -n ${sha1} > $out/${name}.sha1 - ${if isNinja then '' - export BASENAME=${removeSuffix ".zip" name} - mkdir "$out/$BASENAME.extracted" && - unzip "$out/${name}" -d "$out/$BASENAME.extracted" - - # Ninja is called later in the build process - ${lib.optionalString stdenv.isLinux '' - if [ -f $out/$BASENAME.extracted/ninja ]; then - patchelf --set-interpreter \ - "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${stdenv.cc.cc.lib}/lib64" \ - $out/$BASENAME.extracted/ninja - fi''} - '' - else ""} - '') list} - ''; - }; - - jvmci8-mxcache = [ - rec { sha1 = "53addc878614171ff0fcbc8f78aed12175c22cdb"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.jar"; url = "mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4.jar"; } - rec { sha1 = "9bd1fa334d941005bc9ab3ac92478a590f5b7d73"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.sources.jar"; url = "mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4-sources.jar"; } - rec { sha1 = "e5ca9511493b7e3bc2cabdb8ded92e855f3aac32"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.jar"; url = "mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4.jar"; } - rec { sha1 = "eb61e479b35b467954f28a565c094c563b790e19"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.sources.jar"; url = "mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4-sources.jar"; } - rec { sha1 = "869021a6d90cfb008b12e83fccbe42eca29e5355"; name = "JACOCOAGENT_0.8.4_${sha1}/jacocoagent-0.8.4.jar"; url = "mirror://maven/org/jacoco/org.jacoco.agent/0.8.4/org.jacoco.agent-0.8.4-runtime.jar"; } - rec { sha1 = "306816fb57cf94f108a43c95731b08934dcae15c"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.jar"; url = "mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar"; } - rec { sha1 = "9cd14a61d7aa7d554f251ef285a6f2c65caf7b65"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.sources.jar"; url = "mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar"; } - rec { sha1 = "fa29aa438674ff19d5e1386d2c3527a0267f291e"; name = "ASM_7.1_${sha1}/asm-7.1.jar"; url = "mirror://maven/org/ow2/asm/asm/7.1/asm-7.1.jar"; } - rec { sha1 = "9d170062d595240da35301362b079e5579c86f49"; name = "ASM_7.1_${sha1}/asm-7.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm/7.1/asm-7.1-sources.jar"; } - rec { sha1 = "a3662cf1c1d592893ffe08727f78db35392fa302"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.jar"; url = "mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar"; } - rec { sha1 = "157238292b551de8680505fa2d19590d136e25b9"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1-sources.jar"; } - rec { sha1 = "379e0250f7a4a42c66c5e94e14d4c4491b3c2ed3"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.jar"; url = "mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar"; } - rec { sha1 = "36789198124eb075f1a5efa18a0a7812fb16f47f"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1-sources.jar"; } - rec { sha1 = "431dc677cf5c56660c1c9004870de1ed1ea7ce6c"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.jar"; url = "mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar"; } - rec { sha1 = "a62ff3ae6e37affda7c6fb7d63b89194c6d006ee"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1-sources.jar"; } - rec { sha1 = "ec2544ab27e110d2d431bdad7d538ed509b21e62"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.jar"; url = "mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar"; } - rec { sha1 = "cd098e055bf192a60c81d81893893e6e31a6482f"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.sources.jar"; url = "mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2-sources.jar"; } - rec { sha1 = "442447101f63074c61063858033fbfde8a076873"; name = "JMH_1_21_${sha1}/jmh-1-21.jar"; url = "mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar"; } - rec { sha1 = "a6fe84788bf8cf762b0e561bf48774c2ea74e370"; name = "JMH_1_21_${sha1}/jmh-1-21.sources.jar"; url = "mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21-sources.jar"; } - rec { sha1 = "7aac374614a8a76cad16b91f1a4419d31a7dcda3"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.jar"; url = "mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar"; } - rec { sha1 = "fb48e2a97df95f8b9dced54a1a37749d2a64d2ae"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.sources.jar"; url = "mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21-sources.jar"; } - rec { sha1 = "2973d150c0dc1fefe998f834810d68f278ea58ec"; name = "JUNIT_${sha1}/junit.jar"; url = "mirror://maven/junit/junit/4.12/junit-4.12.jar"; } - rec { sha1 = "a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa"; name = "JUNIT_${sha1}/junit.sources.jar"; url = "mirror://maven/junit/junit/4.12/junit-4.12-sources.jar"; } - rec { sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0"; name = "HAMCREST_${sha1}/hamcrest.jar"; url = "mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"; } - rec { sha1 = "1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b"; name = "HAMCREST_${sha1}/hamcrest.sources.jar"; url = "mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar"; } - rec { sha1 = "0d031013db9a80d6c88330c42c983fbfa7053193"; name = "hsdis_${sha1}/hsdis.so"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-linux-${sha1}.so"; } -] ++ lib.optionals stdenv.isLinux [ - rec { sha1 = "0d031013db9a80d6c88330c42c983fbfa7053193"; name = "hsdis_${sha1}/hsdis.so"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-linux-${sha1}.so"; } - ] -++ lib.optionals stdenv.isDarwin [ - rec { sha1 = "67f6d23cbebd8998450a88b5bef362171f66f11a"; name = "hsdis_${sha1}/hsdis.dylib"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-darwin-${sha1}.dylib"; } - ]; - - graal-mxcache = jvmci8-mxcache ++ [ - # rec { sha1 = "5001adab652fc4eb35e30cdefbb0765442f8b7db"; name = "LLVM_ORG_LIBCXX_SRC_${sha1}/llvm-org-libcxx-src.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/compiler-rt-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; } - rec { sha1 = "5001adab652fc4eb35e30cdefbb0765442f8b7db"; name = "LLVM_ORG_COMPILER_RT_LINUX_${sha1}/llvm-org-compiler-rt-linux.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/compiler-rt-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; } - rec { sha1 = "a990b2dba1c706f5c43c56fedfe70bad9a695852"; name = "LLVM_WRAPPER_${sha1}/llvm-wrapper.jar"; url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2.jar"; } - rec { sha1 = "decbd95d46092fa9afaf2523b5b23d07ad7ad6bc"; name = "LLVM_WRAPPER_${sha1}/llvm-wrapper.sources.jar"; url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-sources.jar"; } - rec { sha1 = "cfa6a0259d98bff5aa8d41ba11b4d1dad648fbaa"; name = "JAVACPP_${sha1}/javacpp.jar"; url = "mirror://maven/org/bytedeco/javacpp/1.4.2/javacpp-1.4.2.jar"; } - rec { sha1 = "fdb2d2c17f6b91cdd5421554396da8905f0dfed2"; name = "JAVACPP_${sha1}/javacpp.sources.jar"; url = "mirror://maven/org/bytedeco/javacpp/1.4.2/javacpp-1.4.2-sources.jar"; } - rec { sha1 = "702ca2d0ae93841c5ab75e4d119b29780ec0b7d9"; name = "NINJA_SYNTAX_${sha1}/ninja-syntax.tar.gz"; url = "https://pypi.org/packages/source/n/ninja_syntax/ninja_syntax-1.7.2.tar.gz"; } - rec { sha1 = "f2cfb09cee12469ff64f0d698b13de19903bb4f7"; name = "NanoHTTPD-WebSocket_${sha1}/nanohttpd-websocket.jar"; url = "mirror://maven/org/nanohttpd/nanohttpd-websocket/2.3.1/nanohttpd-websocket-2.3.1.jar"; } - rec { sha1 = "a8d54d1ca554a77f377eff6bf9e16ca8383c8f6c"; name = "NanoHTTPD_${sha1}/nanohttpd.jar"; url = "mirror://maven/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.jar"; } - rec { sha1 = "946f8aa9daa917dd81a8b818111bec7e288f821a"; name = "ANTLR4_${sha1}/antlr4.jar"; url = "mirror://maven/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1.jar"; } - rec { sha1 = "c3aeac59c022bdc497c8c48ed86fa50450e4896a"; name = "JLINE_${sha1}/jline.jar"; url = "mirror://maven/jline/jline/2.14.6/jline-2.14.6.jar"; } - rec { sha1 = "d0bdc21c5e6404726b102998e44c66a738897905"; name = "JAVA_ALLOCATION_INSTRUMENTER_${sha1}/java-allocation-instrumenter.jar"; url = "mirror://maven/com/google/code/java-allocation-instrumenter/java-allocation-instrumenter/3.1.0/java-allocation-instrumenter-3.1.0.jar"; } - rec { sha1 = "0da08b8cce7bbf903602a25a3a163ae252435795"; name = "ASM5_${sha1}/asm5.jar"; url = "mirror://maven/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar"; } - rec { sha1 = "396ce0c07ba2b481f25a70195c7c94922f0d1b0b"; name = "ASM_TREE5_${sha1}/asm-tree5.jar"; url = "mirror://maven/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.jar"; } - rec { sha1 = "280c265b789e041c02e5c97815793dfc283fb1e6"; name = "LIBFFI_SOURCES_${sha1}/libffi-sources.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.2.1.tar.gz"; } - rec { sha1 = "8819cea8bfe22c9c63f55465e296b3855ea41786"; name = "TruffleJSON_${sha1}/trufflejson.jar"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejson-20180130.jar"; } - rec { sha1 = "9712a8124c40298015f04a74f61b3d81a51513af"; name = "CHECKSTYLE_8.8_${sha1}/checkstyle-8.8.jar"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/checkstyle-8.8-all.jar"; } - rec { sha1 = "8dc5a90bed5f51d7538d05b8c31c31b7dfddbd66"; name = "VISUALVM_COMMON_${sha1}/visualvm-common.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20.tar.gz"; } - rec { sha1 = "e6e60889b7211a80b21052a249bd7e0f88f79fee"; name = "Java-WebSocket_${sha1}/java-websocket.jar"; url = "mirror://maven/org/java-websocket/Java-WebSocket/1.3.9/Java-WebSocket-1.3.9.jar"; } - rec { sha1 = "7a4d00d5ec5febd252a6182e8b6e87a0a9821f81"; name = "ICU4J_${sha1}/icu4j.jar"; url = "mirror://maven/com/ibm/icu/icu4j/62.1/icu4j-62.1.jar"; } - # This duplication of asm with underscore and minus is totally weird - rec { sha1 = "c01b6798f81b0fc2c5faa70cbe468c275d4b50c7"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.jar"; url = "mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar"; } - rec { sha1 = "cee28077ac7a63d3de0b205ec314d83944ff6267"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1-sources.jar"; } - rec { sha1 = "332b022092ecec53cdb6272dc436884b2d940615"; name = "ASM_TREE-6.2.1_${sha1}/asm-tree-6.2.1.jar"; url = "mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1.jar"; } - rec { sha1 = "072bd64989090e4ed58e4657e3d4481d96f643af"; name = "ASM_TREE-6.2.1_${sha1}/asm-tree-6.2.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1-sources.jar"; } - rec { sha1 = "e8b876c5ccf226cae2f44ed2c436ad3407d0ec1d"; name = "ASM_ANALYSIS-6.2.1_${sha1}/asm-analysis-6.2.1.jar"; url = "mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1.jar"; } - rec { sha1 = "b0b249bd185677648692e7c57b488b6d7c2a6653"; name = "ASM_ANALYSIS-6.2.1_${sha1}/asm-analysis-6.2.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1-sources.jar"; } - rec { sha1 = "eaf31376d741a3e2017248a4c759209fe25c77d3"; name = "ASM_COMMONS-6.2.1_${sha1}/asm-commons-6.2.1.jar"; url = "mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1.jar"; } - rec { sha1 = "667fa0f9d370e7848b0e3d173942855a91fd1daf"; name = "ASM_COMMONS-6.2.1_${sha1}/asm-commons-6.2.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1-sources.jar"; } - # From here on the deps are new - rec { sha1 = "400d664d7c92a659d988c00cb65150d1b30cf339"; name = "ASM_UTIL-6.2.1_${sha1}/asm-util-6.2.1.jar"; url = "mirror://maven/org/ow2/asm/asm-util/6.2.1/asm-util-6.2.1.jar"; } - rec { sha1 = "c9f7246bf93bb0dc7fe9e7c9eca531a8fb98d252"; name = "ASM_UTIL-6.2.1_${sha1}/asm-util-6.2.1.sources.jar"; url = "mirror://maven/org/ow2/asm/asm-util/6.2.1/asm-util-6.2.1-sources.jar"; } - rec { sha1 = "4b52bd03014f6d080ef0528865c1ee50621e35c6"; name = "NETBEANS_PROFILER_${sha1}/netbeans-profiler.jar"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/truffle/js/org-netbeans-lib-profiler-8.2-201609300101.jar"; } - rec { sha1 = "b5840706cc8ce639fcafeab1bc61da2d8aa37afd"; name = "NASHORN_INTERNAL_TESTS_${sha1}/nashorn-internal-tests.jar"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/truffle/js/nashorn-internal-tests-700f5e3f5ff2.jar"; } - rec { sha1 = "9577018f9ce3636a2e1cb0a0c7fe915e5098ded5"; name = "JACKSON_ANNOTATIONS_${sha1}/jackson-annotations.jar"; url = "mirror://maven/com/fasterxml/jackson/core/jackson-annotations/2.8.6/jackson-annotations-2.8.6.jar"; } - rec { sha1 = "2ef7b1cc34de149600f5e75bc2d5bf40de894e60"; name = "JACKSON_CORE_${sha1}/jackson-core.jar"; url = "mirror://maven/com/fasterxml/jackson/core/jackson-core/2.8.6/jackson-core-2.8.6.jar"; } - rec { sha1 = "c43de61f74ecc61322ef8f402837ba65b0aa2bf4"; name = "JACKSON_DATABIND_${sha1}/jackson-databind.jar"; url = "mirror://maven/com/fasterxml/jackson/core/jackson-databind/2.8.6/jackson-databind-2.8.6.jar"; } - rec { sha1 = "2838952e91baa37ac73ed817451268a193ba440a"; name = "JCODINGS_${sha1}/jcodings.jar"; url = "mirror://maven/org/jruby/jcodings/jcodings/1.0.40/jcodings-1.0.40.jar"; } - rec { sha1 = "0ed89e096c83d540acac00d6ee3ea935b4c905ff"; name = "JCODINGS_${sha1}/jcodings.sources.jar"; url = "mirror://maven/org/jruby/jcodings/jcodings/1.0.40/jcodings-1.0.40-sources.jar"; } - rec { sha1 = "5dbb09787a9b8780737b71fbf942235ef59051b9"; name = "JONI_${sha1}/joni.jar"; url = "mirror://maven/org/jruby/joni/joni/2.1.25/joni-2.1.25.jar"; } - rec { sha1 = "505a09064f6e2209616f38724f6d97d8d889aa92"; name = "JONI_${sha1}/joni.sources.jar"; url = "mirror://maven/org/jruby/joni/joni/2.1.25/joni-2.1.25-sources.jar"; } - rec { sha1 = "c4f7d054303948eb6a4066194253886c8af07128"; name = "XZ-1.8_${sha1}/xz-1.8.jar"; url = "mirror://maven/org/tukaani/xz/1.8/xz-1.8.jar"; } - rec { sha1 = "9314d3d372b05546a33791fbc8dd579c92ebd16b"; name = "GNUR_${sha1}/gnur.tar.gz"; url = "http://cran.rstudio.com/src/base/R-3/R-3.5.1.tar.gz"; } - rec { sha1 = "90aa8308da72ae610207d8f6ca27736921be692a"; name = "ANTLR4_COMPLETE_${sha1}/antlr4-complete.jar"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/antlr-4.7.1-complete.jar"; }] ++ - lib.optionals stdenv.isLinux [ - rec { sha1 = "df4c1f784294d02a82d78664064248283bfcc297"; name = "LLVM_ORG_${sha1}/llvm-org.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/llvm-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; } - rec { sha1 = "344483aefa15147c121a8fb6fb35a2406768cc5c"; name = "LLVM_PLATFORM_SPECIFIC_${sha1}/llvm-platform-specific.jar"; url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-linux-x86_64.jar"; } - rec { sha1 = "fd1a723d62cbbc591041d303e8b151d89f131643"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20-linux-amd64.tar.gz"; } - rec { sha1 = "987234c4ce45505c21302e097c24efef4873325c"; name = "NINJA_${sha1}/ninja.zip"; url = "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip"; - isNinja = true; }] ++ - lib.optionals stdenv.isDarwin [ - rec { sha1 = "0fa1af180755fa4cc018ee9be33f2d7d827593c4"; name = "LLVM_ORG_${sha1}/llvm-org.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/llvm-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-darwin-amd64.tar.gz"; } - rec { sha1 = "57bc74574104a9e0a2dc4d7a71ffcc5731909e57"; name = "LLVM_PLATFORM_SPECIFIC_${sha1}/llvm-platform-specific.jar"; url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-macosx-x86_64.jar"; } - rec { sha1 = "ae23bb365930f720acc88c62640bae6852a37d67"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz"; url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20-macosx-x86_64.tar.gz"; } - rec { sha1 = "8142c497f7dfbdb052a1e31960fdfe2c6f9a5ca2"; name = "NINJA_${sha1}/ninja.zip"; url = "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip"; - isNinja = true; }]; - - graal-mxcachegit = [ - { sha256 = "01w39ms39gl3cw7c2fgcacr2yjg94im9x2x7p5g94l6xlcgqvcnr"; name = "graaljs"; url = "https://github.com/graalvm/graaljs.git"; rev = "vm-${version}"; } - { sha256 = "1dps9n5b9c80pbg1fmlwpffy6ina0f0h27di24kafc8isxrdggia"; name = "truffleruby"; url = "https://github.com/oracle/truffleruby.git"; rev = "vm-${version}"; } - { sha256 = "0jdpdqm3ld1wsasmi8ka26qf19cibjac8lrqm040h5vh0iqzxizy"; name = "fastr"; url = "https://github.com/oracle/fastr.git"; rev = "vm-${version}"; } - { sha256 = "1gv8vafwrafjzvgv4gwk4kcsb3bnvsx07qa5inc0bdyxy5shl381"; name = "graalpython"; url = "https://github.com/graalvm/graalpython.git"; rev = "vm-${version}"; }]; - - ninja-syntax = python27.pkgs.buildPythonPackage rec { - version = "1.7.2"; - pname = "ninja_syntax"; - doCheck = false; - src = python27.pkgs.fetchPypi { - inherit pname version; - sha256 = "07zg30m0khx55fv2gxxn7pqd549z0vk3x592mrdlk9l8krxwjb9l"; - }; - }; - - findbugs = fetchzip { - name = "findbugs-3.0.0"; - url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/findbugs-3.0.0.zip"; - sha256 = "0sf5f9h1s6fmhfigjy81i109j1ani5kzdr4njlpq0mnkkh9fpr7m"; - }; - - python27withPackages = python27.withPackages (ps: [ ninja-syntax ]); - -in rec { - - mx = stdenv.mkDerivation rec { - version = "5.247.1"; - pname = "mx"; - src = fetchFromGitHub { - owner = "graalvm"; - repo = "mx"; - rev = version; - sha256 = "038qr49rqzkhj76nqd27h8fysssnlpdhmy23ks2y81xlxhlzkc59"; - }; - nativeBuildInputs = [ makeWrapper ]; - prePatch = '' - cp mx.py bak_mx.py - ''; - patches = [ ./001_mx.py.patch ]; - postPatch = '' - mv mx.py internal_mx.py - mv bak_mx.py mx.py - ''; - buildPhase = '' - substituteInPlace mx --replace /bin/pwd pwd - - # avoid crash with 'ValueError: ZIP does not support timestamps before 1980' - substituteInPlace internal_mx.py --replace \ - 'zipfile.ZipInfo(arcname, time.localtime(getmtime(join(root, f)))[:6])' \ - 'zipfile.ZipInfo(arcname, time.strptime ("1 Jan 1980", "%d %b %Y" )[:6])' - ''; - installPhase = '' - mkdir -p $out/bin - cp -dpR * $out/bin - wrapProgram $out/bin/mx \ - --prefix PATH : ${lib.makeBinPath [ python27withPackages mercurial ]} \ - --set FINDBUGS_HOME ${findbugs} - makeWrapper ${python27}/bin/python $out/bin/mx-internal \ - --add-flags "$out/bin/internal_mx.py" \ - --prefix PATH : ${lib.makeBinPath [ python27withPackages mercurial ]} \ - --set FINDBUGS_HOME ${findbugs} - ''; - meta = with lib; { - homepage = "https://github.com/graalvm/mx"; - description = "Command-line tool used for the development of Graal projects"; - license = licenses.gpl2; - platforms = python27.meta.platforms; - }; - }; - - jvmci8 = stdenv.mkDerivation rec { - version = "19.3-b05"; - pname = "jvmci"; - src = fetchFromGitHub { - owner = "graalvm"; - repo = "graal-jvmci-8"; - rev = "jvmci-${version}"; - sha256 = "0j7my76vldbrvki9x1gn9ics3x2z96j05jdy4nflbpik8i396114"; - }; - buildInputs = [ mx mercurial openjdk ] ++ lib.optional stdenv.isDarwin [ - libobjc CoreFoundation Foundation JavaNativeFoundation JavaRuntimeSupport JavaVM xcodebuild Cocoa - ]; - postUnpack = '' - # a fake mercurial dir to prevent mx crash and supply the version to mx - ( cd $sourceRoot - hg init - hg add - hg commit -m 'dummy commit' - hg tag ${lib.escapeShellArg src.rev} - hg checkout ${lib.escapeShellArg src.rev} - ) - ''; - patches = [ ./004_mx_jvmci.py.patch ] ++ - lib.optional stdenv.isDarwin [ - ./008_remove_jfr.patch ]; - postPatch ='' - # The hotspot version name regex fix - substituteInPlace mx.jvmci/mx_jvmci.py \ - --replace "\\d+.\\d+-b\\d+" "\\d+.\\d+-b[g\\d][a\\d]" - # darwin: https://github.com/oracle/graal/issues/1816 - substituteInPlace src/share/vm/code/compiledIC.cpp \ - --replace 'entry == false' '*entry == false' - ''; - hardeningDisable = [ "fortify" ]; - NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.isDarwin [ - "-Wno-reserved-user-defined-literal" - "-Wno-c++11-narrowing" - ] ++ - lib.optional stdenv.isLinux [ - "-Wno-error=format-overflow" # newly detected by gcc7 - "-Wno-error=nonnull" - ]); - - buildPhase = '' - export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild - export MX_CACHE_DIR=${makeMxCache jvmci8-mxcache} - - mx-internal --primary-suite . --vm=server -v build -DFULL_DEBUG_SYMBOLS=0 - mx-internal --primary-suite . --vm=server -v vm -version - mx-internal --primary-suite . --vm=server -v unittest - ''; - installPhase = '' - mkdir -p $out - ${if stdenv.isDarwin - then "mv openjdk1.8.0_*/darwin-amd64/product/* $out" - else "mv openjdk1.8.0_*/linux-amd64/product/* $out"} - install -v -m0555 -D $MX_CACHE_DIR/hsdis*/hsdis.so $out/jre/lib/amd64/hsdis-amd64.so - ''; - # copy-paste openjdk's preFixup - preFixup = '' - # Propagate the setJavaClassPath setup hook from the JRE so that - # any package that depends on the JRE has $CLASSPATH set up - # properly. - mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs - - # 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 - ''; - postFixup = openjdk.postFixup or null; - dontStrip = true; # stripped javac crashes with "segmentaion fault" - inherit (openjdk) meta; - }; - - graalvm8 = stdenv.mkDerivation rec { - inherit version; - pname = "graal"; - src = fetchFromGitHub { - owner = "oracle"; - repo = "graal"; - rev = "vm-${version}"; - sha256 = "0v8zkmzkyhmmmvra5pp876d4i4ijrrw15j98ipayc7is02kwiwmq"; - }; - - patches = [ ./002_setjmp.c.patch ./003_mx_truffle.py.patch ] ++ - lib.optional stdenv.isDarwin [ - ./009_remove_signedness_verifier.patch ./010_mx_substratevm.py - ]; - - nativeBuildInputs = [ gfortran ]; - - buildInputs = [ mx zlib.dev mercurial jvmci8 git llvm clang - python27withPackages icu ruby bzip2 which - readline bzip2 xz pcre curl ed - ] ++ lib.optional stdenv.isDarwin [ - CoreFoundation gcc.cc.lib libiconv perl openssl - ]; - - postUnpack = '' - ${lib.optionalString stdenv.isLinux '' - cp ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/stdlib.h \ - $sourceRoot/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include - ''} - cp ${truffleMake} $TMPDIR/truffle.make - rm $sourceRoot/truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch - - # a fake mercurial dir to prevent mx crash and supply the version to mx - ( cd $sourceRoot - hg init - hg add - hg commit -m 'dummy commit' - hg tag ${lib.escapeShellArg src.rev} - hg checkout ${lib.escapeShellArg src.rev} - ) - - # make a copy of jvmci8 - mkdir $NIX_BUILD_TOP/jvmci8 - cp -dpR ${jvmci8}/* $NIX_BUILD_TOP/jvmci8 - chmod +w -R $NIX_BUILD_TOP/jvmci8 - export MX_CACHE_DIR=${makeMxCache graal-mxcache} - export MX_GIT_CACHE_DIR=$NIX_BUILD_TOP/mxgitcache - ${makeMxGitCache graal-mxcachegit "$MX_GIT_CACHE_DIR"} - cd $TMPDIR - ''; - - postPatch = '' - substituteInPlace substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/headers/PosixDirectives.java \ - --replace '<zlib.h>' '<${zlib.dev}/include/zlib.h>' - substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/CCLinkerInvocation.java \ - --replace 'cmd.add("-v");' 'cmd.add("-v"); cmd.add("-L${zlib}/lib");' - - # For debugging native-image build, add this replace statement on CCompilerInvoker.java - # --replace '(String line : lines) {' '(String line : lines) {System.out.println("DEBUG: " + line);' - ${if stdenv.isLinux then '' - substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java \ - --replace 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "gcc");' \ - 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "${stdenv.cc}/bin/gcc");' '' - else '' - substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java \ - --replace 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "gcc");' \ - 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "${gcc.cc}/bin/gcc"); - command.add("-F"); command.add("${CoreFoundation}/Library/Frameworks"); - command.add("-framework"); command.add("CoreFoundation");' - ''} - - # prevent cyclical imports caused by identical <include> names - substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/CCLinkerInvocation.java \ - --replace 'protected String compilerCommand = "cc";' 'protected String compilerCommand = "${stdenv.cc}/bin/cc";' - # dragonegg can't seem to compile on nix, so let's not require it - substituteInPlace sulong/mx.sulong/suite.py \ - --replace '"requireDragonegg" : True,' '"requireDragonegg" : False,' - substituteInPlace truffle/mx.truffle/mx_truffle.py \ - --replace 'os.path.relpath(self.subject.delegate.dir, self.subject.suite.vc_dir)' \ - 'self.subject.delegate.dir' - substituteInPlace sulong/projects/bootstrap-toolchain-launchers/Makefile \ - --replace /bin/bash ${bash}/bin/bash - # Patch the native-image template, as it will be run during build - chmod +x vm/mx.vm/launcher_template.sh && patchShebangs vm/mx.vm - # Prevent random errors from too low maxRuntimecompilemethods - substituteInPlace truffle/mx.truffle/macro-truffle.properties \ - --replace '-H:MaxRuntimeCompileMethods=1400' \ - '-H:MaxRuntimeCompileMethods=28000' - ${lib.optionalString stdenv.isDarwin '' - substituteInPlace truffle/src/com.oracle.truffle.nfi.test.native/src/object.cc \ - --replace '#include <stdlib.h>' "" - ''} - ${lib.optionalString stdenv.isLinux '' - substituteInPlace sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include/stdlib.h \ - --replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/cstdlib"' - ''} - ''; - - buildPhase = '' - export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild - export MX_GIT_CACHE='refcache' - export JVMCI_VERSION_CHECK='ignore' - export JAVA_HOME=$NIX_BUILD_TOP/jvmci8 - export FASTR_RELEASE=true - export PKG_LDFLAGS_OVERRIDE="-L${pcre.out}/lib -L${zlib}/lib -L${gfortran.cc.lib}/lib64" - ${lib.optionalString stdenv.isDarwin '' - export CC="gcc" - export CPP="gcc -E" - export NIX_CXXSTDLIB_LINK="" - export NIX_CXXSTDLIB_LINK_FOR_TARGET="" - export OPENSSL_PREFIX=$(realpath openssl) - # this fixes error: impure path 'LibFFIHeaderDirectives' used in link - export NIX_ENFORCE_PURITY=0 - ''} - ( cd vm - mx-internal -v --suite sdk --suite compiler --suite vm --suite tools --suite regex --suite truffle \ - --dynamicimports /substratevm,/sulong,graal-js,graalpython,fastr,truffleruby build - ) - ''; - - installPhase = - (if stdenv.isDarwin then '' - mkdir -p $out - rm -rf $MX_ALT_OUTPUT_ROOT/vm/darwin-amd64/GRAALVM_*STAGE1* - cp -rf $MX_ALT_OUTPUT_ROOT/vm/darwin-amd64/GRAALVM*/graalvm-unknown-${version}/* $out - '' - else '' - mkdir -p $out - rm -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM_*STAGE1* - cp -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM*/graalvm-unknown-${version}/* $out - - # 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 - # copy static and dynamic libraries needed for static compilation - cp -rf ${glibc}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/ - cp ${glibc.static}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/ - cp ${zlib.static}/lib/libz.a $out/jre/lib/svm/clibraries/linux-amd64/libz.a - ''); - - inherit (jvmci8) preFixup; - dontStrip = true; # stripped javac crashes with "segmentaion fault" - 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 - $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' - - # Ahead-Of-Time compilation - $out/bin/native-image --no-server HelloWorld - ./helloworld - ./helloworld | fgrep 'Hello World' - - ${lib.optionalString stdenv.isLinux - '' - # Ahead-Of-Time compilation with --static (supported on linux only) - $out/bin/native-image --no-server --static HelloWorld - ./helloworld - ./helloworld | fgrep 'Hello World' - ''} - ''; - enableParallelBuilding = true; - passthru.home = graalvm8; - - meta = with lib; { - homepage = "https://github.com/oracle/graal"; - description = "High-Performance Polyglot VM"; - license = licenses.gpl2; - maintainers = with maintainers; [ volth hlolli ]; - platforms = [ "x86_64-linux" "x86_64-darwin" /*"aarch64-linux"*/ ]; - }; - }; -} diff --git a/nixpkgs/pkgs/development/compilers/graalvm/truffle.make b/nixpkgs/pkgs/development/compilers/graalvm/truffle.make deleted file mode 100644 index ec357446a5df..000000000000 --- a/nixpkgs/pkgs/development/compilers/graalvm/truffle.make +++ /dev/null @@ -1,16 +0,0 @@ -# This Makefile is used by mx to bootstrap libffi build. - -# `make MX_VERBOSE=y` will report all lines executed. The actual value doesn't -# matter as long as it's not empty. - -QUIETLY$(MX_VERBOSE) = @ - -.PHONY: default - -default: - sed -i "s|-print-multi-os-directory||g" ../$(SOURCES)/configure - $(QUIETLY) echo CONFIGURE libffi - $(QUIETLY) mkdir ../$(OUTPUT) - $(QUIETLY) cd ../$(OUTPUT) && ../$(SOURCES)/configure $(CONFIGURE_ARGS) - $(QUIETLY) echo MAKE libffi - $(QUIETLY) $(MAKE) -C ../$(OUTPUT) diff --git a/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix b/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix index 512e0aa0247b..5f99fb10cee2 100644 --- a/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix +++ b/nixpkgs/pkgs/development/compilers/jrsonnet/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, rustPlatform }: +{ stdenv, lib, fetchFromGitHub, rustPlatform, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "jrsonnet"; @@ -11,8 +11,17 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-OX+iJJ3vdCsWWr8x31psV9Vne6xWDZnJc83NbJqMK1A="; }; + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' ln -s $out/bin/jrsonnet $out/bin/jsonnet + + for shell in bash zsh fish; do + installShellCompletion --cmd jrsonnet \ + --$shell <($out/bin/jrsonnet --generate $shell /dev/null) + installShellCompletion --cmd jsonnet \ + --$shell <($out/bin/jrsonnet --generate $shell /dev/null | sed s/jrsonnet/jsonnet/g) + done ''; cargoSha256 = "sha256-eFfAU9Q3nYAJK+kKP1Y6ONjOIfkuYTlelrFrEW9IJ8c="; diff --git a/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix b/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix index d8640228513e..ad6083a1ea3b 100644 --- a/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix +++ b/nixpkgs/pkgs/development/compilers/julia/1.6-bin.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "julia-bin"; - version = "1.6.2"; + version = "1.6.3"; src = { x86_64-linux = fetchurl { url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz"; - sha256 = "0h1jh8gbvxb0pl1an0fbbg4lbd0sa24yj2f4yqwavw8dbdvvbd1y"; + sha256 = "0jrijj9snfx70692z2301rjassvwjcsjbxdsjyif9hyp9hrrqif7"; }; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -20,7 +20,6 @@ stdenv.mkDerivation rec { patches = [ # Source release Nix patch(es) relevant for binary releases as well. ./patches/1.6-bin/0002-nix-Skip-tempname-test-broken-in-sandbox.patch - ./patches/1.6-bin/0003-nix-Skip-chown-tests-broken-in-sandbox.patch ./patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch ]; postPatch = '' diff --git a/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0003-nix-Skip-chown-tests-broken-in-sandbox.patch b/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0003-nix-Skip-chown-tests-broken-in-sandbox.patch deleted file mode 100644 index e63c88c8fe3b..000000000000 --- a/nixpkgs/pkgs/development/compilers/julia/patches/1.6-bin/0003-nix-Skip-chown-tests-broken-in-sandbox.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b20357fb1044d2c100172b1d5cbdf6c6d9bd3590 Mon Sep 17 00:00:00 2001 -From: Pontus Stenetorp <pontus@stenetorp.se> -Date: Thu, 8 Apr 2021 05:10:39 +0000 -Subject: [PATCH 3/6] nix: Skip `chown` tests broken in sandbox - ---- - test/file.jl | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/file.jl b/test/file.jl -index bd4dd78f62..06fd4e49da 100644 ---- a/test/file.jl -+++ b/test/file.jl -@@ -503,8 +503,8 @@ if !Sys.iswindows() - @test stat(file).gid == 0 - @test stat(file).uid == 0 - else -- @test_throws Base._UVError("chown($(repr(file)), -2, -1)", Base.UV_EPERM) chown(file, -2, -1) # Non-root user cannot change ownership to another user -- @test_throws Base._UVError("chown($(repr(file)), -1, -2)", Base.UV_EPERM) chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup) -+ @test_skip @test_throws Base._UVError("chown($(repr(file)), -2, -1)", Base.UV_EPERM) chown(file, -2, -1) # Non-root user cannot change ownership to another user -+ @test_skip @test_throws Base._UVError("chown($(repr(file)), -1, -2)", Base.UV_EPERM) chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup) - end - else - # test that chown doesn't cause any errors for Windows --- -2.29.3 - diff --git a/nixpkgs/pkgs/development/compilers/koka/default.nix b/nixpkgs/pkgs/development/compilers/koka/default.nix index 0b88bc1ab1c9..26c855e4ddb7 100644 --- a/nixpkgs/pkgs/development/compilers/koka/default.nix +++ b/nixpkgs/pkgs/development/compilers/koka/default.nix @@ -1,15 +1,15 @@ { stdenv, pkgsHostTarget, cmake, makeWrapper, mkDerivation, fetchFromGitHub , alex, array, base, bytestring, cond, containers, directory, extra -, filepath, haskeline, hpack, hspec, hspec-core, json, lib, mtl +, filepath, hpack, hspec, hspec-core, isocline, json, lib, mtl , parsec, process, regex-compat, text, time }: let - version = "2.1.9"; + version = "2.3.1"; src = fetchFromGitHub { owner = "koka-lang"; repo = "koka"; rev = "v${version}"; - sha256 = "0xny4x1a2lzwgmng60bni7rxfjx5ns70qbfp703qwms54clvj5wy"; + sha256 = "18f4hsqgc6c0cnayabj311n438fjhf217j1kjaysa8w4k4pxl58z"; fetchSubmodules = true; }; kklib = stdenv.mkDerivation { @@ -33,14 +33,13 @@ mkDerivation rec { isExecutable = true; libraryToolDepends = [ hpack ]; executableHaskellDepends = [ - array base bytestring cond containers directory haskeline mtl + array base bytestring cond containers directory isocline mtl parsec process text time kklib ]; executableToolDepends = [ alex makeWrapper ]; postInstall = '' mkdir -p $out/share/koka/v${version} cp -a lib $out/share/koka/v${version} - cp -a contrib $out/share/koka/v${version} cp -a kklib $out/share/koka/v${version} wrapProgram "$out/bin/koka" \ --set CC "${lib.getBin cc}/bin/${cc.targetPrefix}cc" \ @@ -50,6 +49,7 @@ mkDerivation rec { prePatch = "hpack"; description = "Koka language compiler and interpreter"; homepage = "https://github.com/koka-lang/koka"; + changelog = "${homepage}/blob/master/doc/spec/news.mdk"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ siraben sternenseemann ]; } diff --git a/nixpkgs/pkgs/development/compilers/ligo/default.nix b/nixpkgs/pkgs/development/compilers/ligo/default.nix new file mode 100644 index 000000000000..f9b8020c924c --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/ligo/default.nix @@ -0,0 +1,62 @@ +{ lib +, fetchFromGitLab +, coq +, cacert +}: + +coq.ocamlPackages.buildDunePackage rec { + pname = "ligo"; + version = "0.26.0"; + src = fetchFromGitLab { + owner = "ligolang"; + repo = "ligo"; + rev = "d48098c6724bc0a62170c2f9ff73c792c71c8452"; + sha256 = "sha256-uu5985llYsi/9ExKZetk48FqU0sJQB1EirdT/pUw0DA="; + }; + + # The build picks this up for ligo --version + LIGO_VERSION=version; + + useDune2 = true; + + buildInputs = with coq.ocamlPackages; [ + coq + menhir + menhirLib + qcheck + ocamlgraph + ppx_deriving + ppx_deriving_yojson + ppx_expect + tezos-base + tezos-shell-services + tezos-010-PtGRANAD-test-helpers + tezos-protocol-010-PtGRANAD-parameters + tezos-protocol-010-PtGRANAD + tezos-protocol-environment + yojson + getopt + terminal_size + pprint + linenoise + data-encoding + bisect_ppx + cmdliner + ]; + + checkInputs = [ + cacert + coq.ocamlPackages.ca-certs + ]; + + doCheck = true; + + meta = with lib; { + homepage = "https://ligolang.org/"; + downloadPage = "https://ligolang.org/docs/intro/installation"; + description = "A friendly Smart Contract Language for Tezos"; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ ulrikstrid ]; + }; +} 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 faba5d97b79d..657a465a3fe7 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation { ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory ./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15 ./gnu-install-dirs.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-11.patch ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; 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 e5b79692ae24..1111f14f9bea 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt/default.nix @@ -58,6 +58,7 @@ stdenv.mkDerivation { # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # extra `/`. ./normalize-var.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-11.patch ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix index 8fc32bbd0aec..403924547bfa 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/13/compiler-rt/default.nix @@ -5,7 +5,7 @@ let useLLVM = stdenv.hostPlatform.useLLVM or false; bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none"; haveLibc = stdenv.cc.libc != null; - inherit (stdenv.hostPlatform) isMusl; + inherit (stdenv.hostPlatform) isMusl isAarch64; in @@ -27,10 +27,11 @@ stdenv.mkDerivation { "-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 || isAarch64) [ + "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" ] ++ 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" @@ -110,7 +111,5 @@ 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 ]; - # TODO/FIXME: Build fails on Hydra: - broken = stdenv.isAarch64; }; } diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix index 4605b87846fd..9fd4cd98901d 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/13/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/13/default.nix @@ -19,7 +19,7 @@ let release_version = "13.0.0"; - candidate = "rc4"; # empty or "rcN" + candidate = ""; # empty or "rcN" dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; rev = ""; # When using a Git commit rev-version = ""; # When using a Git commit diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix index 7fadc6d6dcac..6267678c46d5 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/13/libcxxabi/default.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation rec { 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} ''; 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 9f937ed140fd..c684437cefdb 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt/default.nix @@ -57,7 +57,8 @@ stdenv.mkDerivation { ./gnu-install-dirs.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ./sys-ustat.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch + ++ [ ../../common/compiler-rt/libsanitizer-no-cyclades-9.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 diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/llvm/default.nix index 54fd783a7c2d..6388cd65fbf4 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/5/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/5/llvm/default.nix @@ -82,6 +82,9 @@ stdenv.mkDerivation ({ substituteInPlace unittests/Support/CMakeLists.txt \ --replace "Path.cpp" "" rm unittests/Support/Path.cpp + + # llvm-5 does not support dwarf-5 style info, fails on gcc-11. + rm test/tools/llvm-symbolizer/print_context.c '' + optionalString stdenv.isAarch64 '' patch -p0 < ${../../aarch64.patch} '' + optionalString stdenv.hostPlatform.isMusl '' 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 7ee0943a8886..74c17fd3e647 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt/default.nix @@ -55,6 +55,7 @@ stdenv.mkDerivation { # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce ../../common/compiler-rt/glibc.patch ./gnu-install-dirs.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; 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 f6190b799189..6ea1280a4033 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation { ../../common/compiler-rt/glibc.patch ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory ./gnu-install-dirs.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch ] ++ lib.optional (useLLVM) ./crtbegin-and-end.patch ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; 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 bbaae803738d..62672b336fff 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation { ../../common/compiler-rt/glibc.patch ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory ./gnu-install-dirs.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional (useLLVM) ./crtbegin-and-end.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; 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 4dc75bd1c14c..83a75f516a05 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation { ../../common/compiler-rt/glibc.patch ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory ./gnu-install-dirs.patch + ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch new file mode 100644 index 000000000000..890230cc14ee --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-11.patch @@ -0,0 +1,80 @@ +https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch +https://reviews.llvm.org/D102059 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -370,15 +370,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_GLIBC + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include <sys/procfs.h> + #endif + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_GLIBC + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz; + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ax25_parms_struct_sz; +-extern unsigned struct_cyclades_monitor_sz; + extern unsigned struct_input_keymap_entry_sz; + extern unsigned struct_ipx_config_data_sz; + extern unsigned struct_kbdiacrs_sz; +@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE; + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +-extern unsigned IOCTL_CYGETDEFTHRESH; +-extern unsigned IOCTL_CYGETDEFTIMEOUT; +-extern unsigned IOCTL_CYGETMON; +-extern unsigned IOCTL_CYGETTHRESH; +-extern unsigned IOCTL_CYGETTIMEOUT; +-extern unsigned IOCTL_CYSETDEFTHRESH; +-extern unsigned IOCTL_CYSETDEFTIMEOUT; +-extern unsigned IOCTL_CYSETTHRESH; +-extern unsigned IOCTL_CYSETTIMEOUT; + extern unsigned IOCTL_EQL_EMANCIPATE; + extern unsigned IOCTL_EQL_ENSLAVE; + extern unsigned IOCTL_EQL_GETMASTRCFG; diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch new file mode 100644 index 000000000000..7ef02a169269 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch @@ -0,0 +1,80 @@ +https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch +https://reviews.llvm.org/D102059 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -370,15 +370,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_GLIBC + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include <sys/procfs.h> + #endif + #include <sys/user.h> +-#include <linux/cyclades.h> + #include <linux/if_eql.h> + #include <linux/if_plip.h> + #include <linux/lp.h> +@@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_GLIBC + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x010000) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; + unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz; + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ax25_parms_struct_sz; +- extern unsigned struct_cyclades_monitor_sz; + extern unsigned struct_input_keymap_entry_sz; + extern unsigned struct_ipx_config_data_sz; + extern unsigned struct_kbdiacrs_sz; +@@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE; + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- extern unsigned IOCTL_CYGETDEFTHRESH; +- extern unsigned IOCTL_CYGETDEFTIMEOUT; +- extern unsigned IOCTL_CYGETMON; +- extern unsigned IOCTL_CYGETTHRESH; +- extern unsigned IOCTL_CYGETTIMEOUT; +- extern unsigned IOCTL_CYSETDEFTHRESH; +- extern unsigned IOCTL_CYSETDEFTIMEOUT; +- extern unsigned IOCTL_CYSETTHRESH; +- extern unsigned IOCTL_CYSETTIMEOUT; + extern unsigned IOCTL_EQL_EMANCIPATE; + extern unsigned IOCTL_EQL_ENSLAVE; + extern unsigned IOCTL_EQL_GETMASTRCFG; diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix index 7fadc6d6dcac..6267678c46d5 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/libcxxabi/default.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation rec { 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} ''; diff --git a/nixpkgs/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix index cd277f5149d9..6ea4fb281f8f 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, version, src, cmake, python3, llvm, libcxxabi }: +{ stdenv, lib, version, src, cmake, python3, llvm, libcxxabi, fetchpatch }: stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version src; @@ -31,7 +31,13 @@ stdenv.mkDerivation rec { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - ]; + (fetchpatch { + name = "libsanitizer-no-cyclades-rocm.patch"; + url = "https://gist.github.com/lovesegfault/b255dcf2fa4e202411a6a04b61e6cc04/raw"; + sha256 = "sha256-PMMSLr2zHuNDn1OWqumqHwB74ktJSHxhJWkqEKB7Z64="; + stripLen = 1; + }) + ]; # 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/mint/default.nix b/nixpkgs/pkgs/development/compilers/mint/default.nix index adb7490785e4..a226c7edba45 100644 --- a/nixpkgs/pkgs/development/compilers/mint/default.nix +++ b/nixpkgs/pkgs/development/compilers/mint/default.nix @@ -1,9 +1,5 @@ -{ lib, fetchFromGitHub, crystal_1_0, openssl }: +{ lib, fetchFromGitHub, crystal, openssl }: -let - crystal = crystal_1_0; - -in crystal.buildCrystalPackage rec { version = "0.14.0"; pname = "mint"; diff --git a/nixpkgs/pkgs/development/compilers/nextpnr/default.nix b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix index 949c70318ace..07d301187a8e 100644 --- a/nixpkgs/pkgs/development/compilers/nextpnr/default.nix +++ b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake -, boost, python3, eigen +, boost, python3, eigen, python3Packages , icestorm, trellis , llvmPackages @@ -14,21 +14,21 @@ let in stdenv.mkDerivation rec { pname = "nextpnr"; - version = "2021.08.16"; + version = "2021.09.27"; srcs = [ (fetchFromGitHub { owner = "YosysHQ"; repo = "nextpnr"; - rev = "b37d133c43c45862bd5c550b5d7fffaa8c49b968"; - sha256 = "0qc9d8cay2j5ggn0mgjq484vv7a14na16s9dmp7bqz7r9cn4b98n"; + rev = "9d8d3bdbc48133ff7758c9c5293e5904bc6e5ba7"; + sha256 = "sha256-5Axo8qX2+ATqQ170QqfhRwYfCRQLCKBW1kc89x9XljE="; name = "nextpnr"; }) (fetchFromGitHub { owner = "YosysHQ"; repo = "nextpnr-tests"; rev = "ccc61e5ec7cc04410462ec3196ad467354787afb"; - sha256 = "09a0bhrphr3rsppryrfak4rhziyj8k3s17kgb0vgm0abjiz0jgam"; + sha256 = "sha256-VT0JfpRLgfo2WG+eoMdE0scPM5nKZZ/v1XlkeDNcQCU="; name = "nextpnr-tests"; }) ]; @@ -39,17 +39,18 @@ stdenv.mkDerivation rec { = [ cmake ] ++ (lib.optional enableGui wrapQtAppsHook); buildInputs - = [ boostPython python3 eigen ] + = [ boostPython python3 eigen python3Packages.apycula ] ++ (lib.optional enableGui qtbase) ++ (lib.optional stdenv.cc.isClang llvmPackages.openmp); cmakeFlags = [ "-DCURRENT_GIT_VERSION=${lib.substring 0 7 (lib.elemAt srcs 0).rev}" - "-DARCH=generic;ice40;ecp5" + "-DARCH=generic;ice40;ecp5;gowin" "-DBUILD_TESTS=ON" "-DICESTORM_INSTALL_PREFIX=${icestorm}" "-DTRELLIS_INSTALL_PREFIX=${trellis}" "-DTRELLIS_LIBDIR=${trellis}/lib/trellis" + "-DGOWIN_BBA_EXECUTABLE=${python3Packages.apycula}/bin/gowin_bba" "-DUSE_OPENMP=ON" # warning: high RAM usage "-DSERIALIZE_CHIPDBS=OFF" @@ -60,7 +61,7 @@ stdenv.mkDerivation rec { patchPhase = with builtins; '' # use PyPy for icestorm if enabled - substituteInPlace ./ice40/family.cmake \ + substituteInPlace ./ice40/CMakeLists.txt \ --replace ''\'''${PYTHON_EXECUTABLE}' '${icestorm.pythonInterp}' ''; @@ -74,6 +75,7 @@ stdenv.mkDerivation rec { wrapQtApp $out/bin/nextpnr-generic wrapQtApp $out/bin/nextpnr-ice40 wrapQtApp $out/bin/nextpnr-ecp5 + wrapQtApp $out/bin/nextpnr-gowin ''; meta = with lib; { diff --git a/nixpkgs/pkgs/development/compilers/nim/default.nix b/nixpkgs/pkgs/development/compilers/nim/default.nix index 7434347f2a28..16896c8b6c05 100644 --- a/nixpkgs/pkgs/development/compilers/nim/default.nix +++ b/nixpkgs/pkgs/development/compilers/nim/default.nix @@ -72,15 +72,17 @@ let nimHost = parsePlatform stdenv.hostPlatform; nimTarget = parsePlatform stdenv.targetPlatform; - bootstrapCompiler = stdenv.mkDerivation rec { + bootstrapCompiler = let + revision = "561b417c65791cd8356b5f73620914ceff845d10"; + in stdenv.mkDerivation { pname = "nim-bootstrap"; - version = "0.20.0"; + version = "g${lib.substring 0 7 revision}"; src = fetchgit { # A Git checkout is much smaller than a GitHub tarball. - url = "https://github.com/nim-lang/csources.git"; - rev = "v${version}"; - sha256 = "0i6vsfy1sgapx43n226q8m0pvn159sw2mhp50zm3hhb9zfijanis"; + url = "https://github.com/nim-lang/csources_v1.git"; + rev = revision; + sha256 = "1c2k681knrha1zmf4abhb32i2wwd3nwflzylnqryxk753swla043"; }; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix index 256242e9cbb5..4bfa949fa885 100644 --- a/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix +++ b/nixpkgs/pkgs/development/compilers/ocaml/4.13.nix @@ -1,6 +1,6 @@ import ./generic.nix { major_version = "4"; minor_version = "13"; - patch_version = "0"; - sha256 = "sha256:1f7gnndzs6qcyy2gnzalnhm808pifxhvxg2qp5dnsziz6li7x303"; + patch_version = "1"; + sha256 = "sha256:1s7xwqidpjwfhnpfma4nb93gxfr7g9jfn03s1j03iyavmpgph7ck"; } diff --git a/nixpkgs/pkgs/development/compilers/rust/1_45.nix b/nixpkgs/pkgs/development/compilers/rust/1_45.nix index f499fc9e9b08..2c695f1844dc 100644 --- a/nixpkgs/pkgs/development/compilers/rust/1_45.nix +++ b/nixpkgs/pkgs/development/compilers/rust/1_45.nix @@ -10,7 +10,7 @@ { stdenv, lib , buildPackages , newScope, callPackage -, CoreFoundation, Security +, CoreFoundation, Security, SystemConfiguration , pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost , makeRustPlatform , llvmPackages_5, llvm_10 diff --git a/nixpkgs/pkgs/development/compilers/rust/1_55.nix b/nixpkgs/pkgs/development/compilers/rust/1_55.nix index 715a82de5adf..edd1f538e398 100644 --- a/nixpkgs/pkgs/development/compilers/rust/1_55.nix +++ b/nixpkgs/pkgs/development/compilers/rust/1_55.nix @@ -12,7 +12,7 @@ { stdenv, lib , buildPackages , newScope, callPackage -, CoreFoundation, Security +, CoreFoundation, Security, SystemConfiguration , pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost , makeRustPlatform , llvmPackages_11 diff --git a/nixpkgs/pkgs/development/compilers/rust/default.nix b/nixpkgs/pkgs/development/compilers/rust/default.nix index 3e6f3a044fb4..7912055db624 100644 --- a/nixpkgs/pkgs/development/compilers/rust/default.nix +++ b/nixpkgs/pkgs/development/compilers/rust/default.nix @@ -14,7 +14,7 @@ { stdenv, lib , buildPackages , newScope, callPackage -, CoreFoundation, Security +, CoreFoundation, Security, SystemConfiguration , pkgsBuildTarget, pkgsBuildBuild , makeRustPlatform }: rec { @@ -104,7 +104,7 @@ inherit CoreFoundation Security; }; clippy = self.callPackage ./clippy.nix { inherit Security; }; - rls = self.callPackage ./rls { inherit CoreFoundation Security; }; + rls = self.callPackage ./rls { inherit CoreFoundation Security SystemConfiguration; }; }); }; } diff --git a/nixpkgs/pkgs/development/compilers/rust/rls/default.nix b/nixpkgs/pkgs/development/compilers/rust/rls/default.nix index aa55866def51..036031d98fae 100644 --- a/nixpkgs/pkgs/development/compilers/rust/rls/default.nix +++ b/nixpkgs/pkgs/development/compilers/rust/rls/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, makeWrapper, fetchFromGitHub, rustPlatform , openssh, openssl, pkg-config, cmake, zlib, curl, libiconv -, CoreFoundation, Security }: +, CoreFoundation, Security, SystemConfiguration }: rustPlatform.buildRustPackage rec { pname = "rls"; @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config cmake makeWrapper ]; buildInputs = [ openssh openssl curl zlib libiconv rustPlatform.rust.rustc.llvm ] - ++ (lib.optionals stdenv.isDarwin [ CoreFoundation Security ]); + ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security SystemConfiguration ]; doCheck = true; diff --git a/nixpkgs/pkgs/development/compilers/sbcl/2.0.8.nix b/nixpkgs/pkgs/development/compilers/sbcl/2.0.8.nix index 1784bf672b31..bbc171a8d986 100644 --- a/nixpkgs/pkgs/development/compilers/sbcl/2.0.8.nix +++ b/nixpkgs/pkgs/development/compilers/sbcl/2.0.8.nix @@ -1,4 +1,4 @@ import ./common.nix { - version = "2.1.2"; - sha256 = "sha256-t3EFUJOYVe1JWYxKAUSD7RILaZFliio7avpHcT3OTAs="; + version = "2.0.8"; + sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390"; } diff --git a/nixpkgs/pkgs/development/compilers/sbcl/2.1.8.nix b/nixpkgs/pkgs/development/compilers/sbcl/2.1.8.nix deleted file mode 100644 index 3c450f1ba196..000000000000 --- a/nixpkgs/pkgs/development/compilers/sbcl/2.1.8.nix +++ /dev/null @@ -1,4 +0,0 @@ -import ./common.nix { - version = "2.1.8"; - sha256 = "0ijmw8adyf6fgaq4ixdj9v5lfg3cs9wyxhb96wxhfld0rjpppsm3"; -} diff --git a/nixpkgs/pkgs/development/compilers/sbcl/2.1.9.nix b/nixpkgs/pkgs/development/compilers/sbcl/2.1.9.nix new file mode 100644 index 000000000000..da26a9aeffb7 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/sbcl/2.1.9.nix @@ -0,0 +1,4 @@ +import ./common.nix { + version = "2.1.9"; + sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y"; +} diff --git a/nixpkgs/pkgs/development/compilers/tinycc/default.nix b/nixpkgs/pkgs/development/compilers/tinycc/default.nix index 03e8be7053a2..b46dee899a33 100644 --- a/nixpkgs/pkgs/development/compilers/tinycc/default.nix +++ b/nixpkgs/pkgs/development/compilers/tinycc/default.nix @@ -1,36 +1,38 @@ -{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }: -with lib; +{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo, which }: stdenv.mkDerivation rec { pname = "tcc"; - version = "0.9.27"; - upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}"; + version = "unstable-2021-10-09"; src = fetchFromRepoOrCz { repo = "tinycc"; - rev = upstreamVersion; - sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977"; + rev = "ca11849ebb88ef4ff87beda46bf5687e22949bd6"; + sha256 = "sha256-xnUDyTYZxbxUCblACyX73boBhU073VRqSy1SWlWsvIw="; }; - nativeBuildInputs = [ perl texinfo ]; + nativeBuildInputs = [ perl texinfo which ]; hardeningDisable = [ "fortify" ]; - enableParallelBuilding = true; - postPatch = '' - substituteInPlace "texi2pod.pl" \ - --replace "/usr/bin/perl" "${perl}/bin/perl" + patchShebangs texi2pod.pl ''; + configureFlags = [ + "--cc=$CC" + "--ar=$AR" + "--crtprefix=${lib.getLib stdenv.cc.libc}/lib" + "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include" + "--libpaths=${lib.getLib stdenv.cc.libc}/lib" + # build cross compilers + "--enable-cross" + ] ++ lib.optionals stdenv.hostPlatform.isMusl [ + "--config-musl" + ]; + preConfigure = '' echo ${version} > VERSION - - configureFlagsArray+=("--cc=cc") configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)") - configureFlagsArray+=("--crtprefix=${getLib stdenv.cc.libc}/lib") - configureFlagsArray+=("--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include") - configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib") ''; postFixup = '' @@ -47,9 +49,8 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; - meta = { + meta = with lib; { description = "Small, fast, and embeddable C compiler and interpreter"; - longDescription = '' TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike other C compilers, it is meant to be self-sufficient: you do not @@ -73,11 +74,9 @@ stdenv.mkDerivation rec { With libtcc, you can use TCC as a backend for dynamic code generation. ''; - - homepage = "http://www.tinycc.org/"; - license = licenses.mit; - - platforms = [ "x86_64-linux" ]; + homepage = "https://repo.or.cz/tinycc.git"; + license = licenses.lgpl21Only; + platforms = platforms.linux; maintainers = [ maintainers.joachifm ]; }; } diff --git a/nixpkgs/pkgs/development/compilers/vala/default.nix b/nixpkgs/pkgs/development/compilers/vala/default.nix index 809e81ae548b..ba64e53876cb 100644 --- a/nixpkgs/pkgs/development/compilers/vala/default.nix +++ b/nixpkgs/pkgs/development/compilers/vala/default.nix @@ -42,6 +42,8 @@ let "0.52" = ./disable-graphviz-0.46.1.patch; + "0.54" = ./disable-graphviz-0.46.1.patch; + }.${lib.versions.majorMinor version} or (throw "no graphviz patch for this version of vala"); disableGraphviz = lib.versionAtLeast version "0.38" && !withGraphviz; @@ -89,10 +91,11 @@ let doCheck = false; # fails, requires dbus daemon passthru = { - updateScript = gnome.updateScript { - attrPath = "${pname}_${lib.versions.major version}_${lib.versions.minor version}"; - packageName = pname; - }; + updateScript = gnome.updateScript { + attrPath = "${pname}_${lib.versions.major version}_${lib.versions.minor version}"; + packageName = pname; + freeze = true; + }; }; meta = with lib; { @@ -100,7 +103,7 @@ let homepage = "https://wiki.gnome.org/Projects/Vala"; license = licenses.lgpl21Plus; platforms = platforms.unix; - maintainers = with maintainers; [ antono jtojnar peterhoeg maxeaubrey ] ++ teams.pantheon.members; + maintainers = with maintainers; [ antono jtojnar maxeaubrey ] ++ teams.pantheon.members; }; }); @@ -130,5 +133,10 @@ in rec { sha256 = "sha256-hKG7MSs+Xcrkt7JcRVmNN14stpIzzvtZoV0jUMdr3ZE="; }; - vala = vala_0_52; + vala_0_54 = generic { + version = "0.54.1"; + sha256 = "0jlhd6hr9mai7hhc2c78w6zmnzf7xncp7fhyiavkqqzhhsn7gpjx"; + }; + + vala = vala_0_54; } diff --git a/nixpkgs/pkgs/development/compilers/vyper/default.nix b/nixpkgs/pkgs/development/compilers/vyper/default.nix index 431afe5ec205..4308710717ac 100644 --- a/nixpkgs/pkgs/development/compilers/vyper/default.nix +++ b/nixpkgs/pkgs/development/compilers/vyper/default.nix @@ -14,11 +14,11 @@ in buildPythonPackage rec { pname = "vyper"; - version = "0.2.16"; + version = "0.3.0"; src = fetchPypi { inherit pname version; - sha256 = "6cf347440716964012d46686faefc9c689f01872f19736287a63aa8652ac3ddd"; + sha256 = "3e50cd802696ea3f5e6ab1bf4c9a90a39c332591d416c99f3d2fa93d7d7ba394"; }; nativeBuildInputs = [ pytest-runner ]; diff --git a/nixpkgs/pkgs/development/compilers/yap/default.nix b/nixpkgs/pkgs/development/compilers/yap/default.nix index da10125c2433..4428d4dbba65 100644 --- a/nixpkgs/pkgs/development/compilers/yap/default.nix +++ b/nixpkgs/pkgs/development/compilers/yap/default.nix @@ -20,7 +20,6 @@ stdenv.mkDerivation rec { description = "A ISO-compatible high-performance Prolog compiler"; license = lib.licenses.artistic2; - maintainers = [ lib.maintainers.peti ]; platforms = lib.platforms.linux; broken = !stdenv.is64bit; # the linux 32 bit build fails. }; diff --git a/nixpkgs/pkgs/development/compilers/yosys/default.nix b/nixpkgs/pkgs/development/compilers/yosys/default.nix index 7a733ce2cb9b..f2624d124185 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+4276"; + version = "0.10+1"; src = fetchFromGitHub { owner = "YosysHQ"; repo = "yosys"; - rev = "75a4cdfc8afc10fed80e43fb1ba31c7edaf6e361"; - sha256 = "13xb7ny6i0kr6z6xkj9wmmcj551si7w05r3cghq8h8wkikyh6c8p"; + rev = "7a7df9a3b4996b17bb774377483b15de49aa3d9b"; + sha256 = "sha256-gi/Q6loIQ75NTbS9b/Q8sdrl9NGBDae2+AAGHVYB0WI="; }; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/development/compilers/zz/default.nix b/nixpkgs/pkgs/development/compilers/zz/default.nix index a0bf9a9ad8ff..156a4c17bc2c 100644 --- a/nixpkgs/pkgs/development/compilers/zz/default.nix +++ b/nixpkgs/pkgs/development/compilers/zz/default.nix @@ -1,20 +1,27 @@ -{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3 }: +{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3, pkgsHostTarget }: + +let + runtimeDeps = [ + z3 + pkgsHostTarget.targetPackages.stdenv.cc + ]; +in rustPlatform.buildRustPackage rec { pname = "zz"; - version = "unstable-2021-03-07"; + version = "unstable-2021-05-04"; # when updating, choose commit of the latest build on http://bin.zetz.it/ src = fetchFromGitHub { owner = "zetzit"; repo = "zz"; - rev = "d3fc968ba2ae6668f930e39077f9a90aecb9fdc4"; - sha256 = "18p17lgwq6rq1n76sj0dwb32bpxflfd7knky1v0sgmaxfpaq04y3"; + rev = "18020b10b933cfe2fc7f2256b71e646889f9b1d2"; + sha256 = "01nlyyk1qxk76dq2hw3wpbjwkh27zzp6mpczjnxdpv6rxs7mc825"; }; nativeBuildInputs = [ makeWrapper ]; - cargoSha256 = "03xdmm4993hqdb3cihjjv4n4mdk8lnlccva08fh6m1d56p807rni"; + cargoSha256 = "080rd8x4jsssnx4il80xcb81iw8pjcm70zckpa1hcijkw9104dgs"; postPatch = '' # remove search path entry which would reference /build @@ -26,7 +33,7 @@ rustPlatform.buildRustPackage rec { cp -r modules "$out/share/zz/" wrapProgram $out/bin/zz \ - --prefix PATH ":" "${lib.getBin z3}/bin" \ + --prefix PATH ":" "${lib.makeBinPath runtimeDeps}" \ --suffix ZZ_MODULE_PATHS ":" "$out/share/zz/modules" ''; |