heimdal: Use the git version and breakout into a library
This commit is contained in:
parent
ccc47a6a42
commit
769ea09360
@ -1,54 +1,79 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, flex, yacc, readline, openldap, libcap_ng
|
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, python, perl, yacc, flex
|
||||||
, sqlite, db, ncurses, openssl, cyrus_sasl
|
, texinfo, perlPackages
|
||||||
|
, openldap, libcap_ng, sqlite, openssl, db, libedit, pam
|
||||||
|
|
||||||
|
# Extra Args
|
||||||
|
, type ? ""
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
libOnly = type == "lib";
|
||||||
|
in
|
||||||
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "heimdal-1.5.3";
|
name = "${type}heimdal-2015-06-17";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
urls = [
|
owner = "heimdal";
|
||||||
"http://www.h5l.org/dist/src/${name}.tar.gz"
|
repo = "heimdal";
|
||||||
"http://ftp.pdc.kth.se/pub/heimdal/src/${name}.tar.gz"
|
rev = "be63a2914adcbea7d42d56e674ee6edb4883ebaf";
|
||||||
];
|
sha256 = "147gv49gmy94y6f0x1vx523qni0frgcp3r7fill0r06rkfgfzc0j";
|
||||||
sha256 = "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ]
|
||||||
|
++ (with perlPackages; [ JSON ])
|
||||||
|
++ optional (!libOnly) texinfo;
|
||||||
|
buildInputs = [ libcap_ng sqlite openssl db libedit ]
|
||||||
|
++ optionals (!libOnly) [ openldap pam ];
|
||||||
|
|
||||||
## ugly, X should be made an option
|
## ugly, X should be made an option
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
"--sysconfdir=/etc"
|
||||||
|
"--localstatedir=/var"
|
||||||
"--enable-hdb-openldap-module"
|
"--enable-hdb-openldap-module"
|
||||||
"--with-capng"
|
"--with-capng"
|
||||||
"--with-openldap=${openldap}"
|
|
||||||
"--with-sqlite3=${sqlite}"
|
"--with-sqlite3=${sqlite}"
|
||||||
"--with-openssl-lib=${openssl}/lib"
|
"--with-berkeley-db=${db}"
|
||||||
|
"--with-libedit=${libedit}"
|
||||||
|
"--with-openssl=${openssl}"
|
||||||
"--without-x"
|
"--without-x"
|
||||||
|
] ++ optionals (!libOnly) [
|
||||||
|
"--with-openldap=${openldap}"
|
||||||
];
|
];
|
||||||
|
|
||||||
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)
|
||||||
|
'';
|
||||||
|
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
|
||||||
# dont 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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
enableParallelBuilding = true;
|
||||||
pkgconfig flex yacc readline openldap libcap_ng sqlite db ncurses
|
|
||||||
cyrus_sasl openssl
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
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;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
@ -6389,13 +6389,8 @@ let
|
|||||||
# We are using mit-krb5 because it is better maintained
|
# We are using mit-krb5 because it is better maintained
|
||||||
kerberos = libkrb5;
|
kerberos = libkrb5;
|
||||||
|
|
||||||
heimdal = callPackage ../development/libraries/kerberos/heimdal.nix {
|
heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { };
|
||||||
openldap = openldap.override {
|
libheimdal = heimdal.override { type = "lib"; };
|
||||||
cyrus_sasl = cyrus_sasl.override { kerberos = null; };
|
|
||||||
};
|
|
||||||
cyrus_sasl = cyrus_sasl.override { kerberos = null; };
|
|
||||||
};
|
|
||||||
libheimdal = heimdal;
|
|
||||||
|
|
||||||
harfbuzz = callPackage ../development/libraries/harfbuzz { };
|
harfbuzz = callPackage ../development/libraries/harfbuzz { };
|
||||||
harfbuzz-icu = callPackage ../development/libraries/harfbuzz {
|
harfbuzz-icu = callPackage ../development/libraries/harfbuzz {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user