From 3912cf9371ea8d9141e6c09a37939a3f6fdcb028 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 10 Jun 2021 16:23:06 +0200 Subject: [PATCH] ocamlPackages.bz2: init at 0.7.0 Closes #126469 --- .../development/ocaml-modules/bz2/default.nix | 38 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/bz2/default.nix diff --git a/pkgs/development/ocaml-modules/bz2/default.nix b/pkgs/development/ocaml-modules/bz2/default.nix new file mode 100644 index 000000000000..7de24c134629 --- /dev/null +++ b/pkgs/development/ocaml-modules/bz2/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }: + +if !lib.versionAtLeast ocaml.version "4.02" +then throw "bz2 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-bz2"; + version = "0.7.0"; + + src = fetchFromGitLab { + owner = "irill"; + repo = "camlbz2"; + rev = version; + sha256 = "sha256-jBFEkLN2fbC3LxTu7C0iuhvNg64duuckBHWZoBxrV/U="; + }; + + autoreconfFlags = "-I ."; + + nativeBuildInputs = [ + autoreconfHook + ]; + + buildInputs = [ + ocaml + findlib + bzip2 + ]; + + preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs"; + + meta = with lib; { + description = "OCaml bindings for the libbz2 (AKA, bzip2) (de)compression library"; + downloadPage = "https://gitlab.com/irill/camlbz2"; + license = licenses.lgpl21; + maintainers = with maintainers; [ superherointj ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 92894bf7a3bb..4feaf9f6f74e 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -80,6 +80,8 @@ let bos = callPackage ../development/ocaml-modules/bos { }; + bz2 = callPackage ../development/ocaml-modules/bz2 { }; + ca-certs = callPackage ../development/ocaml-modules/ca-certs { }; ca-certs-nss = callPackage ../development/ocaml-modules/ca-certs-nss { };