ocamlPackages.csv: fix for OCaml ≥ 5.0
This commit is contained in:
parent
edf81049b1
commit
832ce14a21
|
@ -4,7 +4,9 @@ let inherit (ocamlPackages) buildDunePackage csv uutf; in
|
||||||
|
|
||||||
buildDunePackage {
|
buildDunePackage {
|
||||||
pname = "csvtool";
|
pname = "csvtool";
|
||||||
inherit (csv) src version useDune2;
|
inherit (csv) src version;
|
||||||
|
|
||||||
|
duneVersion = "3";
|
||||||
|
|
||||||
buildInputs = [ csv uutf ];
|
buildInputs = [ csv uutf ];
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,11 @@ buildDunePackage rec {
|
||||||
sha256 = "13m9n8mdss6jfbiw7d5bybxn4n85vmg4zw7dc968qrgjfy0w9zhk";
|
sha256 = "13m9n8mdss6jfbiw7d5bybxn4n85vmg4zw7dc968qrgjfy0w9zhk";
|
||||||
};
|
};
|
||||||
|
|
||||||
useDune2 = true;
|
preConfigure = ''
|
||||||
|
substituteInPlace src/dune --replace '(libraries bytes)' ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
duneVersion = "3";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A pure OCaml library to read and write CSV files";
|
description = "A pure OCaml library to read and write CSV files";
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
{ lib, buildDunePackage, ocaml, csv, ocaml_lwt }:
|
{ lib, buildDunePackage, csv, lwt }:
|
||||||
|
|
||||||
if lib.versionOlder ocaml.version "4.02"
|
|
||||||
then throw "csv-lwt is not available for OCaml ${ocaml.version}"
|
|
||||||
else
|
|
||||||
|
|
||||||
buildDunePackage {
|
buildDunePackage {
|
||||||
pname = "csv-lwt";
|
pname = "csv-lwt";
|
||||||
inherit (csv) src version useDune2 meta;
|
inherit (csv) src version meta;
|
||||||
|
|
||||||
propagatedBuildInputs = [ csv ocaml_lwt ];
|
preConfigure = ''
|
||||||
|
substituteInPlace lwt/dune --replace '(libraries bytes' '(libraries '
|
||||||
|
'';
|
||||||
|
|
||||||
doCheck = lib.versionAtLeast ocaml.version "4.03";
|
duneVersion = "3";
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ csv lwt ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue