Suggested edits

This commit is contained in:
Merlin Göttlinger 2019-08-07 09:50:46 +02:00
parent 6e6c1448fa
commit b1f0e3ebc5
No known key found for this signature in database
GPG key ID: F3DD4A06EDED86E5
2 changed files with 8 additions and 6 deletions

View file

@ -1,17 +1,19 @@
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
{ name, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
minimumOcamlVersion ? null,
{ pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
minimumOCamlVersion ? null,
createFindlibDestdir ? true,
dontStrip ? true,
...
}@args:
assert minimumOcamlVersion != null ->
stdenv.lib.versionOlder minimumOcamlVersion ocaml.version;
if args ? minimumOCamlVersion &&
! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion
then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation (args // {
name = "ocaml${ocaml.version}-${name}-${version}";
name = "ocaml${ocaml.version}-${pname}-${version}";
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;

View file

@ -1,7 +1,7 @@
{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, ocaml_extlib, num }:
buildOasisPackage rec {
name = "tcslib";
pname = "tcslib";
version = "0.3";
minimumOCamlVersion = "4.03.0";