2014-02-02 08:41:39 +00:00
|
|
|
{ stdenv, fetchurl, gnugrep, findutils }:
|
2014-02-02 07:33:19 +00:00
|
|
|
let
|
|
|
|
version = "3ubuntu1"; # Saucy
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "kmod-blacklist-${version}";
|
2014-01-20 23:29:35 +00:00
|
|
|
|
2014-02-02 07:33:19 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://archive.ubuntu.com/ubuntu/pool/main/k/kmod/kmod_9-${version}.debian.tar.gz";
|
|
|
|
sha256 = "0h6h0zw2490iqj9xa2sz4309jyfmcc50jdvkhxa1nw90npxglp67";
|
2014-01-20 23:29:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir "$out"
|
2014-02-02 07:33:19 +00:00
|
|
|
for f in modprobe.d/*.conf; do
|
2014-01-20 23:29:35 +00:00
|
|
|
echo "''\n''\n## file: "`basename "$f"`"''\n''\n" >> "$out"/modprobe.conf
|
|
|
|
cat "$f" >> "$out"/modprobe.conf
|
|
|
|
done
|
|
|
|
|
2014-02-02 08:41:39 +00:00
|
|
|
substituteInPlace "$out"/modprobe.conf \
|
|
|
|
--replace /sbin/lsmod /run/booted-system/sw/bin/lsmod \
|
|
|
|
--replace /sbin/rmmod /run/booted-system/sw/sbin/rmmod \
|
|
|
|
--replace /sbin/modprobe /run/booted-system/sw/sbin/modprobe \
|
|
|
|
--replace " grep " " ${gnugrep}/bin/grep " \
|
|
|
|
--replace " xargs " " ${findutils}/bin/xargs "
|
|
|
|
'';
|
2014-01-20 23:29:35 +00:00
|
|
|
|
|
|
|
meta = {
|
2014-02-02 07:33:19 +00:00
|
|
|
homepage = http://packages.ubuntu.com/source/saucy/kmod;
|
2014-01-20 23:29:35 +00:00
|
|
|
description = "Linux kernel module blacklists from Ubuntu";
|
|
|
|
};
|
|
|
|
}
|