mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 02:53:55 +00:00
a13cdfe520
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild. This makes some closures significantly smaller and makes cross compilation easier
35 lines
968 B
Nix
35 lines
968 B
Nix
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
|
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
|
then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
|
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";
|
|
license = lib.licenses.lgpl3Plus;
|
|
homepage = "https://www.typerex.org/ocp-ocamlres.html";
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
inherit (ocaml.meta) platforms;
|
|
};
|
|
}
|