From 1ce94fad33cbf646b0c323900679f1b751a28a02 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 14 May 2019 08:18:32 +0000 Subject: [PATCH] =?UTF-8?q?coq:=20make=20=E2=80=9Ccoq-version=E2=80=9D=20m?= =?UTF-8?q?ore=20general?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/science/logic/coq/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index 0a4e1dddcae3..2488147d2145 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -27,7 +27,10 @@ let "8.8.2" = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd"; "8.9.0" = "1dkgdjc4n1m15m1p724hhi5cyxpqbjw6rxc5na6fl3v4qjjfnizh"; }."${version}"; - coq-version = builtins.substring 0 3 version; + coq-version = + let inherit (builtins) concatStringsSep head map; in + let inherit (stdenv.lib) take splitString; in + concatStringsSep "." (take 2 (map head (map (splitString "pl") (splitString "." version)))); ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; csdpPatch = if csdp != null then '' substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"