depot/third_party/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

42 lines
1,013 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
stdenv.mkDerivation ({
version = "0.1";
name = "ocaml${ocaml.version}-seq-0.1";
meta = {
license = stdenv.lib.licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.vbgl ];
homepage = "https://github.com/c-cube/seq";
inherit (ocaml.meta) platforms;
};
} // (if stdenv.lib.versionOlder ocaml.version "4.07" then {
src = fetchFromGitHub {
owner = "c-cube";
repo = "seq";
rev = "0.1";
sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv";
};
buildInputs = [ ocaml findlib ocamlbuild ];
createFindlibDestdir = true;
meta.description = "Compatibility package for OCamls standard iterator type starting from 4.07";
} else {
src = ./src-base;
dontBuild = true;
installPhase = ''
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq
cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq
'';
meta.description = "dummy backward-compatibility package for iterators";
}))