nixpkgs/pkgs/servers/openafs-client/default.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

2015-09-14 20:59:37 +02:00
{ stdenv, fetchurl, fetchgit, which, autoconf, automake, flex, yacc,
2017-11-08 21:24:34 +01:00
kernel, glibc, ncurses, perl, kerberos, fetchpatch }:
stdenv.mkDerivation rec {
2015-09-14 20:59:37 +02:00
name = "openafs-${version}-${kernel.version}";
version = "1.6.22.1";
2015-09-14 20:59:37 +02:00
src = fetchurl {
url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
sha256 = "19nfbksw7b34jc3mxjk7cbz26zg9k5myhzpv2jf0fnmznr47jqaw";
};
nativeBuildInputs = [ autoconf automake flex yacc perl which ] ++ kernel.moduleBuildDependencies;
buildInputs = [ ncurses ];
hardeningDisable = [ "pic" ];
preConfigure = ''
ln -s "${kernel.dev}/lib/modules/"*/build $TMP/linux
patchShebangs .
for i in `grep -l -R '/usr/\(include\|src\)' .`; do
echo "Patch /usr/include and /usr/src in $i"
substituteInPlace $i \
--replace "/usr/include" "${glibc.dev}/include" \
--replace "/usr/src" "$TMP"
done
./regen.sh
${stdenv.lib.optionalString (kerberos != null)
2017-12-17 14:51:32 +01:00
"export KRB5_CONFIG=${kerberos.dev}/bin/krb5-config"}
configureFlagsArray=(
"--with-linux-kernel-build=$TMP/linux"
2015-01-01 09:07:49 +01:00
${stdenv.lib.optionalString (kerberos != null) "--with-krb5"}
"--sysconfdir=/etc/static"
"--disable-linux-d_splice-alias-extra-iput"
)
'';
meta = with stdenv.lib; {
description = "Open AFS client";
homepage = https://www.openafs.org;
license = licenses.ipl10;
platforms = platforms.linux;
maintainers = [ maintainers.z77z ];
broken = versionOlder kernel.version "3.18";
};
}