diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-07-02 13:43:17 +0200 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2018-07-03 15:04:30 +0200 |
commit | fcbb16841aa036d029a7336bca9afcda9081bdee (patch) | |
tree | 65e864e48f6047f55476b2a3aaeafb46577cb66b /default.nix | |
parent | 218c6cebf770a15fb3ca6eca1d587f42b8994234 (diff) |
Adapt default.nix to allow nix-build to run the test-suite.
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/default.nix b/default.nix index a2645f4fc..e4834ae3a 100644 --- a/default.nix +++ b/default.nix @@ -9,14 +9,14 @@ # nix-shell supports the --arg option (see Nix doc) that allows you for # instance to do this: -# $ nix-shell --arg ocamlPackages "(import <nixpkgs> {}).ocamlPackages_latest" --arg buildIde false +# $ nix-shell --arg ocamlPackages "(import <nixpkgs> {}).ocaml-ng.ocamlPackages_4_05" --arg buildIde false # You can also compile Coq and "install" it by running: # $ make clean # (only needed if you have left-over compilation files) # $ nix-build # at the root of the Coq repository. # nix-build also supports the --arg option, so you will be able to do: -# $ nix-build --arg doCheck false +# $ nix-build --arg doInstallCheck false # if you want to speed up things by not running the test-suite. # Once the build is finished, you will find, in the current directory, # a symlink to where Coq was installed. @@ -25,7 +25,7 @@ , ocamlPackages ? pkgs.ocaml-ng.ocamlPackages_4_06 , buildIde ? true , buildDoc ? true -, doCheck ? true +, doInstallCheck ? true }: with pkgs; @@ -58,13 +58,13 @@ stdenv.mkDerivation rec { ps.antlr4-python3-runtime ps.sphinxcontrib-bibtex ])) antlr4 - ] else []) ++ (if doCheck then + ] else []) ++ (if doInstallCheck then # Test-suite dependencies # ncurses is required to build an OCaml REPL optional (!versionAtLeast ocaml.version "4.07") ncurses ++ [ - python + python2 rsync which ocamlPackages.ounit @@ -90,10 +90,18 @@ stdenv.mkDerivation rec { prefixKey = "-prefix "; - buildFlags = [ "world" ] ++ optional buildDoc "doc-html"; + buildFlags = [ "world" "byte" ] ++ optional buildDoc "doc-html"; - installTargets = [ "install" ] ++ optional buildDoc "install-doc-html"; + installTargets = + [ "install" "install-byte" ] ++ optional buildDoc "install-doc-html"; - inherit doCheck; + inherit doInstallCheck; + + preInstallCheck = '' + patchShebangs tools/ + patchShebangs test-suite/ + ''; + + installCheckTarget = [ "check" ]; } |