nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 54 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ocaml, 6 findlib, 7 version ? if lib.versionAtLeast ocaml.version "4.08" then "0.16.1" else "0.14.3", 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "ocaml${ocaml.version}-ocamlbuild"; 12 inherit version; 13 14 src = fetchFromGitHub { 15 owner = "ocaml"; 16 repo = "ocamlbuild"; 17 rev = finalAttrs.version; 18 hash = 19 { 20 "0.14.3" = "sha256-dfcNu4ugOYu/M0rRQla7lXum/g1UzncdLGmpPYo0QUM="; 21 "0.16.1" = "sha256-RpHVX0o4QduN73j+omlZlycRJaGZWfwHO5kq/WsEGZE="; 22 } 23 ."${finalAttrs.version}"; 24 }; 25 26 createFindlibDestdir = true; 27 28 nativeBuildInputs = [ 29 ocaml 30 findlib 31 ]; 32 strictDeps = true; 33 34 configurePhase = '' 35 runHook preConfigure 36 37 make -f configure.make Makefile.config \ 38 "OCAMLBUILD_PREFIX=$out" \ 39 "OCAMLBUILD_BINDIR=$out/bin" \ 40 "OCAMLBUILD_MANDIR=$out/share/man" \ 41 "OCAMLBUILD_LIBDIR=$OCAMLFIND_DESTDIR" 42 43 runHook postConfigure 44 ''; 45 46 meta = { 47 description = "Build system with builtin rules to easily build most OCaml projects"; 48 homepage = "https://github.com/ocaml/ocamlbuild/"; 49 license = lib.licenses.lgpl2; 50 maintainers = with lib.maintainers; [ vbgl ]; 51 mainProgram = "ocamlbuild"; 52 inherit (ocaml.meta) platforms; 53 }; 54})