summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
blob: f468b183be956b31a4d4fca464445de49944f3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# TODO: some files are not at the right place.
# For now, we take the strategy of adding symlinks to fix this,
# however it is probably better to extract the files from
# the appropriate debian binary packages.

{stdenv, fetchurl}:

stdenv.mkDerivation {
  name = "firmware-linux-nonfree-0.34";

  src = fetchurl {
      url = "mirror://debian/pool/non-free/f/firmware-nonfree/firmware-nonfree_0.34.tar.gz";
      sha256 = "94fe856d00f63559486b7684c0fae9b30bee599c6d7dea8c7e00d2dcb548ee8a";
    };
 
  phases = [ "unpackPhase" "patchPhase" "installPhase" "postInstall" ];

  patchPhase = "rm -rf debian defines TODO";

  installPhase = "mkdir -p $out && cp -ra * $out/";

  # repeat the same trick for radeon, 3com, etc.
  postInstall = "ln -s $out/realtek/rtlwifi $out/rtlwifi";

  meta = {
    description = "Non-free kernel firmware (packaged by Debian)";
    homepage = "http://packages.debian.org/sid/firmware-linux-nonfree";
    license = "unfree-redistributable-firmware";
    priority = "10";
  };
}