From 6b8de994a1022f32502cf2ed6757afb8f508aa86 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 25 Nov 2019 10:53:35 -0500 Subject: [PATCH] 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 000000000000..db6d2b1d4401 --- /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 000000000000..5f8d8f5ce31d --- /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 b6b7e7bae398..2be514f5a0e6 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 { };