about summary refs log tree commit diff
path: root/pkgs/tools/misc/lbdb/default.nix
blob: 43dab4772d5f1433daeaa7b1d74411e6973101cd (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ lib
, stdenv
, fetchurl
, fetchpatch
, perl
, bsd-finger
, withAbook ? true, abook
, withGnupg ? true, gnupg
, withGoobook ? true, goobook
, withKhard ? true, khard
, withMu ? true, mu
}:

let
  perl' = perl.withPackages (p: with p; [
    AuthenSASL
    ConvertASN1
    IOSocketSSL
    perlldap
  ]);
in
stdenv.mkDerivation rec {
  pname = "lbdb";
  version = "0.48.1";

  src = fetchurl {
    url = "https://www.spinnaker.de/lbdb/download/lbdb_${version}.tar.gz";
    sha256 = "1gr5l2fr9qbdccga8bhsrpvz6jxigvfkdxrln9wyf2xpps5cdjxh";
  };

  buildInputs = [ perl' ]
    ++ lib.optional (!stdenv.isDarwin) bsd-finger
    ++ lib.optional withAbook abook
    ++ lib.optional withGnupg gnupg
    ++ lib.optional withGoobook goobook
    ++ lib.optional withKhard khard
    ++ lib.optional withMu mu;

  configureFlags = [ ]
    ++ lib.optional withAbook "--with-abook"
    ++ lib.optional withGnupg "--with-gpg"
    ++ lib.optional withGoobook "--with-goobook"
    ++ lib.optional withKhard "--with-khard"
    ++ lib.optional withMu "--with-mu";

  patches = [
    ./add-methods-to-rc.patch
    # fix undefined exec_prefix. Remove with the next release
    (fetchpatch {
      url = "https://github.com/RolandRosenfeld/lbdb/commit/60b7bae255011f59212d96adfbded459d6a27129.patch";
      sha256 = "129zg086glmlalrg395jq8ljcp787dl3rxjf9v7apsd8mqfdkl2v";
      excludes = [ "debian/changelog" ];
    })
  ];

  meta = with lib; {
    homepage = "https://www.spinnaker.de/lbdb/";
    description = "The Little Brother's Database";
    license = licenses.gpl2;
    maintainers = with maintainers; [ kaiha bfortz ];
    platforms = platforms.all;
  };
}