aboutsummaryrefslogtreecommitdiffhomepage
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix21
1 files changed, 12 insertions, 9 deletions
diff --git a/default.nix b/default.nix
index 26c6e4b90..91d963604 100644
--- a/default.nix
+++ b/default.nix
@@ -21,25 +21,25 @@
# Once the build is finished, you will find, in the current directory,
# a symlink to where Coq was installed.
-{ pkgs ?
- (import (fetchTarball
- "https://github.com/NixOS/nixpkgs/archive/4345a2cef228a91c1d6d4bf626a0f933eb8cc4f9.tar.gz")
- {})
-, ocamlPackages ? pkgs.ocamlPackages
+{ pkgs ? (import <nixpkgs> {})
+, ocamlPackages ? pkgs.ocaml-ng.ocamlPackages_4_06
, buildIde ? true
, buildDoc ? true
, doCheck ? true
}:
with pkgs;
+with stdenv.lib;
stdenv.mkDerivation rec {
name = "coq";
- buildInputs = (with ocamlPackages; [
+ buildInputs = [
# Coq dependencies
+ hostname
+ ] ++ (with ocamlPackages; [
ocaml
findlib
camlp5_strict
@@ -61,18 +61,17 @@ stdenv.mkDerivation rec {
] else []) ++ (if doCheck then
# Test-suite dependencies
- let inherit (stdenv.lib) versionAtLeast optional; in
- /* ncurses is required to build an OCaml REPL */
+ # ncurses is required to build an OCaml REPL
optional (!versionAtLeast ocaml.version "4.07") ncurses
++ [
python
rsync
which
+ ocamlPackages.ounit
] else []) ++ (if lib.inNixShell then [
ocamlPackages.merlin
ocamlPackages.ocpIndent
- ocamlPackages.ocp-index
# Dependencies of the merging script
jq
@@ -90,6 +89,10 @@ stdenv.mkDerivation rec {
prefixKey = "-prefix ";
+ buildFlags = [ "world" ] ++ optional buildDoc "doc-html";
+
+ installTargets = [ "install" ] ++ optional buildDoc "install-doc-html";
+
inherit doCheck;
}