From 6b8de994a1022f32502cf2ed6757afb8f508aa86 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 25 Nov 2019 10:53:35 -0500 Subject: [PATCH 1/7] ocamlPackages.cfstream: init at 1.3.0 --- .../ocaml-modules/cfstream/default.nix | 30 +++++++++++++++++++ .../ocaml-modules/cfstream/git_commit.patch | 13 ++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 3 files changed, 45 insertions(+) create mode 100644 pkgs/development/ocaml-modules/cfstream/default.nix create mode 100644 pkgs/development/ocaml-modules/cfstream/git_commit.patch diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix new file mode 100644 index 00000000000..db6d2b1d440 --- /dev/null +++ b/pkgs/development/ocaml-modules/cfstream/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, m4, core_kernel, ounit }: + +buildDunePackage rec { + pname = "cfstream"; + version = "1.3.0"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = version; + sha256 = "1bpzpci0cx6r3sdk183mm603wgzvvj46nlx0lpx44108anxcxbak"; + }; + + patches = [ ./git_commit.patch ]; + + buildInputs = [ m4 ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ core_kernel ]; + + doCheck = true; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Simple Core-inspired wrapper for standard library Stream module"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/pkgs/development/ocaml-modules/cfstream/git_commit.patch b/pkgs/development/ocaml-modules/cfstream/git_commit.patch new file mode 100644 index 00000000000..5f8d8f5ce31 --- /dev/null +++ b/pkgs/development/ocaml-modules/cfstream/git_commit.patch @@ -0,0 +1,13 @@ +diff --git a/lib/jbuild b/lib/jbuild +index fcc5a39..d72d50c 100644 +--- a/lib/jbuild ++++ b/lib/jbuild +@@ -10,7 +10,7 @@ + (rule ( + (targets (GIT_COMMIT)) + (deps (../bin/git_commit.sh)) +- (action (with-stdout-to ${@} (run ${<}))) ++ (action (with-stdout-to ${@} (run echo "None"))) + )) + + (rule ( diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b6b7e7bae39..2be514f5a0e 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -138,6 +138,8 @@ let cairo2 = callPackage ../development/ocaml-modules/cairo2 { }; + cfstream = callPackage ../development/ocaml-modules/cfstream { }; + charInfo_width = callPackage ../development/ocaml-modules/charInfo_width { }; checkseum = callPackage ../development/ocaml-modules/checkseum { }; From eddfe95f2935c8ce82e1791791344dacb068796a Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 25 Nov 2019 10:53:58 -0500 Subject: [PATCH 2/7] ocamlPackages.biocaml: init at 0.10.0 --- .../ocaml-modules/biocaml/default.nix | 30 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/biocaml/default.nix diff --git a/pkgs/development/ocaml-modules/biocaml/default.nix b/pkgs/development/ocaml-modules/biocaml/default.nix new file mode 100644 index 00000000000..4f97594fb7c --- /dev/null +++ b/pkgs/development/ocaml-modules/biocaml/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub +, ounit, async, base64, camlzip, cfstream +, core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm }: + +buildDunePackage rec { + pname = "biocaml"; + version = "0.10.0"; + + owner = "biocaml"; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + inherit owner; + repo = pname; + rev = "v${version}"; + sha256 = "0dghqx6jbzihmga8jjwwavs0wqksgcns4z1nmwj0ds9ik3mcra30"; + }; + + buildInputs = [ ppx_jane ppx_sexp_conv ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ async base64 camlzip cfstream core rresult uri xmlm ]; + + meta = with stdenv.lib; { + description = "Bioinformatics library for Ocaml"; + homepage = "http://${owner}.github.io/${pname}"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.gpl2; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2be514f5a0e..07792b85438 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -73,6 +73,8 @@ let bigstringaf = callPackage ../development/ocaml-modules/bigstringaf { }; + biocaml = callPackage ../development/ocaml-modules/biocaml { }; + bistro = callPackage ../development/ocaml-modules/bistro { }; bitstring = callPackage ../development/ocaml-modules/bitstring { }; From b103ec091154d55cece3ca461d510642784e05c1 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 2 Dec 2019 11:18:14 -0500 Subject: [PATCH 3/7] ocamlPackages.gnuplot: init at 0.5.3 --- .../ocaml-modules/gnuplot/default.nix | 22 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/gnuplot/default.nix diff --git a/pkgs/development/ocaml-modules/gnuplot/default.nix b/pkgs/development/ocaml-modules/gnuplot/default.nix new file mode 100644 index 00000000000..e473273b8da --- /dev/null +++ b/pkgs/development/ocaml-modules/gnuplot/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildDunePackage, fetchFromBitbucket, gnuplot, core }: + +buildDunePackage rec { + pname = "gnuplot"; + version = "0.5.3"; + + src = fetchFromBitbucket { + owner = "ogu"; + repo = "${pname}-ocaml"; + rev = "release-${version}"; + sha256 = "00sn9g46pj8pfh7faiyxg3pfhq7w9knafyabjr464bh6qz5kiin3"; + }; + + propagatedBuildInputs = [ core gnuplot ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Ocaml bindings to Gnuplot"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 07792b85438..40f09c8d556 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -297,6 +297,10 @@ let gmap = callPackage ../development/ocaml-modules/gmap { }; + gnuplot = callPackage ../development/ocaml-modules/gnuplot { + inherit (pkgs) gnuplot; + }; + herelib = callPackage ../development/ocaml-modules/herelib { }; higlo = callPackage ../development/ocaml-modules/higlo { }; From 6ac6e7ac0b97fb6757f6faed3c9d083f2fcc6efd Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 2 Dec 2019 11:18:51 -0500 Subject: [PATCH 4/7] owl: propagate eigen --- pkgs/development/ocaml-modules/owl/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/owl/default.nix b/pkgs/development/ocaml-modules/owl/default.nix index 95d4f6da704..eedfdba34ed 100644 --- a/pkgs/development/ocaml-modules/owl/default.nix +++ b/pkgs/development/ocaml-modules/owl/default.nix @@ -7,9 +7,8 @@ buildDunePackage rec { inherit (owl-base) version src meta; - buildInputs = [ eigen ]; checkInputs = [ alcotest ]; - propagatedBuildInputs = [ stdio stdlib-shims openblasCompat owl-base ]; + propagatedBuildInputs = [ eigen stdio stdlib-shims openblasCompat owl-base ]; # tests not enabled for now due to owlbarn/owl/issues/460 } From 13f55534cb2a7596339fc6e1acc450c87870d517 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 2 Dec 2019 11:19:39 -0500 Subject: [PATCH 5/7] owl-base: remove unused input --- pkgs/development/ocaml-modules/owl-base/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/owl-base/default.nix b/pkgs/development/ocaml-modules/owl-base/default.nix index b2546f3e93c..efdd2a28412 100644 --- a/pkgs/development/ocaml-modules/owl-base/default.nix +++ b/pkgs/development/ocaml-modules/owl-base/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildDunePackage, fetchFromGitHub, integers, stdlib-shims }: +{ stdenv, buildDunePackage, fetchFromGitHub, stdlib-shims }: buildDunePackage rec { pname = "owl-base"; From 3fa5a19cf867ae2ef46632ffebf910468d86f19f Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 2 Dec 2019 11:20:38 -0500 Subject: [PATCH 6/7] ocamlPackages_latest.phylogenetics: init at unstable-2019-11-15 --- .../ocaml-modules/phylogenetics/default.nix | 28 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/ocaml-modules/phylogenetics/default.nix diff --git a/pkgs/development/ocaml-modules/phylogenetics/default.nix b/pkgs/development/ocaml-modules/phylogenetics/default.nix new file mode 100644 index 00000000000..e665a323578 --- /dev/null +++ b/pkgs/development/ocaml-modules/phylogenetics/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ppx_deriving +, alcotest, biocaml, gnuplot, lacaml, menhir, owl }: + +buildDunePackage rec { + pname = "phylogenetics"; + version = "unstable-2019-11-15"; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = "91c03834db065cf4a86f33affbb9cfd216defc9f"; + sha256 = "0i9m0633a6a724as35ix8z3p1gj267cl0hmqrpw4qfq39zxmgnxb"; + }; + + minimumOCamlVersion = "4.08"; # e.g., uses Float.min + + checkInputs = [ alcotest ]; + propagatedBuildInputs = [ biocaml gnuplot lacaml menhir owl ppx_deriving ]; + + doCheck = false; # many tests require bppsuite + + meta = with stdenv.lib; { + inherit (std.meta) homepage; + description = "Bioinformatics library for Ocaml"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.cecill-b; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 40f09c8d556..1421abfc111 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -629,6 +629,8 @@ let pgsolver = callPackage ../development/ocaml-modules/pgsolver { }; + phylogenetics = callPackage ../development/ocaml-modules/phylogenetics { }; + piqi = callPackage ../development/ocaml-modules/piqi { base64 = base64_2; }; From f3f6aa4475bc43899527bc15111ee49e1ef5eb72 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Fri, 6 Dec 2019 12:14:38 -0500 Subject: [PATCH 7/7] metrics-unix: fix gnuplot input --- pkgs/top-level/ocaml-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1421abfc111..5b2fadd4dab 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -478,7 +478,9 @@ let metrics-lwt = callPackage ../development/ocaml-modules/metrics/lwt.nix { }; - metrics-unix = callPackage ../development/ocaml-modules/metrics/unix.nix { }; + metrics-unix = callPackage ../development/ocaml-modules/metrics/unix.nix { + inherit (pkgs) gnuplot; + }; mezzo = callPackage ../development/compilers/mezzo { };