coqPackages.simple-io: fix & add tests

authored by Vincent Laporte and committed by Vincent Laporte f45bd811 867d3dd3

+26 -2
+5 -2
pkgs/development/coq-modules/simple-io/default.nix
··· 1 - { lib, mkCoqDerivation, coq, coq-ext-lib, version ? null }: 1 + { lib, callPackage, mkCoqDerivation, coq, coq-ext-lib, version ? null }: 2 2 3 3 with lib; mkCoqDerivation { 4 4 pname = "simple-io"; ··· 13 13 release."1.3.0".sha256 = "1yp7ca36jyl9kz35ghxig45x6cd0bny2bpmy058359p94wc617ax"; 14 14 mlPlugin = true; 15 15 nativeBuildInputs = [ coq.ocamlPackages.cppo ]; 16 - propagatedBuildInputs = [ coq-ext-lib coq.ocamlPackages.ocamlbuild ]; 16 + propagatedBuildInputs = [ coq-ext-lib ] 17 + ++ (with coq.ocamlPackages; [ ocaml findlib ocamlbuild ]); 17 18 18 19 doCheck = true; 19 20 checkTarget = "test"; 21 + 22 + passthru.tests.HelloWorld = callPackage ./test.nix {}; 20 23 21 24 meta = { 22 25 description = "Purely functional IO for Coq";
+21
pkgs/development/coq-modules/simple-io/test.nix
··· 1 + { stdenv, coq, simple-io }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "coq-simple-io-test"; 5 + inherit (simple-io) src version; 6 + checkInputs = [ coq simple-io ]; 7 + dontConfigure = true; 8 + dontBuild = true; 9 + doCheck = true; 10 + 11 + checkPhase = '' 12 + cd test 13 + for p in Argv.v Example.v HelloWorld.v TestExtraction.v TestPervasives.v 14 + do 15 + [ -f $p ] && echo $p && coqc $p 16 + done 17 + ''; 18 + 19 + installPhase = "touch $out"; 20 + 21 + }