summary refs log tree commit diff
path: root/pkgs/development/libraries/kerberos/heimdal.nix
blob: aeea290bdb28ac0d7331150d70911a42222319ca (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
{ stdenv, fetchurl, pkgconfig, flex, yacc, readline, openldap, libcap_ng
, sqlite, db, ncurses, openssl, cyrus_sasl
}:

stdenv.mkDerivation rec {
  name = "heimdal-1.5.3";

  src = fetchurl {
    urls = [
      "http://www.h5l.org/dist/src/${name}.tar.gz"
      "http://ftp.pdc.kth.se/pub/heimdal/src/${name}.tar.gz"
    ];
    sha256 = "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma";
  };

  ## ugly, X should be made an option
  configureFlags = [
    "--enable-hdb-openldap-module"
    "--with-capng"
    "--with-openldap=${openldap}"
    "--with-sqlite3=${sqlite}"
    "--with-openssl-lib=${openssl}/lib"
    "--without-x"
  ];

  # We need to build hcrypt for applications like samba
  postBuild = ''
    (cd lib/hcrypto; make)
    (cd include/hcrypto; make)
  '';

  postInstall = ''
    # Install hcrypto
    (cd lib/hcrypto; make install)
    (cd include/hcrypto; make install)

    # dont succeed with --libexec=$out/sbin, so
    mv "$out/libexec/"* $out/sbin/
    rmdir $out/libexec
  '';

  buildInputs = [
    pkgconfig flex yacc readline openldap libcap_ng sqlite db ncurses
    cyrus_sasl openssl
  ];

  meta = with stdenv.lib; {
    description = "an implementation of Kerberos 5 (and some more stuff) largely written in Sweden";
    license = licenses.bsd3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ wkennington ];
  };

  passthru.implementation = "heimdal";
}