nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage.nix
Théo Zimmermann 1dac99b7c9 ocamlPackages.janeStreet package set: init at 0.9.0
This contains a collection of Jane Street packages at version 0.9.0.
Packages not already present in ocamlPackages are also made available
without the janeStreet prefix.
2017-05-30 20:50:36 +02:00

29 lines
737 B
Nix

{ stdenv, fetchFromGitHub, ocaml, jbuilder, findlib }:
{ name, version ? "0.9.0", buildInputs ? [], hash, meta, ...}@args:
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "${name}-${version} is not available for OCaml ${ocaml.version}" else
stdenv.mkDerivation (args // {
name = "ocaml${ocaml.version}-${name}-${version}";
inherit version;
src = fetchFromGitHub {
owner = "janestreet";
repo = name;
rev = "v${version}";
sha256 = hash;
};
buildInputs = [ ocaml jbuilder findlib ] ++ buildInputs;
inherit (jbuilder) installPhase;
meta = {
license = stdenv.lib.licenses.asl20;
inherit (ocaml.meta) platforms;
homepage = "https://github.com/janestreet/${name}";
} // meta;
})