about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/facile/default.nix
blob: e8553ebf812e6206c43929e3f21aa59e1128365c (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
37
38
{ stdenv, fetchurl, ocaml, findlib }:

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-facile-${version}";

  version = "1.1.3";

  src = fetchurl {
    url = "http://opti.recherche.enac.fr/facile/distrib/facile-${version}.tar.gz";
    sha256 = "1v4apqcw4gm36ph5xwf1wxaaza0ggvihvgsdslnf33fa1pdkvdjw";
  };

  dontAddPrefix = 1;

  buildInputs = [ ocaml findlib ];

  createFindlibDestdir = true;

  installFlags = [ "FACILEDIR=$(OCAMLFIND_DESTDIR)/facile" ];

  postInstall = ''
    cat > $OCAMLFIND_DESTDIR/facile/META <<EOF
    version = "${version}"
    name = "facile"
    description = "A Functional Constraint Library"
    requires = ""
    archive(byte) = "facile.cma"
    archive(native) = "facile.cmxa"
    EOF
  '';

  meta = {
    homepage = "http://opti.recherche.enac.fr/facile/";
    license = stdenv.lib.licenses.lgpl21Plus;
    description = "A Functional Constraint Library";
    platforms = stdenv.lib.platforms.unix;
  };
}