heimdal: 1.5.3 -> 2015-05-26

This commit is contained in:
William A. Kennington III 2015-05-29 00:36:05 -07:00
parent 4fa5cc71f2
commit 1e14f0a055
2 changed files with 89 additions and 55 deletions

View File

@ -1,95 +1,126 @@
{ stdenv, fetchurl, pkgconfig, flex, yacc { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, python, perl, yacc, flex
, texinfo ? null, perlPackages
# Optional Dependencies # Optional Dependencies
, openldap ? null, libcap_ng ? null, sqlite ? null, openssl ? null, db ? null , openldap ? null, libcap_ng ? null, sqlite ? null, openssl ? null, db ? null
, readline ? null, libedit ? null, pam ? null , readline ? null, libedit ? null, pam ? null
#, readline, openldap, libcap_ng # Extra Args
#, sqlite, db, ncurses, openssl, cyrus_sasl , prefix ? ""
}: }:
with stdenv; with stdenv;
with stdenv.lib;
let let
optOpenldap = shouldUsePkg openldap; libOnly = prefix == "lib";
optTexinfo = if libOnly then null else shouldUsePkg texinfo;
optOpenldap = if libOnly then null else shouldUsePkg openldap;
optLibcap_ng = shouldUsePkg libcap_ng; optLibcap_ng = shouldUsePkg libcap_ng;
optSqlite = shouldUsePkg sqlite; optSqlite = shouldUsePkg sqlite;
optOpenssl = shouldUsePkg openssl; optOpenssl = shouldUsePkg openssl;
optDb = shouldUsePkg db; optDb = shouldUsePkg db;
optReadline = shouldUsePkg readline; optReadline = shouldUsePkg readline;
optLibedit = shouldUsePkg libedit; optLibedit = shouldUsePkg libedit;
optPam = shouldUsePkg pam; optPam = if libOnly then null else shouldUsePkg pam;
in
stdenv.mkDerivation rec {
name = "heimdal-1.5.3";
src = fetchurl { lineParserStr = if optLibedit != null then "libedit"
urls = [ else if optReadline != null then "readline"
"http://www.h5l.org/dist/src/${name}.tar.gz" else "no";
"http://ftp.pdc.kth.se/pub/heimdal/src/${name}.tar.gz"
]; lineParserInputs = {
sha256 = "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma"; "libedit" = [ optLibedit ];
"readline" = [ optReadline ];
"no" = [ ];
}.${lineParserStr};
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "${prefix}heimdal-${version}";
version = "2015-05-26";
src = fetchFromGitHub {
owner = "heimdal";
repo = "heimdal";
rev = "50e2a5ce95f42d4963d359c27a832e61991a12b1";
sha256 = "10104vm192r1i7ccs1fan16h9n31saaswsmywmrb0cxc7jv3rj8x";
}; };
nativeBuildInputs = [ pkgconfig flex yacc ]; nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex optTexinfo ]
++ (with perlPackages; [ JSON ]);
buildInputs = [ buildInputs = [
optOpenldap optLibcap_ng optSqlite optOpenssl optDb optReadline optLibedit optOpenldap optLibcap_ng optSqlite optOpenssl optDb optPam
optPam ] ++ lineParserInputs;
];
configureFlags = [ configureFlags = [
(mkOther "sysconfdir" "/etc") (mkOther "sysconfdir" "/etc")
(mkOther "localstatedir" "/var") (mkOther "localstatedir" "/var")
(mkWith (optOpenldap != null) "openldap" optOpenldap) (mkWith (optOpenldap != null) "openldap" optOpenldap)
(mkEnable (optOpenldap != null) "hdb-openldap-module" null) (mkEnable (optOpenldap != null) "hdb-openldap-module" null)
(mkEnable true "pk-init" null) (mkEnable true "pk-init" null)
(mkEnable true "digest" null) (mkEnable true "digest" null)
(mkEnable true "kx509" null) (mkEnable true "kx509" null)
(mkWith (optLibcap_ng != null) "capng" null) (mkWith (optLibcap_ng != null) "capng" null)
(mkWith (optSqlite != null) "sqlite3" sqlite) (mkWith (optSqlite != null) "sqlite3" sqlite)
(mkEnable (optSqlite != null) "sqlite-cache" null) (mkEnable (optSqlite != null) "sqlite-cache" null)
(mkWith false "libintl" null) # TODO libintl fix (mkWith false "libintl" null) # TODO libintl fix
(mkWith true "hdbdir" "/var/lib/heimdal") (mkWith true "hdbdir" "/var/lib/heimdal")
(mkWith (optOpenssl != null) "openssl" optOpenssl) (mkEnable false "dce" null) # TODO: Add support
(mkEnable true "pthread-support" null) (mkEnable (!libOnly) "afs-support" null)
(mkEnable false "dce" null) # TODO: Add support (mkEnable true "mmap" null)
(mkEnable true "afs-support" null) (mkEnable (!libOnly) "afs-string-to-key" null)
(mkWith (optDb != null) "berkeley-db" optDb) (mkWith (lineParserStr == "readline") "readline" optReadline)
(mkEnable false "nmdb" null) (mkWith (lineParserStr == "libedit") "libedit" optLibedit)
(mkEnable false "developer" null) (mkWith false "hesiod" null)
(mkWith true "ipv6" null) (mkEnable (!libOnly) "kcm" null)
(mkEnable false "socket-wrapper" null) (mkEnable (optTexinfo != null) "heimdal-documentation" null)
(mkEnable true "otp" null) (mkWith true "ipv6" null)
(mkEnable false "osfc2" null) (mkEnable true "pthread-support" null)
(mkEnable true "mmap" null) (mkEnable false "osfc2" null)
(mkEnable true "afs-string-to-key" null) (mkEnable false "socket-wrapper" null)
(mkWith (optReadline != null) "readline" optReadline) (mkEnable (!libOnly) "otp" null)
(mkWith (optLibedit != null) "libedit" optLibedit) (mkEnable false "developer" null)
(mkWith false "x" null) (mkWith (optDb != null) "berkeley-db" optDb)
(mkEnable true "kcm" null) (mkEnable true "ndbm-db" null)
(mkEnable true "heimdal-documentation" null) (mkEnable false "mdb-db" null)
(mkWith (optOpenssl != null) "openssl" optOpenssl)
]; ];
preConfigure = '' buildPhase = optionalString libOnly ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -pthread" (cd include; make -j $NIX_BUILD_CORES)
(cd lib; make -j $NIX_BUILD_CORES)
(cd tools; make -j $NIX_BUILD_CORES)
(cd include/hcrypto; make -j $NIX_BUILD_CORES)
(cd lib/hcrypto; make -j $NIX_BUILD_CORES)
'';
installPhase = optionalString libOnly ''
(cd include; make -j $NIX_BUILD_CORES install)
(cd lib; make -j $NIX_BUILD_CORES install)
(cd tools; make -j $NIX_BUILD_CORES install)
(cd include/hcrypto; make -j $NIX_BUILD_CORES install)
(cd lib/hcrypto; make -j $NIX_BUILD_CORES install)
rm -rf $out/{libexec,sbin,share}
find $out/bin -type f | grep -v 'krb5-config' | xargs rm
''; '';
# We need to build hcrypt for applications like samba # We need to build hcrypt for applications like samba
postBuild = '' postBuild = ''
(cd lib/hcrypto; make) (cd include/hcrypto; make -j $NIX_BUILD_CORES)
(cd include/hcrypto; make) (cd lib/hcrypto; make -j $NIX_BUILD_CORES)
''; '';
postInstall = '' postInstall = ''
# Install hcrypto # Install hcrypto
(cd lib/hcrypto; make install) (cd include/hcrypto; make -j $NIX_BUILD_CORES install)
(cd include/hcrypto; make install) (cd lib/hcrypto; make -j $NIX_BUILD_CORES install)
# Doesn't succeed with --libexec=$out/sbin, so # Doesn't succeed with --libexec=$out/sbin, so
mv "$out/libexec/"* $out/sbin/ mv "$out/libexec/"* $out/sbin/
rmdir $out/libexec rmdir $out/libexec
''; '';
enableParallelBuilding = true;
meta = { meta = {
description = "an implementation of Kerberos 5 (and some more stuff) largely written in Sweden"; description = "an implementation of Kerberos 5 (and some more stuff) largely written in Sweden";
license = licenses.bsd3; license = licenses.bsd3;

View File

@ -6333,6 +6333,9 @@ let
kerberos = libkrb5; kerberos = libkrb5;
heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { }; heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { };
libheimdal = heimdal.override {
prefix = "lib";
};
harfbuzz = callPackage ../development/libraries/harfbuzz { }; harfbuzz = callPackage ../development/libraries/harfbuzz { };
harfbuzz-icu = callPackage ../development/libraries/harfbuzz { harfbuzz-icu = callPackage ../development/libraries/harfbuzz {