coqPackages.simple-io: fix & add tests

This commit is contained in:
Vincent Laporte 2022-09-30 09:48:10 +02:00 committed by Vincent Laporte
parent 867d3dd394
commit f45bd811fc
2 changed files with 26 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ lib, mkCoqDerivation, coq, coq-ext-lib, version ? null }:
{ lib, callPackage, mkCoqDerivation, coq, coq-ext-lib, version ? null }:
with lib; mkCoqDerivation {
pname = "simple-io";
@ -13,11 +13,14 @@ with lib; mkCoqDerivation {
release."1.3.0".sha256 = "1yp7ca36jyl9kz35ghxig45x6cd0bny2bpmy058359p94wc617ax";
mlPlugin = true;
nativeBuildInputs = [ coq.ocamlPackages.cppo ];
propagatedBuildInputs = [ coq-ext-lib coq.ocamlPackages.ocamlbuild ];
propagatedBuildInputs = [ coq-ext-lib ]
++ (with coq.ocamlPackages; [ ocaml findlib ocamlbuild ]);
doCheck = true;
checkTarget = "test";
passthru.tests.HelloWorld = callPackage ./test.nix {};
meta = {
description = "Purely functional IO for Coq";
license = licenses.mit;

View File

@ -0,0 +1,21 @@
{ stdenv, coq, simple-io }:
stdenv.mkDerivation {
pname = "coq-simple-io-test";
inherit (simple-io) src version;
checkInputs = [ coq simple-io ];
dontConfigure = true;
dontBuild = true;
doCheck = true;
checkPhase = ''
cd test
for p in Argv.v Example.v HelloWorld.v TestExtraction.v TestPervasives.v
do
[ -f $p ] && echo $p && coqc $p
done
'';
installPhase = "touch $out";
}