summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libnss-mysql/default.nix
blob: 77e629b03074d87f318108e16abff25b556fd2b7 (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
29
30
{ lib, stdenv, fetchFromGitHub, autoreconfHook, which, libmysqlclient }:

stdenv.mkDerivation rec {
  pname = "libnss-mysql";
  version = "1.7.1";

  src = fetchFromGitHub {
    owner = "saknopper";
    repo = "libnss-mysql";
    rev = "v${version}";
    sha256 = "1fhsswa3h2nkhjkyjxxqnj07rlx6bmfvd8j521snimx2jba8h0d6";
  };

  nativeBuildInputs = [ autoreconfHook which ];
  buildInputs = [ libmysqlclient ];

  configureFlags = [ "--sysconfdir=/etc" ];
  installFlags = [ "sysconfdir=$(out)/etc" ];
  postInstall = ''
    rm -r $out/etc
  '';

  meta = with lib; {
    description = "MySQL module for the Solaris Nameservice Switch (NSS)";
    homepage = "https://github.com/saknopper/libnss-mysql";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ netali ];
  };
}