Skip to content

Commit

Permalink
ocamlPackages: fixes after GCC update to version 14 (NixOS#372893)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikstrid authored Jan 14, 2025
2 parents 6dc6031 + d036ecd commit 2a6d646
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/lablgtk3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildDunePackage rec {
version = "3.1.5";
pname = "lablgtk3";

minimalOCamlVersion = "4.05";
minimalOCamlVersion = "4.06";

src = fetchurl {
url = "https://github.com/garrigue/lablgtk/releases/download/${version}/lablgtk3-${version}.tbz";
Expand Down
10 changes: 8 additions & 2 deletions pkgs/development/ocaml-modules/labltk/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
stdenv,
gcc13Stdenv,
lib,
makeWrapper,
fetchzip,
Expand All @@ -11,16 +12,18 @@
}:

let
defaultStdenv = stdenv;
params =
let
mkNewParam =
{
version,
sha256,
rev ? version,
stdenv ? defaultStdenv,
}:
{
inherit version;
inherit stdenv version;
src = fetchzip {
url = "https://github.com/garrigue/labltk/archive/${rev}.tar.gz";
inherit sha256;
Expand All @@ -32,15 +35,18 @@ let
version = "8.06.4";
rev = "labltk-8.06.4";
sha256 = "03xwnnnahb2rf4siymzqyqy8zgrx3h26qxjgbp5dh1wdl7n02c7g";
stdenv = gcc13Stdenv;
};
"4.07" = mkNewParam {
version = "8.06.5";
rev = "1b71e2c6f3ae6847d3d5e79bf099deb7330fb419";
sha256 = "02vchmrm3izrk7daldd22harhgrjhmbw6i1pqw6hmfmrmrypypg2";
stdenv = gcc13Stdenv;
};
_8_06_7 = mkNewParam {
version = "8.06.7";
sha256 = "1cqnxjv2dvw9csiz4iqqyx6rck04jgylpglk8f69kgybf7k7xk2h";
stdenv = gcc13Stdenv;
};
"4.08" = _8_06_7;
"4.09" = _8_06_7;
Expand Down Expand Up @@ -78,7 +84,7 @@ let
or (throw "labltk is not available for OCaml ${ocaml.version}");
in

stdenv.mkDerivation rec {
param.stdenv.mkDerivation rec {
inherit (param) version src;
pname = "ocaml${ocaml.version}-labltk";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/linenoise/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildDunePackage rec {
pname = "linenoise";
version = "1.5.1";

minimalOCamlVersion = "4.03";
minimalOCamlVersion = "4.06";

src = fetchFromGitHub {
owner = "fxfactorial";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/ocaml-modules/patch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ buildDunePackage rec {
pname = "patch";
version = "2.0.0";

minimalOCamlVersion = "4.03";

src = fetchFromGitHub {
owner = "hannesm";
repo = "patch";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/ocaml-modules/stdcompat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ lib.throwIf (lib.versionAtLeast ocaml.version "5.2")
pname = "stdcompat";
version = "19";

minimalOCamlVersion = "4.06";

src = fetchurl {
url = "https://github.com/thierry-martinez/stdcompat/releases/download/v${version}/stdcompat-${version}.tar.gz";
sha256 = "sha256-DKQGd4nnIN6SPls6hcA/2Jvc7ivYNpeMU6rYsVc1ClU=";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/ocaml-modules/z3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
z3,
}:

if lib.versionOlder ocaml.version "4.07" then
if lib.versionOlder ocaml.version "4.08" then
throw "z3 is not available for OCaml ${ocaml.version}"
else

Expand Down
36 changes: 27 additions & 9 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ let

either = callPackage ../development/ocaml-modules/either { };

elina = callPackage ../development/ocaml-modules/elina { };
elina = callPackage ../development/ocaml-modules/elina {
stdenv = pkgs.gcc13Stdenv;
};

eliom = callPackage ../development/ocaml-modules/eliom { };

Expand Down Expand Up @@ -2063,21 +2065,37 @@ in let inherit (pkgs) callPackage; in rec
{
inherit mkOcamlPackages;

ocamlPackages_4_00_1 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.00.1.nix { });
ocamlPackages_4_00_1 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.00.1.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_01_0 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.01.0.nix { });
ocamlPackages_4_01_0 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.01.0.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_02 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { });
ocamlPackages_4_02 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix { });
ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_04 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.04.nix { });
ocamlPackages_4_04 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.04.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_05 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.05.nix { });
ocamlPackages_4_05 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.05.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_06 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.06.nix { });
ocamlPackages_4_06 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.06.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_07 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.07.nix { });
ocamlPackages_4_07 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.07.nix {
stdenv = pkgs.gcc13Stdenv;
});

ocamlPackages_4_08 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.08.nix { });

Expand Down

0 comments on commit 2a6d646

Please sign in to comment.