summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/elpi/default.nix
blob: e2d2a2c5dc9f5bbc043beafb3e81460d4f44b17b (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, lib, fetchzip, buildDunePackage, camlp5
, ppxlib, ppx_deriving, re, perl, ncurses
, version ? "1.12.0"
}:
with lib;
let fetched = import ../../../build-support/coq/meta-fetch/default.nix
  {inherit lib stdenv fetchzip; } ({
    release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is";
    release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5";
    releaseRev = v: "v${v}";
    location = { domain = "github.com"; owner = "LPCIC"; repo = "elpi"; };
  }) version;
in
buildDunePackage rec {
  pname = "elpi";
  inherit (fetched) version src;

  minimumOCamlVersion = "4.04";

  buildInputs = [ perl ncurses ];

  propagatedBuildInputs = [ camlp5 ppxlib ppx_deriving re ];

  meta = {
    description = "Embeddable λProlog Interpreter";
    license = licenses.lgpl21Plus;
    maintainers = [ maintainers.vbgl ];
    homepage = "https://github.com/LPCIC/elpi";
  };

  postPatch = ''
    substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols"
  '';

  useDune2 = true;
}