2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-csv";
|
|
|
|
version = "1.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://github.com/Chris00/ocaml-csv/releases/download/${version}/csv-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1ca7jgg58j24pccs5fshis726s06fdcjshnwza5kwxpjgdbvc63g";
|
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
|
|
|
|
|
|
|
|
buildPhase = "ocaml setup.ml -build";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "ocaml setup.ml -test";
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
ocaml setup.ml -install
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A pure OCaml library to read and write CSV files";
|
|
|
|
homepage = "https://github.com/Chris00/ocaml-csv";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2022-03-30 09:31:56 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|