nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 buildInputs = [ ocaml ];
15
16 buildPhase = ''
17 patchShebangs ./bootstrap
18 ./bootstrap
19 '';
20
21 installPhase = ''
22 mkdir -p $out/bin
23 cp dist/build/obuild/obuild dist/build/obuild-from-oasis/obuild-from-oasis dist/build/obuild-simple/obuild-simple $out/bin/
24 '';
25
26 meta = {
27 homepage = "https://github.com/ocaml-obuild/obuild";
28 platforms = ocaml.meta.platforms or [ ];
29 description = "Simple package build system for OCaml";
30 license = lib.licenses.lgpl21;
31 maintainers = with lib.maintainers; [ volth ];
32 };
33}