1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 16:42:09 +00:00
nixpkgs/pkgs/os-specific/linux/kmod/default.nix
2015-07-01 08:11:05 -04:00

33 lines
890 B
Nix

{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
stdenv.mkDerivation rec {
name = "kmod-21";
src = fetchurl {
url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
sha256 = "1h4m1mkknxcshsz1qbg9riszmynix2ikg7q8inq7bkvlmx4982hn";
};
# Disable xz/zlib support to prevent needing them in the initrd.
buildInputs = [ pkgconfig libxslt /* xz zlib */ ];
configureFlags = [ "--sysconfdir=/etc" /* "--with-xz" "--with-zlib" */ ];
patches = [ ./module-dir.patch ];
postInstall = ''
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
done
'';
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;
};
}