krb5: Break out into a lib and not lib version
This commit is contained in:
parent
ef253212f4
commit
b6322e1215
3 changed files with 40 additions and 23 deletions
|
@ -48,7 +48,7 @@ in
|
|||
|
||||
config = mkIf config.krb5.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.krb5 ];
|
||||
environment.systemPackages = [ pkgs.krb5Full ];
|
||||
|
||||
environment.etc."krb5.conf".text =
|
||||
''
|
||||
|
|
|
@ -1,41 +1,61 @@
|
|||
{ stdenv, fetchurl, pkgconfig, perl, ncurses, yacc, openssl, openldap, bootstrap_cmds }:
|
||||
{ stdenv, fetchurl, pkgconfig, perl, yacc, bootstrap_cmds
|
||||
, openssl, openldap, libedit
|
||||
|
||||
# Extra Arguments
|
||||
, type ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "krb5";
|
||||
version = "1.13.1";
|
||||
name = "${pname}-${version}";
|
||||
webpage = http://web.mit.edu/kerberos/;
|
||||
libOnly = type == "lib";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
inherit name;
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${type}krb5-${version}";
|
||||
version = "1.13.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "${webpage}dist/krb5/1.13/${name}-signed.tar";
|
||||
url = "${meta.homepage}dist/krb5/1.13/krb5-${version}-signed.tar";
|
||||
sha256 = "0gk6jvr64rf6l4xcyxn8i3fr5d1j7dhqvwyv3vw2qdkzz7yjkxjd";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig perl ncurses yacc openssl openldap ]
|
||||
nativeBuildInputs = [ pkgconfig perl yacc ]
|
||||
# Provides the mig command used by the build scripts
|
||||
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds ;
|
||||
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds;
|
||||
buildInputs = [ openssl ]
|
||||
++ optionals (!libOnly) [ openldap libedit ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar -xf $src
|
||||
tar -xzf ${name}.tar.gz
|
||||
cd ${name}/src
|
||||
tar -xzf krb5-${version}.tar.gz
|
||||
cd krb5-${version}/src
|
||||
'';
|
||||
|
||||
configureFlags = [ "--with-tcl=no" ];
|
||||
buildPhase = optionalString libOnly ''
|
||||
(cd util; make -j $NIX_BUILD_CORES)
|
||||
(cd include; make -j $NIX_BUILD_CORES)
|
||||
(cd lib; make -j $NIX_BUILD_CORES)
|
||||
(cd build-tools; make -j $NIX_BUILD_CORES)
|
||||
'';
|
||||
|
||||
installPhase = optionalString libOnly ''
|
||||
mkdir -p $out/{bin,include/{gssapi,gssrpc,kadm5,krb5},lib/pkgconfig,sbin,share/{et,man/man1}}
|
||||
(cd util; make -j $NIX_BUILD_CORES install)
|
||||
(cd include; make -j $NIX_BUILD_CORES install)
|
||||
(cd lib; make -j $NIX_BUILD_CORES install)
|
||||
(cd build-tools; make -j $NIX_BUILD_CORES install)
|
||||
rm -rf $out/{sbin,share}
|
||||
find $out/bin -type f | grep -v 'krb5-config' | xargs rm
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "MIT Kerberos 5";
|
||||
homepage = webpage;
|
||||
license = "MPL";
|
||||
homepage = http://web.mit.edu/kerberos/;
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ wkennington ];
|
||||
};
|
||||
|
||||
passthru.implementation = "krb5";
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6526,13 +6526,10 @@ let
|
|||
|
||||
kinetic-cpp-client = callPackage ../development/libraries/kinetic-cpp-client { };
|
||||
|
||||
krb5 = callPackage ../development/libraries/kerberos/krb5.nix {
|
||||
openldap = openldap.override {
|
||||
cyrus_sasl = cyrus_sasl.override { kerberos = null; };
|
||||
};
|
||||
krb5Full = callPackage ../development/libraries/kerberos/krb5.nix {
|
||||
inherit (darwin) bootstrap_cmds;
|
||||
};
|
||||
libkrb5 = krb5;
|
||||
libkrb5 = krb5Full.override { type = "lib"; };
|
||||
|
||||
LASzip = callPackage ../development/libraries/LASzip { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue