From 7264efb5cb387ada5e739ec35d4b48db1904705b Mon Sep 17 00:00:00 2001 From: rht Date: Sun, 15 Jan 2017 18:21:57 +0400 Subject: [PATCH] Fold in specific ocaml version choice into let --- pkgs/applications/science/logic/coq/HEAD.nix | 13 ++++++++----- pkgs/top-level/all-packages.nix | 5 +---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/logic/coq/HEAD.nix b/pkgs/applications/science/logic/coq/HEAD.nix index e02170793eaf..79893c38997f 100644 --- a/pkgs/applications/science/logic/coq/HEAD.nix +++ b/pkgs/applications/science/logic/coq/HEAD.nix @@ -1,26 +1,29 @@ -# - coqide compilation can be disabled by setting lablgtk to null; +# - coqide compilation can be disabled by setting buildIde to false; # - The csdp program used for the Micromega tactic is statically referenced. # However, coq can build without csdp by setting it to null. # In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found. -{stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}: +{stdenv, fetchgit, writeText, pkgconfig, ocamlPackages_4_02, ncurses, buildIde ? true, csdp ? null}: let version = "2017-01-22"; coq-version = "8.6"; - buildIde = lablgtk != null; - ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; + ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages_4_02.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; csdpPatch = if csdp != null then '' substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp" substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true" '' else ""; + ocaml = ocamlPackages_4_02.ocaml; + findlib = ocamlPackages_4_02.findlib; + lablgtk = ocamlPackages_4_02.lablgtk; + camlp5 = ocamlPackages_4_02.camlp5_transitional; in stdenv.mkDerivation { name = "coq-unstable-${version}"; inherit coq-version; - inherit ocaml camlp5; + inherit ocaml camlp5 findlib; src = fetchgit { url = git://scm.gforge.inria.fr/coq/coq.git; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f8d0ac7ce675..75c817782f5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17221,10 +17221,7 @@ with pkgs; version = "8.5pl3"; }; coq_8_6 = callPackage ../applications/science/logic/coq {}; - coq_HEAD = callPackage ../applications/science/logic/coq/HEAD.nix { - inherit (ocamlPackages_4_02) ocaml findlib lablgtk; - camlp5 = ocamlPackages_4_02.camlp5_transitional; - }; + coq_HEAD = callPackage ../applications/science/logic/coq/HEAD.nix {}; coq = coq_8_6; mkCoqPackages_8_4 = self: let callPackage = newScope self; in {