diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/development/tools/ocaml/merlin/4.x.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/development/tools/ocaml/merlin/4.x.nix')
-rw-r--r-- | pkgs/development/tools/ocaml/merlin/4.x.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/tools/ocaml/merlin/4.x.nix b/pkgs/development/tools/ocaml/merlin/4.x.nix index 6cd8154877e..ef9330054f3 100644 --- a/pkgs/development/tools/ocaml/merlin/4.x.nix +++ b/pkgs/development/tools/ocaml/merlin/4.x.nix @@ -15,7 +15,7 @@ }: let - merlinVersion = if lib.versionAtLeast ocaml.version "4.14" then "4.10" else "4.7"; + merlinVersion = if lib.versionAtLeast ocaml.version "4.14" then "4.12" else "4.7"; hashes = { "4.7-412" = "sha256-0U3Ia7EblKULNy8AuXFVKACZvGN0arYJv7BWiBRgT0Y="; @@ -26,10 +26,18 @@ let "4.9-500" = "sha256-uQfGazoxTxclHSiTfjji+tKJv8MKqRdHMPD/xfMZlSY="; "4.10-414" = "sha256-/a1OqASISpb06eh2gsam1rE3wovM4CT8ybPV86XwR2c="; "4.10-500" = "sha256-m9+Qz8DT94yNSwpamTVLQKISHtRVBWnZD3t/yyujSZ0="; + "4.12-414" = "sha256-tgMUT4KyFeJubYVY1Sdv9ZvPB1JwcqEGcCuwuMqXHRQ="; + "4.12-500" = "sha256-j49R7KVzNKlXDL7WibTHxPG4VSOVv0uaz5/yMZZjkH8="; + "4.12-501" = "sha256-zMwzI1SXQDWQ9PaKL4o3J6JlRjmEs7lkXrwauy+QiMA="; }; - ocamlVersionShorthand = lib.substring 0 3 - (lib.concatStrings (lib.splitVersion ocaml.version)); + ocamlVersionShorthand = + let + v = lib.splitVersion ocaml.version; + major = builtins.elemAt v 0; + minor = builtins.elemAt v 1; + minor_prefix = if builtins.stringLength minor < 2 then "0" else ""; + in "${toString major}${minor_prefix}${toString minor}"; version = "${merlinVersion}-${ocamlVersionShorthand}"; in |