From 40ba1f1f7289936cca0773b9424886f6d9079d77 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Thu, 26 Oct 2023 16:56:02 +0200 Subject: [PATCH] mariadb-connector-java: init at 3.2.0 https://mariadb.com/kb/en/about-mariadb-connector-j/ --- .../ma/mariadb-connector-java/package.nix | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/by-name/ma/mariadb-connector-java/package.nix diff --git a/pkgs/by-name/ma/mariadb-connector-java/package.nix b/pkgs/by-name/ma/mariadb-connector-java/package.nix new file mode 100644 index 000000000000..ecc790cebc14 --- /dev/null +++ b/pkgs/by-name/ma/mariadb-connector-java/package.nix @@ -0,0 +1,33 @@ +{ lib, maven, fetchFromGitHub }: + +maven.buildMavenPackage rec { + pname = "mariadb-connector-java"; + version = "3.2.0"; + + src = fetchFromGitHub { + owner = "mariadb-corporation"; + repo = "mariadb-connector-j"; + rev = "refs/tags/${version}"; + hash = "sha256-ssh6v2h/Ikl2Ulim6lSJ45avjKSCh3Vmtg+LPOgONRU="; + }; + + mvnHash = "sha256-MizBoFlpYxwwcU7rOac1h2VPJoXv3eRQgWRgsTh8Xno="; + + # Disable tests because they require networking + mvnParameters = "-DskipTests"; + + installPhase = '' + runHook preInstall + install -m444 -D target/mariadb-java-client-${version}.jar $out/share/java/mariadb-java-client.jar + runHook postInstall + ''; + + meta = with lib; { + description = "MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases"; + homepage = "https://mariadb.com/kb/en/about-mariadb-connector-j/"; + changelog = "https://mariadb.com/kb/en/mariadb-connector-j-release-notes/"; + license = licenses.lgpl21; + maintainers = with maintainers; [ anthonyroussel ]; + platforms = platforms.all; + }; +}