summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-02-04 18:01:52 +0100
committerVladimír Čunát <vcunat@gmail.com>2014-02-04 18:02:19 +0100
commitcbba3f90da3d1a178cff0b6da43d8d05b17ef2be (patch)
treecccac9961cbc5f6bc7563497fab928a582cfc216 /pkgs/os-specific/linux
parente1b206b4a9c895e6684fc948b1526d8759e54328 (diff)
parent80f8b2cfbd2cffa2e8e2b4d9fcde9745ac99d835 (diff)
downloadnixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar.gz
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar.bz2
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar.lz
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar.xz
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.tar.zst
nixpkgs-cbba3f90da3d1a178cff0b6da43d8d05b17ef2be.zip
re-merge #1618: use ubuntu module blacklists by default
I'm sorry, previously I merged an outdated reference,
so only the old version of the PR got into master up to now.
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix32
1 files changed, 18 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix b/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
index 9da50766f92..682c36401de 100644
--- a/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
+++ b/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
@@ -1,28 +1,32 @@
-{ stdenv, fetchbzr }:
+{ stdenv, fetchurl, gnugrep, findutils }:
+let
+  version = "3ubuntu1"; # Saucy
+in
+stdenv.mkDerivation {
+  name = "kmod-blacklist-${version}";
 
-stdenv.mkDerivation rec {
-  name = "blacklist-ubuntu-${builtins.toString src.revision}"; # Saucy
-
-  src = fetchbzr {
-    url = meta.homepage;
-    sha256 = "0ci4b5dxzirc27zvgpr3s0pa78gjmfjwprmvyplxhwxb765la9v9";
-    revision = 13;
+  src = fetchurl {
+    url = "http://archive.ubuntu.com/ubuntu/pool/main/k/kmod/kmod_9-${version}.debian.tar.gz";
+    sha256 = "0h6h0zw2490iqj9xa2sz4309jyfmcc50jdvkhxa1nw90npxglp67";
   };
 
-  unpackPhase = "true";
-
   installPhase = ''
     mkdir "$out"
-    for f in "$src"/debian/modprobe.d/*.conf; do
+    for f in modprobe.d/*.conf; do
       echo "''\n''\n## file: "`basename "$f"`"''\n''\n" >> "$out"/modprobe.conf
       cat "$f" >> "$out"/modprobe.conf
     done
-  '';
 
-  #TODO: iwlwifi.conf has some strange references
+    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 "
+  '';
 
   meta = {
-    homepage = https://code.launchpad.net/~ubuntu-branches/ubuntu/saucy/kmod/saucy;
+    homepage = http://packages.ubuntu.com/source/saucy/kmod;
     description = "Linux kernel module blacklists from Ubuntu";
   };
 }