nixpkgs/pkgs/development/tools/ocaml/ocamlbuild/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, ocaml, findlib }:
2021-07-17 17:56:23 +00:00
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-ocamlbuild";
version = "0.14.2";
src = fetchFromGitHub {
owner = "ocaml";
repo = "ocamlbuild";
rev = version;
sha256 = "sha256-QAqIMdi6M9V7RIX0kppKPSkCJE/pLx2iMdh5XYXQCJs=";
};
createFindlibDestdir = true;
2021-08-14 12:00:00 +00:00
nativeBuildInputs = [ ocaml findlib ];
strictDeps = true;
# x86_64-unknown-linux-musl-ld: -r and -pie may not be used together
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
configurePhase = ''
runHook preConfigure
make -f configure.make Makefile.config \
"OCAMLBUILD_PREFIX=$out" \
"OCAMLBUILD_BINDIR=$out/bin" \
"OCAMLBUILD_MANDIR=$out/share/man" \
"OCAMLBUILD_LIBDIR=$OCAMLFIND_DESTDIR"
runHook postConfigure
'';
meta = with lib; {
2016-12-04 11:25:37 +00:00
description = "A build system with builtin rules to easily build most OCaml projects";
homepage = "https://github.com/ocaml/ocamlbuild/";
2016-12-04 11:25:37 +00:00
license = licenses.lgpl2;
maintainers = with maintainers; [ vbgl ];
mainProgram = "ocamlbuild";
inherit (ocaml.meta) platforms;
2016-12-04 11:25:37 +00:00
};
}