diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-05-12 05:50:40 +0200 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-05-12 05:50:40 +0200 |
commit | e7b211e3d26aba0b370e17c32e0c1ae36f73e508 (patch) | |
tree | 6d0456eb882219f3be879cb543cccec86311f472 | |
parent | 9de077115473b21ac6a8ace3b9d76871b28c0430 (diff) | |
download | nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar.gz nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar.bz2 nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar.lz nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar.xz nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.tar.zst nixpkgs-e7b211e3d26aba0b370e17c32e0c1ae36f73e508.zip |
ocamlPackages: default to version 3 of Dune
9 files changed, 22 insertions, 19 deletions
diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index 2dfba9e7405..972244f80b0 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -3,7 +3,7 @@ { pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args: let Dune = - let dune-version = args.duneVersion or "2"; in + let dune-version = args.duneVersion or "3"; in { "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}" ; in diff --git a/pkgs/development/ocaml-modules/dune-build-info/default.nix b/pkgs/development/ocaml-modules/dune-build-info/default.nix index 9eb7afa2c40..ac9b127cac3 100644 --- a/pkgs/development/ocaml-modules/dune-build-info/default.nix +++ b/pkgs/development/ocaml-modules/dune-build-info/default.nix @@ -1,17 +1,15 @@ -{ lib, buildDunePackage, dune_2, dune-action-plugin }: +{ lib, buildDunePackage, dune-action-plugin }: buildDunePackage rec { pname = "dune-build-info"; - inherit (dune_2) src version patches; - - useDune2 = true; + inherit (dune-action-plugin) src version preBuild; dontAddPrefix = true; buildInputs = [ dune-action-plugin ]; meta = with lib; { - inherit (dune_2.meta) homepage; + inherit (dune-action-plugin.meta) homepage; description = "Embed build information inside executables"; maintainers = [ maintainers.bcdarwin ]; license = licenses.mit; diff --git a/pkgs/development/ocaml-modules/dune-configurator/default.nix b/pkgs/development/ocaml-modules/dune-configurator/default.nix index cdb1e3fc200..3eae198d824 100644 --- a/pkgs/development/ocaml-modules/dune-configurator/default.nix +++ b/pkgs/development/ocaml-modules/dune-configurator/default.nix @@ -1,17 +1,20 @@ -{ lib, buildDunePackage, dune_2, csexp, result }: +{ lib, buildDunePackage, dune_3, csexp }: buildDunePackage rec { pname = "dune-configurator"; - inherit (dune_2) src version patches; + inherit (dune_3) src version patches; - duneVersion = "2"; + # This fixes finding csexp + postPatch = '' + rm -rf vendor/pp vendor/csexp + ''; - minimalOCamlVersion = "4.03"; + minimalOCamlVersion = "4.05"; dontAddPrefix = true; - propagatedBuildInputs = [ csexp result ]; + propagatedBuildInputs = [ csexp ]; meta = with lib; { description = "Helper library for gathering system configuration"; diff --git a/pkgs/development/ocaml-modules/lame/default.nix b/pkgs/development/ocaml-modules/lame/default.nix index 85d02538ab0..5d65bb95101 100644 --- a/pkgs/development/ocaml-modules/lame/default.nix +++ b/pkgs/development/ocaml-modules/lame/default.nix @@ -4,7 +4,7 @@ buildDunePackage rec { pname = "lame"; version = "0.3.6"; - minimalOCamlVersion = "4.03"; + minimalOCamlVersion = "4.06"; src = fetchFromGitHub { owner = "savonet"; diff --git a/pkgs/development/ocaml-modules/lo/default.nix b/pkgs/development/ocaml-modules/lo/default.nix index 57e7dea5160..6da5854f9de 100644 --- a/pkgs/development/ocaml-modules/lo/default.nix +++ b/pkgs/development/ocaml-modules/lo/default.nix @@ -4,6 +4,8 @@ buildDunePackage rec { pname = "lo"; version = "0.2.0"; + minimalOCamlVersion = "4.06"; + src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-lo"; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix index 75e739959c3..28ab9450e03 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix @@ -6,6 +6,8 @@ buildDunePackage rec { inherit (ocaml_gettext) src version; + minimalOCamlVersion = "4.06"; + buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ ocaml_gettext ]; diff --git a/pkgs/development/ocaml-modules/ounit2/default.nix b/pkgs/development/ocaml-modules/ounit2/default.nix index 3b75428d0ef..e44bd5bb35a 100644 --- a/pkgs/development/ocaml-modules/ounit2/default.nix +++ b/pkgs/development/ocaml-modules/ounit2/default.nix @@ -1,13 +1,11 @@ { lib, ocaml, buildDunePackage, fetchurl, seq, stdlib-shims, ncurses }: -buildDunePackage rec { +buildDunePackage (rec { minimalOCamlVersion = "4.04"; pname = "ounit2"; version = "2.2.6"; - duneVersion = if lib.versionAtLeast ocaml.version "4.08" then "2" else "1"; - src = fetchurl { url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-${version}.tbz"; hash = "sha256-BpD7Hg6QoY7tXDVms8wYJdmLDox9UbtrhGyVxFphWRM="; @@ -24,4 +22,6 @@ buildDunePackage rec { license = licenses.mit; maintainers = with maintainers; [ sternenseemann ]; }; -} +} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { + duneVersion = "1"; +}) diff --git a/pkgs/development/ocaml-modules/shine/default.nix b/pkgs/development/ocaml-modules/shine/default.nix index f6acd6b937b..13d41e72254 100644 --- a/pkgs/development/ocaml-modules/shine/default.nix +++ b/pkgs/development/ocaml-modules/shine/default.nix @@ -4,8 +4,6 @@ buildDunePackage rec { pname = "shine"; version = "0.2.3"; - duneVersion = "2"; - src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-shine"; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix index 18530f3c669..861dc22c803 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix @@ -6,7 +6,7 @@ buildDunePackage rec { pname = "js_of_ocaml-ocamlbuild"; version = "5.0"; - minimalOCamlVersion = "4.02"; + minimalOCamlVersion = "4.03"; src = fetchurl { url = "https://github.com/ocsigen/js_of_ocaml-ocamlbuild/releases/download/${version}/js_of_ocaml-ocamlbuild-${version}.tbz"; |