1{ lib, stdenv, fetchFromGitHub, ocaml }:
2
3stdenv.mkDerivation rec {
4 pname = "obuild";
5 version = "0.1.10";
6
7 src = fetchFromGitHub {
8 owner = "ocaml-obuild";
9 repo = "obuild";
10 rev = "obuild-v${version}";
11 sha256 = "sha256-dqWP9rwWmr7i3O29v/kipJL01B3qQozaToOFCdfTWZU=";
12 };
13
14 strictDeps = true;
15
16 nativeBuildInputs = [ ocaml ];
17
18 buildPhase = ''
19 patchShebangs ./bootstrap
20 ./bootstrap
21 '';
22
23 installPhase = ''
24 mkdir -p $out/bin
25 cp dist/build/obuild/obuild dist/build/obuild-from-oasis/obuild-from-oasis dist/build/obuild-simple/obuild-simple $out/bin/
26 '';
27
28 meta = {
29 homepage = "https://github.com/ocaml-obuild/obuild";
30 platforms = ocaml.meta.platforms or [ ];
31 description = "Simple package build system for OCaml";
32 license = lib.licenses.lgpl21;
33 maintainers = with lib.maintainers; [ ];
34 };
35}