Merge master into staging-next
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildDunePackage
|
||||
, bigarray-compat
|
||||
, containers
|
||||
, cppo
|
||||
, ctypes
|
||||
, integers
|
||||
, num
|
||||
, ppxlib
|
||||
, re
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ppx_cstubs";
|
||||
version = "0.6.1.1";
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fdopen";
|
||||
repo = "ppx_cstubs";
|
||||
rev = version;
|
||||
sha256 = "0rgg78435ypi6ryhcq5ljkch4qjvra2jqjd47c2hhhcbwvi2ssxh";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
bigarray-compat
|
||||
containers
|
||||
cppo
|
||||
ctypes
|
||||
integers
|
||||
num
|
||||
ppxlib
|
||||
re
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/fdopen/ppx_cstubs";
|
||||
description = "Preprocessor for easier stub generation with ocaml-ctypes";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.osener ];
|
||||
};
|
||||
}
|
||||
@@ -1,15 +1,28 @@
|
||||
{ lib, fetchurl, buildDunePackage
|
||||
, cppo, ppxlib, ppx_derivers, result, ounit, ocaml-migrate-parsetree
|
||||
{ lib
|
||||
, fetchurl
|
||||
, buildDunePackage
|
||||
, cppo
|
||||
, ppxlib
|
||||
, ppx_derivers
|
||||
, result
|
||||
, ounit
|
||||
, ocaml-migrate-parsetree
|
||||
, ocaml-migrate-parsetree-2-1
|
||||
}:
|
||||
|
||||
let params =
|
||||
if lib.versionAtLeast ppxlib.version "0.15"
|
||||
then {
|
||||
if lib.versionAtLeast ppxlib.version "0.20" then {
|
||||
version = "5.2.1";
|
||||
sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
|
||||
useOMP2 = true;
|
||||
} else if lib.versionAtLeast ppxlib.version "0.15" then {
|
||||
version = "5.1";
|
||||
sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
|
||||
useOMP2 = false;
|
||||
} else {
|
||||
version = "5.0";
|
||||
sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
|
||||
useOMP2 = false;
|
||||
}
|
||||
; in
|
||||
|
||||
@@ -25,7 +38,13 @@ buildDunePackage rec {
|
||||
};
|
||||
|
||||
buildInputs = [ ppxlib cppo ];
|
||||
propagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers result ];
|
||||
propagatedBuildInputs = [
|
||||
(if params.useOMP2
|
||||
then ocaml-migrate-parsetree-2-1
|
||||
else ocaml-migrate-parsetree)
|
||||
ppx_derivers
|
||||
result
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ ounit ];
|
||||
|
||||
@@ -25,6 +25,10 @@ let param = {
|
||||
sha256 = "1ciy6va2gjrpjs02kha83pzh0x1gkmfsfsdgabbs1v14a8qgfibm";
|
||||
min_version = "4.07";
|
||||
};
|
||||
"0.22.0" = {
|
||||
sha256 = "0kf7lgcwygf6zlx7rwddqpqvasa6v7xiq0bqal8vxlib6lpg074q";
|
||||
min_version = "4.07";
|
||||
};
|
||||
}."${version}"; in
|
||||
|
||||
if param ? max_version && lib.versionAtLeast ocaml.version param.max_version
|
||||
|
||||
Reference in New Issue
Block a user