about summary refs log tree commit diff
path: root/pkgs/development/coq-modules/bedrock/default.nix
blob: 478f74058bdfc653f7a4d916b3816e6b4e5d4c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{stdenv, fetchurl, coq}:

stdenv.mkDerivation rec {

  name = "coq-bedrock-${coq.coq-version}-${version}";
  version = "20140722";

  src = fetchurl {
    url = "http://plv.csail.mit.edu/bedrock/bedrock-${version}.tgz";
    sha256 = "0aaa98q42rsy9hpsxji21bqznizfvf6fplsw6jq42h06j0049k80";
  };

  buildInputs = [ coq.ocaml coq.camlp5 ];
  propagatedBuildInputs = [ coq ];

  enableParallelBuilding = true;

  buildPhase = ''
    make -j$NIX_BUILD_CORES -C src/reification
    make -j$NIX_BUILD_CORES -C src
  '';

  installPhase = ''
    COQLIB=$out/lib/coq/${coq.coq-version}/
    mkdir -p $COQLIB/user-contrib/Bedrock
    cp -pR src/* $COQLIB/user-contrib/Bedrock
  '';

  meta = with stdenv.lib; {
    homepage = http://plv.csail.mit.edu/bedrock/;
    description = "Bedrock is a library that turns Coq into a tool much like classical verification systems";
    maintainers = with maintainers; [ jwiegley ];
    platforms = coq.meta.platforms;
  };

}