From 7eb1e9bf0a8e2ce3f553e61c8c7b4a5afcd40d9c Mon Sep 17 00:00:00 2001 From: toastal Date: Tue, 27 Feb 2024 21:15:17 +0700 Subject: [PATCH] ocamlPackages.xxhash: init at 0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.1 is an ‘official’ release, but 0.2 tag includes updates --- .../ocaml-modules/xxhash/default.nix | 44 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/ocaml-modules/xxhash/default.nix diff --git a/pkgs/development/ocaml-modules/xxhash/default.nix b/pkgs/development/ocaml-modules/xxhash/default.nix new file mode 100644 index 000000000000..fe212dd0eb70 --- /dev/null +++ b/pkgs/development/ocaml-modules/xxhash/default.nix @@ -0,0 +1,44 @@ +{ lib +, fetchFromGitHub +, buildDunePackage +, xxHash +, ctypes +, dune-configurator +, ppx_expect +}: + +buildDunePackage rec { + pname = "xxhash"; + version = "0.2"; + + minimalOCamlVersion = "4.08"; + + src = fetchFromGitHub { + owner = "314eter"; + repo = "ocaml-xxhash"; + rev = "refs/tags/v${version}"; + hash = "sha256-0+ac5EWV9DCVMT4wOcXC95GVEwsUIZzFn2laSzmK6jE="; + }; + + buildInputs = [ + dune-configurator + ]; + + propagatedBuildInputs = [ + ctypes + xxHash + ]; + + doCheck = true; + + checkInputs = [ + ppx_expect + ]; + + meta = { + homepage = "https://github.com/314eter/ocaml-xxhash"; + description = "Bindings for xxHash, an extremely fast hash algorithm"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ toastal ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 3bdd9b4df8a9..f9f1bc765850 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1905,6 +1905,8 @@ let xtmpl_ppx = callPackage ../development/ocaml-modules/xtmpl/ppx.nix { }; + xxhash = callPackage ../development/ocaml-modules/xxhash/default.nix { }; + ### Y ### yaml = callPackage ../development/ocaml-modules/yaml { };