diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2024-05-03 20:53:15 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2024-05-13 08:49:13 +0200 |
commit | 65bfaad3cc771a1c6b34cf34f55a253495949e0f (patch) | |
tree | 7db01d0e2c98abf1a21fc6dd956d85e25250fa73 /pkgs/development/ocaml-modules/odoc-parser | |
parent | 98c6ea3b99e11e173f182d720d0b72f0b18a2e01 (diff) |
ocamlPackages.odoc: 2.2.1 → 2.4.2
Diffstat (limited to 'pkgs/development/ocaml-modules/odoc-parser')
-rw-r--r-- | pkgs/development/ocaml-modules/odoc-parser/default.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/odoc-parser/default.nix b/pkgs/development/ocaml-modules/odoc-parser/default.nix index 90e99427ec09d..5d22d2d712384 100644 --- a/pkgs/development/ocaml-modules/odoc-parser/default.nix +++ b/pkgs/development/ocaml-modules/odoc-parser/default.nix @@ -1,23 +1,22 @@ -{ lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.0.0" }: +{ lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.4.2" }: let param = { + "2.4.2" = { + sha256 = "sha256-Vjz9uybsijDnN6nPKFoG4LuulT9I4lu7D2n3qZwrpAs="; + }; "2.0.0" = { sha256 = "sha256-QHkZ+7DrlXYdb8bsZ3dijZSqGQc0O9ymeLGIC6+zOSI="; - extraBuildInputs = [ camlp-streams ]; }; "1.0.1" = { sha256 = "sha256-orvo5CAbYOmAurAeluQfK6CwW6P1C0T3WDfoovuQfSw="; - extraBuildInputs = [ camlp-streams ]; }; "1.0.0" = { sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE="; max_version = "5.0"; - extraBuildInputs = []; }; "0.9.0" = { sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk="; max_version = "5.0"; - extraBuildInputs = []; }; }."${version}"; in @@ -31,11 +30,14 @@ buildDunePackage rec { minimalOCamlVersion = "4.02"; src = fetchurl { - url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz"; + url = if lib.versionAtLeast version "2.4" + then "https://github.com/ocaml/odoc/releases/download/${version}/odoc-${version}.tbz" + else "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz"; inherit (param) sha256; }; - propagatedBuildInputs = [ astring result ] ++ param.extraBuildInputs; + propagatedBuildInputs = [ astring result ] ++ + lib.optional (lib.versionAtLeast version "1.0.1") camlp-streams; meta = { description = "Parser for Ocaml documentation comments"; |