2021-01-15 14:45:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
|
2021-03-14 16:11:48 +00:00
|
|
|
, libxml2, libkrb5, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto }:
|
2010-06-12 11:22:09 +01:00
|
|
|
|
2009-04-30 03:37:00 +01:00
|
|
|
let
|
2019-10-07 20:14:03 +01:00
|
|
|
version = "5.1.6";
|
2015-09-18 03:57:51 +01:00
|
|
|
name = "autofs-${version}";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2010-06-12 11:22:09 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-09-18 03:57:51 +01:00
|
|
|
url = "mirror://kernel/linux/daemons/autofs/v5/${name}.tar.xz";
|
2019-10-07 20:14:03 +01:00
|
|
|
sha256 = "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx";
|
2010-06-12 11:22:09 +01:00
|
|
|
};
|
2009-04-30 03:37:00 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2017-02-09 00:50:48 +00:00
|
|
|
configureFlags="--enable-force-shutdown --enable-ignore-busy --with-path=$PATH"
|
2016-04-14 19:18:09 +01:00
|
|
|
export sssldir="${sssd}/lib/sssd/modules"
|
|
|
|
export HAVE_SSS_AUTOFS=1
|
2016-08-14 20:32:08 +01:00
|
|
|
|
2018-03-27 04:37:49 +01:00
|
|
|
export MOUNT=${mount}/bin/mount
|
2017-02-09 00:50:48 +00:00
|
|
|
export MOUNT_NFS=${nfs-utils}/bin/mount.nfs
|
2018-03-27 04:37:49 +01:00
|
|
|
export UMOUNT=${umount}/bin/umount
|
2018-04-12 20:32:11 +01:00
|
|
|
export MODPROBE=${kmod}/bin/modprobe
|
2017-02-09 00:50:48 +00:00
|
|
|
export E2FSCK=${e2fsprogs}/bin/fsck.ext2
|
|
|
|
export E3FSCK=${e2fsprogs}/bin/fsck.ext3
|
|
|
|
export E4FSCK=${e2fsprogs}/bin/fsck.ext4
|
2017-10-31 14:35:59 +00:00
|
|
|
|
|
|
|
unset STRIP # Makefile.rules defines a usable STRIP only without the env var.
|
2009-04-30 03:37:00 +01:00
|
|
|
'';
|
|
|
|
|
2020-11-24 18:49:42 +00:00
|
|
|
# configure script is not finding the right path
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
|
|
|
|
|
2009-04-30 03:37:00 +01:00
|
|
|
installPhase = ''
|
|
|
|
make install SUBDIRS="lib daemon modules man" # all but samples
|
|
|
|
#make install SUBDIRS="samples" # impure!
|
|
|
|
'';
|
|
|
|
|
2021-03-14 16:11:48 +00:00
|
|
|
buildInputs = [ linuxHeaders libtirpc libxml2 libkrb5 kmod openldap sssd
|
2020-11-24 18:49:42 +00:00
|
|
|
openssl cyrus_sasl rpcsvc-proto ];
|
2016-08-14 20:32:08 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ flex bison ];
|
2009-04-30 03:37:00 +01:00
|
|
|
|
2015-09-18 03:57:51 +01:00
|
|
|
meta = {
|
|
|
|
description = "Kernel-based automounter";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.kernel.org/pub/linux/daemons/autofs/";
|
2021-01-15 14:45:37 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2009-04-30 03:37:00 +01:00
|
|
|
executables = [ "automount" ];
|
2021-01-15 14:45:37 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2009-04-30 03:37:00 +01:00
|
|
|
};
|
|
|
|
}
|