Suggested edits
This commit is contained in:
parent
6e6c1448fa
commit
b1f0e3ebc5
2 changed files with 8 additions and 6 deletions
|
@ -1,17 +1,19 @@
|
||||||
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
|
{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
|
||||||
|
|
||||||
{ name, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
|
{ pname, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
|
||||||
minimumOcamlVersion ? null,
|
minimumOCamlVersion ? null,
|
||||||
createFindlibDestdir ? true,
|
createFindlibDestdir ? true,
|
||||||
dontStrip ? true,
|
dontStrip ? true,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
assert minimumOcamlVersion != null ->
|
if args ? minimumOCamlVersion &&
|
||||||
stdenv.lib.versionOlder minimumOcamlVersion ocaml.version;
|
! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion
|
||||||
|
then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
|
||||||
|
else
|
||||||
|
|
||||||
stdenv.mkDerivation (args // {
|
stdenv.mkDerivation (args // {
|
||||||
name = "ocaml${ocaml.version}-${name}-${version}";
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
||||||
|
|
||||||
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;
|
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, ocaml_extlib, num }:
|
{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, ocaml_extlib, num }:
|
||||||
|
|
||||||
buildOasisPackage rec {
|
buildOasisPackage rec {
|
||||||
name = "tcslib";
|
pname = "tcslib";
|
||||||
version = "0.3";
|
version = "0.3";
|
||||||
|
|
||||||
minimumOCamlVersion = "4.03.0";
|
minimumOCamlVersion = "4.03.0";
|
||||||
|
|
Loading…
Reference in a new issue