nixpkgs/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix

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

36 lines
999 B
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
2018-03-28 08:20:56 +00:00
if lib.versionOlder ocaml.version "4.02"
2018-03-28 08:20:56 +00:00
then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
2022-02-06 22:35:27 +00:00
pname = "ocaml${ocaml.version}-ocp-ocamlres";
version = "0.4";
src = fetchFromGitHub {
owner = "OCamlPro";
repo = "ocp-ocamlres";
rev = "v${version}";
sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
};
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ astring pprint ];
strictDeps = true;
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";
homepage = "https://www.typerex.org/ocp-ocamlres.html";
license = lib.licenses.lgpl3Plus;
maintainers = [ lib.maintainers.vbgl ];
mainProgram = "ocp-ocamlres";
inherit (ocaml.meta) platforms;
};
}