nixpkgs-suyu/pkgs/os-specific/linux/autofs/default.nix

49 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
, libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl }:
let
2019-10-07 21:14:03 +02:00
version = "5.1.6";
2015-09-18 04:57:51 +02:00
name = "autofs-${version}";
in stdenv.mkDerivation {
inherit name;
src = fetchurl {
2015-09-18 04:57:51 +02:00
url = "mirror://kernel/linux/daemons/autofs/v5/${name}.tar.xz";
2019-10-07 21:14:03 +02:00
sha256 = "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx";
};
preConfigure = ''
configureFlags="--enable-force-shutdown --enable-ignore-busy --with-path=$PATH"
export sssldir="${sssd}/lib/sssd/modules"
export HAVE_SSS_AUTOFS=1
2016-08-14 21:32:08 +02:00
2018-03-27 05:37:49 +02:00
export MOUNT=${mount}/bin/mount
export MOUNT_NFS=${nfs-utils}/bin/mount.nfs
2018-03-27 05:37:49 +02:00
export UMOUNT=${umount}/bin/umount
export MODPROBE=${kmod}/bin/modprobe
export E2FSCK=${e2fsprogs}/bin/fsck.ext2
export E3FSCK=${e2fsprogs}/bin/fsck.ext3
export E4FSCK=${e2fsprogs}/bin/fsck.ext4
unset STRIP # Makefile.rules defines a usable STRIP only without the env var.
'';
installPhase = ''
make install SUBDIRS="lib daemon modules man" # all but samples
#make install SUBDIRS="samples" # impure!
'';
buildInputs = [ linuxHeaders libtirpc libxml2 kerberos kmod openldap sssd
openssl cyrus_sasl ];
2016-08-14 21:32:08 +02:00
nativeBuildInputs = [ flex bison ];
2015-09-18 04:57:51 +02:00
meta = {
description = "Kernel-based automounter";
homepage = "https://www.kernel.org/pub/linux/daemons/autofs/";
license = stdenv.lib.licenses.gpl2Plus;
executables = [ "automount" ];
platforms = stdenv.lib.platforms.linux;
};
}