2013-02-21 16:28:52 +00:00
|
|
|
{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
|
2012-03-25 21:05:36 +01:00
|
|
|
|
2012-06-15 18:58:42 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-06-19 07:50:41 +01:00
|
|
|
name = "kmod-21";
|
2012-03-25 21:05:36 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-06-15 18:58:42 +01:00
|
|
|
url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
|
2015-06-19 07:50:41 +01:00
|
|
|
sha256 = "1h4m1mkknxcshsz1qbg9riszmynix2ikg7q8inq7bkvlmx4982hn";
|
2012-03-25 21:05:36 +01:00
|
|
|
};
|
|
|
|
|
2012-06-15 18:58:42 +01:00
|
|
|
# Disable xz/zlib support to prevent needing them in the initrd.
|
|
|
|
|
2013-02-21 16:28:52 +00:00
|
|
|
buildInputs = [ pkgconfig libxslt /* xz zlib */ ];
|
2012-03-25 21:05:36 +01:00
|
|
|
|
2012-06-15 19:12:25 +01:00
|
|
|
configureFlags = [ "--sysconfdir=/etc" /* "--with-xz" "--with-zlib" */ ];
|
2012-03-25 21:05:36 +01:00
|
|
|
|
2012-04-04 20:24:07 +01:00
|
|
|
patches = [ ./module-dir.patch ];
|
|
|
|
|
2012-04-04 20:28:33 +01:00
|
|
|
postInstall = ''
|
2012-06-15 18:58:42 +01:00
|
|
|
ln -s kmod $out/bin/lsmod
|
|
|
|
mkdir -p $out/sbin
|
|
|
|
for prog in rmmod insmod modinfo modprobe depmod; do
|
|
|
|
ln -sv $out/bin/kmod $out/sbin/$prog
|
2012-04-04 20:28:33 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2012-03-25 21:05:36 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.kernel.org/pub/linux/utils/kernel/kmod/;
|
|
|
|
description = "Tools for loading and managing Linux kernel modules";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|