2021-07-07 10:34:04 +01:00
|
|
|
{ lib
|
|
|
|
, buildDunePackage
|
|
|
|
, ocaml
|
|
|
|
, tezos-stdlib
|
|
|
|
, tezos-protocol-environment-packer
|
|
|
|
, zarith
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage {
|
|
|
|
pname = "tezos-protocol-environment-sigs";
|
2021-09-21 09:47:59 +01:00
|
|
|
inherit (tezos-stdlib) version useDune2;
|
|
|
|
src = "${tezos-stdlib.base_src}/src/lib_protocol_environment";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
ls ./sigs/v0
|
|
|
|
cp -f ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith/z.mli ./sigs/v1/z.mli
|
|
|
|
cp -f ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith/z.mli ./sigs/v2/z.mli
|
|
|
|
cp -f ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith/z.mli ./sigs/v3/z.mli
|
|
|
|
sed -i 's/out_channel/Stdlib.out_channel/g' ./sigs/v1/z.mli
|
|
|
|
sed -i 's/Buffer/Stdlib.Buffer/g' ./sigs/v1/z.mli
|
|
|
|
sed -i 's/out_channel/Stdlib.out_channel/g' ./sigs/v2/z.mli
|
|
|
|
sed -i 's/Buffer/Stdlib.Buffer/g' ./sigs/v2/z.mli
|
|
|
|
sed -i 's/out_channel/Stdlib.out_channel/g' ./sigs/v3/z.mli
|
|
|
|
sed -i 's/Buffer/Stdlib.Buffer/g' ./sigs/v3/z.mli
|
|
|
|
'';
|
2021-07-07 10:34:04 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
tezos-protocol-environment-packer
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
tezos-stdlib
|
|
|
|
];
|
|
|
|
|
2021-09-21 09:47:59 +01:00
|
|
|
doCheck = true;
|
2021-07-07 10:34:04 +01:00
|
|
|
|
|
|
|
meta = tezos-stdlib.meta // {
|
|
|
|
description = "Tezos: restricted typing environment for the economic protocols";
|
|
|
|
};
|
|
|
|
}
|