mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, qtest, result }:
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
then throw "sequence is not available for OCaml ${ocaml.version}"
|
|
else
|
|
|
|
let version = "1.1"; in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "ocaml${ocaml.version}-sequence-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "c-cube";
|
|
repo = "sequence";
|
|
rev = version;
|
|
sha256 = "08j37nldw47syq3yw4mzhhvya43knl0d7biddp0q9hwbaxhzgi44";
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib dune qtest ];
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
doCheck = true;
|
|
checkPhase = "dune runtest";
|
|
|
|
inherit (dune) installPhase;
|
|
|
|
meta = {
|
|
homepage = https://github.com/c-cube/sequence;
|
|
description = "Simple sequence (iterator) datatype and combinators";
|
|
longDescription = ''
|
|
Simple sequence datatype, intended to transfer a finite number of
|
|
elements from one data structure to another. Some transformations on sequences,
|
|
like `filter`, `map`, `take`, `drop` and `append` can be performed before the
|
|
sequence is iterated/folded on.
|
|
'';
|
|
license = stdenv.lib.licenses.bsd2;
|
|
platforms = ocaml.meta.platforms or [];
|
|
};
|
|
}
|