From d113661156581c835df4fe5521ffc64128772f18 Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Fri, 19 Feb 2021 19:34:30 +0100 Subject: coqPackages: etc - put `findlib` in `buildInputs` of `mkCoqDerivation` to make sure `coq` packages find their ocaml plugin dependencies, - use `propagatedBuildInputs` to make sure ocaml plugin dependencies are in path, - updated `coqPackage.heq` (broken url), - fixed use of `DESTDIR` and `COQMF_COQLIB` in mkCoqDerivation, - adding `COQCORELIB` environement variable to put ocaml plugin files in the right place, - make `metaFetch` available from `coqPackages` --- pkgs/applications/science/logic/coq/default.nix | 13 ++++++++----- pkgs/applications/science/logic/why3/default.nix | 7 ++++--- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'pkgs/applications/science/logic') diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index c078287b85e..768178e6e15 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -70,9 +70,9 @@ let { case = range "8.7" "8.10"; out = ocamlPackages_4_09; } { case = range "8.5" "8.6"; out = ocamlPackages_4_05; } ] ocamlPackages_4_12; - ocamlNativeBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] - ++ optional (coqAtLeast "8.14") ocamlPackages.dune_2; - ocamlBuildInputs = [] + ocamlNativeBuildInputs = with ocamlPackages; [ ocaml findlib ] + ++ optional (coqAtLeast "8.14") dune_2; + ocamlPropagatedBuildInputs = [ ] ++ optional (!coqAtLeast "8.10") ocamlPackages.camlp5 ++ optional (!coqAtLeast "8.13") ocamlPackages.num ++ optional (coqAtLeast "8.13") ocamlPackages.zarith; @@ -82,7 +82,8 @@ self = stdenv.mkDerivation { passthru = { inherit coq-version; - inherit ocamlPackages ocamlBuildInputs ocamlNativeBuildInputs; + inherit ocamlPackages ocamlNativeNuildInputs; + inherit ocamlPropagatedBuildInputs ocamlPropagatedNativeBuildInputs; # For compatibility inherit (ocamlPackages) ocaml camlp5 findlib num ; emacsBufferSetup = pkgs: '' @@ -136,13 +137,15 @@ self = stdenv.mkDerivation { ++ optional buildIde copyDesktopItems ++ optional (buildIde && coqAtLeast "8.10") wrapGAppsHook ++ optional (!coqAtLeast "8.6") gnumake42; - buildInputs = [ ncurses ] ++ ocamlBuildInputs + buildInputs = [ ncurses ] ++ optionals buildIde (if coqAtLeast "8.10" then [ ocamlPackages.lablgtk3-sourceview3 glib gnome.adwaita-icon-theme ] else [ ocamlPackages.lablgtk ]) ; + propagatedBuildInputs = ocamlPropagatedBuildInputs; + postPatch = '' UNAME=$(type -tp uname) RM=$(type -tp rm) diff --git a/pkgs/applications/science/logic/why3/default.nix b/pkgs/applications/science/logic/why3/default.nix index 8917135b2c8..ab5006e424e 100644 --- a/pkgs/applications/science/logic/why3/default.nix +++ b/pkgs/applications/science/logic/why3/default.nix @@ -21,10 +21,11 @@ stdenv.mkDerivation rec { # WebIDE js_of_ocaml js_of_ocaml-ppx # S-expression output for why3pp - ppx_deriving ppx_sexp_conv + ppx_deriving ppx_sexp_conv ] + ++ # Coq Support - coqPackages.coq coqPackages.flocq - ]; + (with coqPackages; [ coq flocq ]) + ; propagatedBuildInputs = with ocamlPackages; [ camlzip menhirLib num re sexplib ]; -- cgit 1.4.1