btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / li / libnss-mysql / package.nix
blob1333128011191a58a5eb16231678ff3688f71491
1 { lib
2 , nixosTests
3 , stdenv
4 , fetchFromGitHub
5 , autoreconfHook
6 , which
7 , libmysqlclient
8 }:
10 stdenv.mkDerivation rec {
11   pname = "libnss-mysql";
12   version = "1.7.1";
14   src = fetchFromGitHub {
15     owner = "saknopper";
16     repo = "libnss-mysql";
17     rev = "v${version}";
18     sha256 = "1fhsswa3h2nkhjkyjxxqnj07rlx6bmfvd8j521snimx2jba8h0d6";
19   };
21   nativeBuildInputs = [ autoreconfHook which ];
22   buildInputs = [ libmysqlclient ];
24   configureFlags = [ "--sysconfdir=/etc" ];
25   installFlags = [ "sysconfdir=$(out)/etc" ];
26   postInstall = ''
27     rm -r $out/etc
28   '';
30   passthru.tests = {
31     inherit (nixosTests) auth-mysql;
32   };
34   meta = with lib; {
35     description = "MySQL module for the Solaris Nameservice Switch (NSS)";
36     homepage = "https://github.com/saknopper/libnss-mysql";
37     license = licenses.gpl2Plus;
38     platforms = platforms.linux;
39     maintainers = with maintainers; [ netali ];
40   };