about summary refs log tree commit diff
path: root/pkgs/development/java-modules/redshift_jdbc/default.nix
blob: ab15b136e14c98404fda60fd326a24edc0f869f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, stdenv, fetchMavenArtifact }:

stdenv.mkDerivation rec {
  pname = "redshift-jdbc";
  version = "2.1.0.3";

  src = fetchMavenArtifact {
    artifactId = "redshift-jdbc42";
    groupId = "com.amazon.redshift";
    sha256 = "sha256-TO/JXh/pZ7tUZGfHqkzgZx18gLnISvnPVyGavzFv6vo=";
    inherit version;
  };

  installPhase = ''
    runHook preInstall
    install -m444 -D $src/share/java/redshift-jdbc42-${version}.jar $out/share/java/redshift-jdbc42.jar
    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://github.com/aws/amazon-redshift-jdbc-driver/";
    description =
      "JDBC 4.2 driver for Amazon Redshift allowing Java programs to connect to a Redshift database";
    license = licenses.asl20;
    platforms = platforms.unix;
    maintainers = with maintainers; [ sir4ur0n ];
  };
}