1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 12:02:47 +00:00
nixpkgs/pkgs/development/ocaml-modules/sequence/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2018-09-05 17:11:47 +01:00
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, qtest, result }:
2016-02-17 17:54:23 +00:00
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "sequence is not available for OCaml ${ocaml.version}"
else
let version = "1.1"; in
2016-02-17 17:54:23 +00:00
stdenv.mkDerivation {
2017-07-08 10:14:16 +01:00
name = "ocaml${ocaml.version}-sequence-${version}";
2016-02-17 17:54:23 +00:00
src = fetchFromGitHub {
owner = "c-cube";
repo = "sequence";
2017-07-08 10:14:16 +01:00
rev = version;
sha256 = "08j37nldw47syq3yw4mzhhvya43knl0d7biddp0q9hwbaxhzgi44";
2016-02-17 17:54:23 +00:00
};
2018-09-05 17:11:47 +01:00
buildInputs = [ ocaml findlib dune qtest ];
propagatedBuildInputs = [ result ];
2016-02-17 17:54:23 +00:00
doCheck = true;
2018-09-05 17:11:47 +01:00
checkPhase = "dune runtest";
2016-02-17 17:54:23 +00:00
2018-09-05 17:11:47 +01:00
inherit (dune) installPhase;
2016-02-17 17:54:23 +00:00
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 [];
2016-02-17 17:54:23 +00:00
};
}