ocamlPackages.atd: 1.1.2 -> 1.12.0
This commit is contained in:
parent
8791cad96b
commit
b475d5f04c
@ -1,21 +1,36 @@
|
|||||||
{stdenv, menhir, easy-format, buildOcaml, fetchurl, which}:
|
{ stdenv, menhir, easy-format, ocaml, findlib, fetchurl, jbuilder, which }:
|
||||||
|
|
||||||
buildOcaml rec {
|
let param =
|
||||||
name = "atd";
|
if stdenv.lib.versionAtLeast ocaml.version "4.02"
|
||||||
version = "1.1.2";
|
then {
|
||||||
|
version = "1.12.0";
|
||||||
|
sha256 = "1pcd4fqbilv8zm2mc1nj2s26vc5y8vnisg1q1y6bjx23wxidb09y";
|
||||||
|
buildPhase = "jbuilder build -p atd";
|
||||||
|
inherit (jbuilder) installPhase;
|
||||||
|
} else {
|
||||||
|
version = "1.1.2";
|
||||||
|
sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291";
|
||||||
|
buildPhase = "";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
make PREFIX=$out install
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
inherit (param) version buildPhase installPhase;
|
||||||
|
name = "ocaml${ocaml.version}-atd-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/mjambon/atd/archive/v${version}.tar.gz";
|
url = "https://github.com/mjambon/atd/archive/v${version}.tar.gz";
|
||||||
sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291";
|
inherit (param) sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
createFindlibDestdir = true;
|
||||||
mkdir -p $out/bin
|
|
||||||
make PREFIX=$out install
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ which ];
|
buildInputs = [ which jbuilder ocaml findlib menhir ];
|
||||||
propagatedBuildInputs = [ menhir easy-format ];
|
propagatedBuildInputs = [ easy-format ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/mjambon/atd;
|
homepage = https://github.com/mjambon/atd;
|
||||||
|
Loading…
Reference in New Issue
Block a user