2014-02-02 09:41:39 +01:00
|
|
|
{ stdenv, fetchurl, gnugrep, findutils }:
|
2014-02-02 08:33:19 +01:00
|
|
|
let
|
2015-06-08 11:22:36 +02:00
|
|
|
version = "3ubuntu1"; # Saucy
|
2014-02-02 08:33:19 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "kmod-blacklist-${version}";
|
2014-01-21 00:29:35 +01:00
|
|
|
|
2014-02-02 08:33:19 +01:00
|
|
|
src = fetchurl {
|
2015-06-08 11:22:36 +02:00
|
|
|
url = "https://launchpad.net/ubuntu/+archive/primary/+files/kmod_9-${version}.debian.tar.gz";
|
|
|
|
sha256 = "0h6h0zw2490iqj9xa2sz4309jyfmcc50jdvkhxa1nw90npxglp67";
|
2014-01-21 00:29:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir "$out"
|
2014-02-02 08:33:19 +01:00
|
|
|
for f in modprobe.d/*.conf; do
|
2014-01-21 00:29:35 +01:00
|
|
|
echo "''\n''\n## file: "`basename "$f"`"''\n''\n" >> "$out"/modprobe.conf
|
|
|
|
cat "$f" >> "$out"/modprobe.conf
|
|
|
|
done
|
|
|
|
|
2014-02-02 09:41:39 +01:00
|
|
|
substituteInPlace "$out"/modprobe.conf \
|
|
|
|
--replace /sbin/lsmod /run/booted-system/sw/bin/lsmod \
|
2015-04-01 23:25:56 +02:00
|
|
|
--replace /sbin/rmmod /run/booted-system/sw/bin/rmmod \
|
|
|
|
--replace /sbin/modprobe /run/booted-system/sw/bin/modprobe \
|
2014-02-02 09:41:39 +01:00
|
|
|
--replace " grep " " ${gnugrep}/bin/grep " \
|
|
|
|
--replace " xargs " " ${findutils}/bin/xargs "
|
|
|
|
'';
|
2014-01-21 00:29:35 +01:00
|
|
|
|
|
|
|
meta = {
|
2014-02-02 08:33:19 +01:00
|
|
|
homepage = http://packages.ubuntu.com/source/saucy/kmod;
|
2014-01-21 00:29:35 +01:00
|
|
|
description = "Linux kernel module blacklists from Ubuntu";
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-01-21 00:29:35 +01:00
|
|
|
};
|
|
|
|
}
|