about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml/ocamlscript/default.nix
blob: 82a495b733b5307b296993372173773ca220813e (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
{lib, stdenv, fetchurl, ocaml, findlib, camlp4}:
stdenv.mkDerivation rec {
  pname = "ocamlscript";
  version = "2.0.3";
  src = fetchurl {
    url = "https://mjambon.com/releases/${pname}/${pname}-${version}.tar.gz";
    sha256 = "1v1i24gijxwris8w4hi95r9swld6dm7jbry0zp72767a3g5ivlrd";
  };

  propagatedBuildInputs = [ ocaml findlib camlp4 ];

  patches = [ ./Makefile.patch ];

  buildFlags = [ "PREFIX=$(out)" ];
  installFlags = [ "PREFIX=$(out)" ];

  preInstall = "mkdir $out/bin";
  createFindlibDestdir = true;

  meta = with lib; {
    homepage = "http://martin.jambon.free.fr/ocamlscript.html";
    license = licenses.boost;
    platforms = ocaml.meta.platforms or [];
    description = "Natively-compiled OCaml scripts";
    maintainers = [ maintainers.vbgl ];
  };
}