From c777cdf5c564015d5f63b09cc93bef4178b19b01 Mon Sep 17 00:00:00 2001
From: Vincent Laporte <Vincent.Laporte@gmail.com>
Date: Wed, 27 Apr 2022 11:35:20 +0200
Subject: [PATCH] easycrypt-runtest: init at 2022.04

---
 .../science/logic/easycrypt/runtest.nix       | 24 +++++++++++++++++++
 pkgs/top-level/all-packages.nix               |  2 ++
 2 files changed, 26 insertions(+)
 create mode 100644 pkgs/applications/science/logic/easycrypt/runtest.nix

diff --git a/pkgs/applications/science/logic/easycrypt/runtest.nix b/pkgs/applications/science/logic/easycrypt/runtest.nix
new file mode 100644
index 000000000000..79a034b93693
--- /dev/null
+++ b/pkgs/applications/science/logic/easycrypt/runtest.nix
@@ -0,0 +1,24 @@
+{ python3Packages, easycrypt }:
+
+python3Packages.buildPythonApplication rec {
+  inherit (easycrypt) src version;
+
+  pname = "easycrypt-runtest";
+
+  dontConfigure = true;
+  dontBuild = true;
+  doCheck = false;
+
+  pythonPath = with python3Packages; [ pyyaml ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    cp scripts/testing/runtest $out/bin/ec-runtest
+    runHook postInstall
+  '';
+
+  meta = easycrypt.meta // {
+    description = "Testing program for EasyCrypt formalizations";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 32e10a11a192..e61db0e75b85 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3364,6 +3364,8 @@ with pkgs;
 
   easycrypt = callPackage ../applications/science/logic/easycrypt { };
 
+  easycrypt-runtest = callPackage ../applications/science/logic/easycrypt/runtest.nix { };
+
   EBTKS = callPackage ../development/libraries/science/biology/EBTKS { };
 
   ecasound = callPackage ../applications/audio/ecasound { };