cryptol: Make Z3 available for REPL users

The Cryptol REPL has a hard dependency on Z3, but the rest of the
library uses SBV to support multiple solvers. Ensure that Z3 is
available for `pkgs.cryptol`, which is likely to be installed via
nix-env for REPL usage, but do not change pkgs.haskellPackages.cryptol,
which is likely to be used as a dependency (in Nix expressions).
This commit is contained in:
Aneesh Agrawal 2016-09-10 16:57:11 -04:00
parent 0dbfb0fc48
commit 54ff118477

View File

@ -4443,7 +4443,15 @@ in
coq = coq_8_5;
});
cryptol = haskellPackages.cryptol;
# Users installing via `nix-env` will likely be using the REPL,
# which has a hard dependency on Z3, so make sure it is available.
cryptol = haskellPackages.cryptol.overrideDerivation (oldAttrs: {
buildInputs = (oldAttrs.buildInputs or []) ++ [ makeWrapper ];
installPhase = (oldAttrs.installPhase or "") + ''
wrapProgram $out/bin/cryptol \
--prefix 'PATH' ':' "${lib.getBin z3}/bin"
'';
});
devpi-client = callPackage ../development/tools/devpi-client {};