diff --git a/pkgs/development/compilers/ocaml/5.0.nix b/pkgs/development/compilers/ocaml/5.0.nix new file mode 100644 index 000000000000..a36b3e31a427 --- /dev/null +++ b/pkgs/development/compilers/ocaml/5.0.nix @@ -0,0 +1,9 @@ +import ./generic.nix { + major_version = "5"; + minor_version = "0"; + patch_version = "0-beta1"; + src = fetchTarball { + url = "https://caml.inria.fr/pub/distrib/ocaml-5.0/ocaml-5.0.0~beta1.tar.xz"; + sha256 = "sha256:1kwb53ra5qbwiiyrx5da7l5mqkjf0fr3rqgkrm3wr83l25scimj4"; + }; +} diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index 2c6045c13a62..7db0eca0ee4d 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -73,6 +73,7 @@ stdenv.mkDerivation (args // { configurePlatforms = lib.optionals (lib.versionAtLeast version "4.08" && !(stdenv.isDarwin && stdenv.isAarch64)) [ "host" "target" ]; # x86_64-unknown-linux-musl-ld: -r and -pie may not be used together hardeningDisable = lib.optional (lib.versionAtLeast version "4.09" && stdenv.hostPlatform.isMusl) "pie" + ++ lib.optional (lib.versionAtLeast version "5.0" && stdenv.cc.isClang) "strictoverflow" ++ lib.optionals (args ? hardeningDisable) args.hardeningDisable; # Older versions have some race: diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d8250fc8aa80..deb76032f6a2 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1663,6 +1663,8 @@ in let inherit (pkgs) callPackage; in rec ocamlPackages_4_14 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.14.nix { }); + ocamlPackages_5_0 = mkOcamlPackages (callPackage ../development/compilers/ocaml/5.0.nix { }); + ocamlPackages_latest = ocamlPackages_4_14; ocamlPackages = ocamlPackages_4_14;