Commit 181a9fe1 authored by Vincent Laporte's avatar Vincent Laporte Committed by Vincent Laporte
Browse files

easycrypt: fix runtest command

The `ec-runtest` program is still available as a separate
easycrypt-runtest package, but the `easycrypt runtest` command now also
works out-of-the-box.
parent 39533b0a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3 }:
{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3, python3 }:

stdenv.mkDerivation rec {
  pname = "easycrypt";
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
    findlib
    menhir
    ocaml
    python3.pkgs.wrapPython
  ];
  buildInputs = with ocamlPackages; [
    batteries
@@ -33,10 +34,13 @@ stdenv.mkDerivation rec {
    substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${version})'
  '';

  pythonPath = with python3.pkgs; [ pyyaml ];

  installPhase = ''
    runHook preInstall
    dune install --prefix $out ${pname}
    rm $out/bin/ec-runtest
    wrapPythonProgramsIn "$out/lib/easycrypt/commands" "$pythonPath"
    runHook postInstall
  '';