2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchMavenArtifact }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "postgresql-jdbc";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "42.2.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchMavenArtifact {
|
|
|
|
artifactId = "postgresql";
|
|
|
|
groupId = "org.postgresql";
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "0kjilsrz9shymfki48kg1q84la1870ixlh2lnfw347x8mqw2k2vh";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
install -m444 -D $src/share/java/*postgresql-${version}.jar $out/share/java/postgresql-jdbc.jar
|
2021-05-03 20:48:10 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://jdbc.postgresql.org/";
|
|
|
|
description = "JDBC driver for PostgreSQL allowing Java programs to connect to a PostgreSQL database";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|