1 { lib, stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
2 , libxml2, libkrb5, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto, pkgconf
6 stdenv.mkDerivation rec {
11 url = "mirror://kernel/linux/daemons/autofs/v5/autofs-${version}.tar.xz";
12 sha256 = "sha256-h+avagN5S5Ri6lGXgeUOfSO198ks1Z4RQshdJJOzwks=";
16 url = "mirror://kernel/linux/daemons/autofs/v5/patches-5.2.0/autofs-5.1.9-update-configure.patch";
17 hash = "sha256-BomhNw+lMHcgs5gQlzapZ6p/Ji3gJUVkrLpZssBmwbg=";
20 url = "mirror://kernel/linux/daemons/autofs/v5/patches-5.2.0/autofs-5.1.9-fix-ldap_parse_page_control-check.patch";
21 hash = "sha256-W757LU9r9kuzLeThif2a1olRtxNrJy5suemLS7yfbIU=";
24 url = "mirror://kernel/linux/daemons/autofs/v5/patches-5.2.0/autofs-5.1.9-fix-crash-in-make_options_string.patch";
25 hash = "sha256-YjTdJ50iNhJ2UjFdrKYEFNt04z0PfmElbFa4GuSskLA=";
30 configureFlags="--enable-force-shutdown --enable-ignore-busy --with-path=$PATH --with-libtirpc"
31 export sssldir="${sssd}/lib/sssd/modules"
32 export HAVE_SSS_AUTOFS=1
34 export MOUNT=${mount}/bin/mount
35 export MOUNT_NFS=${nfs-utils}/bin/mount.nfs
36 export UMOUNT=${umount}/bin/umount
37 export MODPROBE=${kmod}/bin/modprobe
38 export E2FSCK=${e2fsprogs}/bin/fsck.ext2
39 export E3FSCK=${e2fsprogs}/bin/fsck.ext3
40 export E4FSCK=${e2fsprogs}/bin/fsck.ext4
42 unset STRIP # Makefile.rules defines a usable STRIP only without the env var.
46 make install SUBDIRS="lib daemon modules man" # all but samples
47 #make install SUBDIRS="samples" # impure!
50 buildInputs = [ linuxHeaders libtirpc libxml2 libkrb5 kmod openldap sssd
51 openssl cyrus_sasl rpcsvc-proto ];
53 nativeBuildInputs = [ flex bison pkgconf ];
56 description = "Kernel-based automounter";
57 mainProgram = "automount";
58 homepage = "https://www.kernel.org/pub/linux/daemons/autofs/";
59 license = lib.licenses.gpl2Plus;
60 executables = [ "automount" ];
61 platforms = lib.platforms.linux;