fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, menhir, easy-format, ocaml, findlib, fetchurl, jbuilder, which }:
2
3let param =
4 if stdenv.lib.versionAtLeast ocaml.version "4.02"
5 then {
6 version = "1.12.0";
7 sha256 = "1pcd4fqbilv8zm2mc1nj2s26vc5y8vnisg1q1y6bjx23wxidb09y";
8 buildPhase = "jbuilder build -p atd";
9 inherit (jbuilder) installPhase;
10 } else {
11 version = "1.1.2";
12 sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291";
13 buildPhase = "";
14 installPhase = ''
15 mkdir -p $out/bin
16 make PREFIX=$out install
17 '';
18 };
19in
20
21stdenv.mkDerivation rec {
22 inherit (param) version buildPhase installPhase;
23 name = "ocaml${ocaml.version}-atd-${version}";
24
25 src = fetchurl {
26 url = "https://github.com/mjambon/atd/archive/v${version}.tar.gz";
27 inherit (param) sha256;
28 };
29
30 createFindlibDestdir = true;
31
32 buildInputs = [ which jbuilder ocaml findlib menhir ];
33 propagatedBuildInputs = [ easy-format ];
34
35 meta = with stdenv.lib; {
36 homepage = https://github.com/mjambon/atd;
37 description = "Syntax for cross-language type definitions";
38 license = licenses.bsd3;
39 maintainers = [ maintainers.jwilberding ];
40 };
41}