3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix

31 lines
928 B
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
2018-03-28 09:20:56 +01:00
if !lib.versionAtLeast ocaml.version "4.02"
2018-03-28 09:20:56 +01:00
then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-ocp-ocamlres-${version}";
version = "0.4";
src = fetchFromGitHub {
owner = "OCamlPro";
repo = "ocp-ocamlres";
rev = "v${version}";
sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
};
buildInputs = [ ocaml findlib astring pprint ];
createFindlibDestdir = true;
installFlags = [ "BINDIR=$(out)/bin" ];
preInstall = "mkdir -p $out/bin";
meta = {
description = "A simple tool and library to embed files and directories inside OCaml executables";
license = lib.licenses.lgpl3Plus;
homepage = "https://www.typerex.org/ocp-ocamlres.html";
maintainers = [ lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
};
}