2013-02-21 17:28:52 +01:00
|
|
|
{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
|
2012-03-25 22:05:36 +02:00
|
|
|
|
2012-06-15 19:58:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-13 12:46:15 +01:00
|
|
|
name = "kmod-22";
|
2012-03-25 22:05:36 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-06-15 19:58:42 +02:00
|
|
|
url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
|
2016-01-13 12:46:15 +01:00
|
|
|
sha256 = "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs";
|
2012-03-25 22:05:36 +02:00
|
|
|
};
|
|
|
|
|
2016-02-01 17:54:35 +01:00
|
|
|
buildInputs = [ pkgconfig libxslt xz /* zlib */ ];
|
2012-03-25 22:05:36 +02:00
|
|
|
|
2016-02-01 17:54:35 +01:00
|
|
|
configureFlags = [ "--sysconfdir=/etc" "--with-xz" /* "--with-zlib" */ ];
|
2012-03-25 22:05:36 +02:00
|
|
|
|
2012-04-04 21:24:07 +02:00
|
|
|
patches = [ ./module-dir.patch ];
|
|
|
|
|
2012-04-04 21:28:33 +02:00
|
|
|
postInstall = ''
|
2012-06-15 19:58:42 +02: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 21:28:33 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2012-03-25 22:05:36 +02: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;
|
|
|
|
};
|
|
|
|
}
|