about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml/obuild/default.nix
blob: 318e9f517dcfdce0ed0cf586da75abd43b6a177c (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
{ lib, stdenv, fetchFromGitHub, ocaml }:

stdenv.mkDerivation rec {
  pname = "obuild";
  version = "0.1.10";

  src = fetchFromGitHub {
    owner = "ocaml-obuild";
    repo = "obuild";
    rev = "obuild-v${version}";
    sha256 = "sha256-dqWP9rwWmr7i3O29v/kipJL01B3qQozaToOFCdfTWZU=";
  };

  buildInputs = [ ocaml ];

  buildPhase = ''
    patchShebangs ./bootstrap
    ./bootstrap
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp dist/build/obuild/obuild dist/build/obuild-from-oasis/obuild-from-oasis dist/build/obuild-simple/obuild-simple $out/bin/
  '';

  meta = {
    homepage = "https://github.com/ocaml-obuild/obuild";
    platforms = ocaml.meta.platforms or [ ];
    description = "Simple package build system for OCaml";
    license = lib.licenses.lgpl21;
    maintainers = with lib.maintainers; [ volth ];
  };
}