diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2022-07-19 22:28:50 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2022-07-21 09:16:35 +0200 |
commit | d2b3250200e51d9b5557488dd73446abba5a98f3 (patch) | |
tree | 673f519a796fe0d6c656fc2544ec578901aa3fb2 | |
parent | 4a9de789e1ce361e2d1a1106b459b53c2d49c724 (diff) |
ocamlPackages.mariadb: 1.1.4 → 1.1.6
-rw-r--r-- | pkgs/development/ocaml-modules/mariadb/default.nix | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/mariadb/default.nix b/pkgs/development/ocaml-modules/mariadb/default.nix index 2c3c7c423ac06..4aaaf11450bbf 100644 --- a/pkgs/development/ocaml-modules/mariadb/default.nix +++ b/pkgs/development/ocaml-modules/mariadb/default.nix @@ -1,26 +1,32 @@ -{ lib, fetchFromGitHub, buildOasisPackage +{ lib, fetchurl, stdenv +, ocaml, findlib, ocamlbuild , ctypes, mariadb, libmysqlclient }: -buildOasisPackage rec { - pname = "mariadb"; - version = "1.1.4"; +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") + "mariadb is not available for OCaml ${ocaml.version}" - minimumOCamlVersion = "4.07.0"; +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-mariadb"; + version = "1.1.6"; - src = fetchFromGitHub { - owner = "andrenth"; - repo = "ocaml-mariadb"; - rev = version; - sha256 = "1rxqvxr6sv4x2hsi05qm9jz0asaq969m71db4ckl672rcql1kwbr"; + src = fetchurl { + url = "https://github.com/andrenth/ocaml-mariadb/releases/download/${version}/ocaml-mariadb-${version}.tar.gz"; + sha256 = "sha256-3/C1Gz6luUzS7oaudLlDHMT6JB2v5OdbLVzJhtayHGM="; }; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; buildInputs = [ mariadb libmysqlclient ]; propagatedBuildInputs = [ ctypes ]; + strictDeps = true; + + preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs"; + meta = { description = "OCaml bindings for MariaDB"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bcc32 ]; homepage = "https://github.com/andrenth/ocaml-mariadb"; + inherit (ocaml.meta) platforms; }; } |