diff options
Diffstat (limited to 'pkgs/development/compilers')
10 files changed, 47 insertions, 40 deletions
diff --git a/pkgs/development/compilers/bs-platform/build-bs-platform.nix b/pkgs/development/compilers/bs-platform/build-bs-platform.nix index c73bb72b9d0f8..1097e7d3f81fb 100644 --- a/pkgs/development/compilers/bs-platform/build-bs-platform.nix +++ b/pkgs/development/compilers/bs-platform/build-bs-platform.nix @@ -1,7 +1,7 @@ # This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix # to make potential future updates simpler -{ lib, stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3, +{ lib, stdenv, ninja, runCommand, nodejs, python3, ocaml-version, version, src, patches ? [], ocaml ? (import ./ocaml.nix { @@ -15,7 +15,8 @@ tar zxvf ${src}/vendor/ninja.tar.gz -C $out ''; patches = []; - })) + })), + ... }: let diff --git a/pkgs/development/compilers/dotnet/vmr.nix b/pkgs/development/compilers/dotnet/vmr.nix index 3638da1117e9b..fe5880f54c1d9 100644 --- a/pkgs/development/compilers/dotnet/vmr.nix +++ b/pkgs/development/compilers/dotnet/vmr.nix @@ -2,7 +2,6 @@ , stdenvNoCC , lib , fetchurl -, fetchFromGitHub , dotnetCorePackages , jq , curl diff --git a/pkgs/development/compilers/elm/packages/node/node-packages.nix b/pkgs/development/compilers/elm/packages/node/node-packages.nix index 0efccbb5ff90a..3c7d770bdf482 100644 --- a/pkgs/development/compilers/elm/packages/node/node-packages.nix +++ b/pkgs/development/compilers/elm/packages/node/node-packages.nix @@ -9283,13 +9283,13 @@ let sha512 = "y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw=="; }; }; - "node-watch-0.5.5" = { + "node-watch-0.7.4" = { name = "node-watch"; packageName = "node-watch"; - version = "0.5.5"; + version = "0.7.4"; src = fetchurl { - url = "https://registry.npmjs.org/node-watch/-/node-watch-0.5.5.tgz"; - sha512 = "z9xN2ibI6P0UylFadN7oMcIMsoTeCENC0rZyRM5MVK9AqzSPx+uGqKG6KMPeC/laOV4wOGZq/GH0PTstRNSqOA=="; + url = "https://registry.npmjs.org/node-watch/-/node-watch-0.7.4.tgz"; + sha512 = "RinNxoz4W1cep1b928fuFhvAQ5ag/+1UlMDV7rbyGthBIgsiEouS4kvRayvvboxii4m8eolKOIBo3OjDqbc+uQ=="; }; }; "nopt-1.0.10" = { @@ -14795,7 +14795,7 @@ in sources."minimist-1.2.0" sources."ms-2.0.0" sources."negotiator-0.6.3" - sources."node-watch-0.5.5" + sources."node-watch-0.7.4" sources."oauth-sign-0.9.0" sources."on-finished-2.3.0" sources."opn-5.4.0" diff --git a/pkgs/development/compilers/gleam/default.nix b/pkgs/development/compilers/gleam/default.nix index 7e5fd44916b5e..e61a42f4efebb 100644 --- a/pkgs/development/compilers/gleam/default.nix +++ b/pkgs/development/compilers/gleam/default.nix @@ -12,13 +12,13 @@ rustPlatform.buildRustPackage rec { pname = "gleam"; - version = "1.1.0"; + version = "1.2.0"; src = fetchFromGitHub { owner = "gleam-lang"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-3DlsqUBAKF3zgiS26YQY1MzymLg9GnVzH1HMpbYv5Dc="; + hash = "sha256-P0IHO/rO3uHpSfWX+GVuMGuzux1ObGiNsSCCVP+wv5k="; }; nativeBuildInputs = [ git pkg-config ]; @@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; - cargoHash = "sha256-KROGDBOsx1WTzv7IhJ3WWLJJ9zvrmZI5poJCr2tFcLY="; + cargoHash = "sha256-5KraSw/CtYZ4Al8VQszvuL/ubEVeQOppRRH5SQ8tsA0="; passthru.updateScript = nix-update-script { }; @@ -35,6 +35,6 @@ rustPlatform.buildRustPackage rec { mainProgram = "gleam"; homepage = "https://gleam.run/"; license = licenses.asl20; - maintainers = teams.beam.members; + maintainers = teams.beam.members ++ [ lib.maintainers.philtaken ]; }; } diff --git a/pkgs/development/compilers/go/1.22.nix b/pkgs/development/compilers/go/1.22.nix index c0103090b3314..aad242c886069 100644 --- a/pkgs/development/compilers/go/1.22.nix +++ b/pkgs/development/compilers/go/1.22.nix @@ -37,6 +37,7 @@ let "riscv64" = "riscv64"; "s390x" = "s390x"; "x86_64" = "amd64"; + "wasm32" = "wasm"; }.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}"); # We need a target compiler which is still runnable at build time, @@ -90,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: { ./go_no_vendor_checks-1.22.patch ]; - GOOS = stdenv.targetPlatform.parsed.kernel.name; + GOOS = if stdenv.targetPlatform.isWasi then "wasip1" else stdenv.targetPlatform.parsed.kernel.name; GOARCH = goarch stdenv.targetPlatform; # GOHOSTOS/GOHOSTARCH must match the building system, not the host system. # Go will nevertheless build a for host system that we will copy over in @@ -113,7 +114,8 @@ stdenv.mkDerivation (finalAttrs: { GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = "softfloat"; # from Arch: don't assume sse2 on i686 - CGO_ENABLED = 1; + # Wasi does not support CGO + CGO_ENABLED = if stdenv.targetPlatform.isWasi then 0 else 1; GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go"; @@ -184,7 +186,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://go.dev/"; license = licenses.bsd3; maintainers = teams.golang.members; - platforms = platforms.darwin ++ platforms.linux; + platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi; mainProgram = "go"; }; }) diff --git a/pkgs/development/compilers/hvm/default.nix b/pkgs/development/compilers/hvm/default.nix index b640d4e11c2de..b03b7eed2ea19 100644 --- a/pkgs/development/compilers/hvm/default.nix +++ b/pkgs/development/compilers/hvm/default.nix @@ -7,22 +7,19 @@ rustPlatform.buildRustPackage rec { pname = "hvm"; - version = "2.0.12"; + version = "2.0.17"; src = fetchCrate { inherit pname version; - hash = "sha256-/55SK/5zBKXmucRQPoYt/8IHxisQlOxNEVMAZVMtCNI="; + hash = "sha256-UzPEupmUnph7SjCc/T4sBSGXj8yLVdQlw+X9iM16zD8="; }; - cargoHash = "sha256-9U8Y0KaQHIfOZnCKbl94VvjS/7Qmi6UnKMDZDTXcye0="; + cargoHash = "sha256-AchVbf+mn4qQtzWu84Dqek+btCm6BA9mcY+8iHWqdiw="; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.IOKit ]; - # enable nightly features - RUSTC_BOOTSTRAP = true; - meta = with lib; { description = "A massively parallel, optimal functional runtime in Rust"; mainProgram = "hvm"; diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 4f44d6396d301..7d47436b714ff 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -14,7 +14,18 @@ , libllvm , linuxHeaders , libxcrypt + +# Some platforms have switched to using compiler-rt, but still want a +# libgcc.a for ABI compat purposes. The use case would be old code that +# expects to link `-lgcc` but doesn't care exactly what its contents +# are, so long as it provides some builtins. , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD + +# In recent releases, the compiler-rt build seems to produce +# many `libclang_rt*` libraries, but not a single unified +# `libcompiler_rt` library, at least under certain configurations. Some +# platforms stil expect this, however, so we symlink one into place. +, forceLinkCompilerRt ? stdenv.hostPlatform.isOpenBSD }: let @@ -149,7 +160,9 @@ stdenv.mkDerivation ({ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o '' + lib.optionalString doFakeLibgcc '' - ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a + ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libgcc.a + '' + lib.optionalString forceLinkCompilerRt '' + ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libcompiler_rt.a ''; meta = llvm_meta // { diff --git a/pkgs/development/compilers/llvm/common/libcxx/default.nix b/pkgs/development/compilers/llvm/common/libcxx/default.nix index 5b4c2ca56ae1a..de2efed85936f 100644 --- a/pkgs/development/compilers/llvm/common/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/common/libcxx/default.nix @@ -93,12 +93,6 @@ let cmakeFlags = [ "-DLLVM_ENABLE_RUNTIMES=${lib.concatStringsSep ";" runtimes}" - ] ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [ - # libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib, - # but that does not appear to be the case for example when building - # pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc). - "-DCMAKE_EXE_LINKER_FLAGS=-nostdlib" - "-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib" ] ++ lib.optionals stdenv.hostPlatform.isWasm [ "-DCMAKE_C_COMPILER_WORKS=ON" "-DCMAKE_CXX_COMPILER_WORKS=ON" diff --git a/pkgs/development/compilers/nim/build-nim-package.nix b/pkgs/development/compilers/nim/build-nim-package.nix index a22fb45b507bc..2bff3bf8cc857 100644 --- a/pkgs/development/compilers/nim/build-nim-package.nix +++ b/pkgs/development/compilers/nim/build-nim-package.nix @@ -57,10 +57,6 @@ let let fod = methods.${method} attrs; in ''--path:"${fod.outPath}/${attrs.srcDir}"''; - callAnnotations = { packages, ... }@lockAttrs: - map (packageName: nimOverrides.${packageName} or (_: [ ]) lockAttrs) - packages; - asFunc = x: if builtins.isFunction x then x else (_: x); in @@ -79,12 +75,17 @@ let lockFileNimFlags = map fodFromLockEntry lockDepends; - annotationOverlays = lib.lists.flatten (map callAnnotations lockDepends); - - postLock = builtins.foldl' - (prevAttrs: overlay: prevAttrs // (overlay finalAttrs prevAttrs)) - postPkg - annotationOverlays; + postNimOverrides = builtins.foldl' ( + prevAttrs: + { packages, ... }@lockAttrs: + builtins.foldl' ( + prevAttrs: name: + if (builtins.hasAttr name nimOverrides) then + (prevAttrs // (nimOverrides.${name} lockAttrs prevAttrs)) + else + prevAttrs + ) prevAttrs packages + ) postPkg lockDepends; finalOverride = { depsBuildBuild ? [ ] @@ -125,7 +126,7 @@ let }; }; - attrs = postLock // finalOverride postLock; + attrs = postNimOverrides // finalOverride postNimOverrides; in lib.trivial.warnIf (builtins.hasAttr "nimBinOnly" attrs) "the nimBinOnly attribute is deprecated for buildNimPackage" diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix index 089043dc6deea..0ac32994b00d6 100644 --- a/pkgs/development/compilers/nim/default.nix +++ b/pkgs/development/compilers/nim/default.nix @@ -1,7 +1,7 @@ # https://nim-lang.github.io/Nim/packaging.html # https://nim-lang.org/docs/nimc.html -{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub +{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit , makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security , nim-unwrapped-2, nim-unwrapped-1, nim }: |