From e997629cea8885bb4b00c5998eb0adfb8bf5ae39 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 23 Jan 2024 06:46:27 +0100 Subject: [PATCH] why3: make it easy to disable IDE support easycrypt: use why3 without IDE support --- pkgs/applications/science/logic/why3/default.nix | 13 +++++++++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/logic/why3/default.nix b/pkgs/applications/science/logic/why3/default.nix index ff6e0672d1fe..758d11e4252a 100644 --- a/pkgs/applications/science/logic/why3/default.nix +++ b/pkgs/applications/science/logic/why3/default.nix @@ -1,6 +1,8 @@ { callPackage, fetchurl, lib, stdenv , ocamlPackages, coqPackages, rubber, hevea, emacs , version ? "1.7.1" +, ideSupport ? true +, wrapGAppsHook }: stdenv.mkDerivation rec { @@ -17,8 +19,11 @@ stdenv.mkDerivation rec { strictDeps = true; - nativeBuildInputs = with ocamlPackages; [ + nativeBuildInputs = lib.optional ideSupport + wrapGAppsHook + ++ (with ocamlPackages; [ ocaml findlib menhir + ]) ++ [ # Coq Support coqPackages.coq ]; @@ -29,8 +34,10 @@ stdenv.mkDerivation rec { emacs # Documentation rubber hevea + ] ++ lib.optional ideSupport # GUI lablgtk3-sourceview3 + ++ [ # WebIDE js_of_ocaml js_of_ocaml-ppx # S-expression output for why3pp @@ -44,7 +51,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - configureFlags = [ "--enable-verbose-make" ]; + configureFlags = [ "--enable-verbose-make" + (lib.enableFeature ideSupport "ide") + ]; installTargets = [ "install" "install-lib" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4b33aa976e4d..aa153c135007 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5197,7 +5197,9 @@ with pkgs; easyabc = callPackage ../applications/audio/easyabc { }; - easycrypt = callPackage ../applications/science/logic/easycrypt { }; + easycrypt = callPackage ../applications/science/logic/easycrypt { + why3 = pkgs.why3.override { ideSupport = false; }; + }; easycrypt-runtest = callPackage ../applications/science/logic/easycrypt/runtest.nix { };