mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
4fa4ab3a6e
First, pass in `self' again so that overriding works properly (thanks for pointing that out, @edolstra) Second, instead of having linuxPackages*.kernel mean something different inside the set and out, add a new attribute linuxPackages*.kernelDev, which for the generic kernel is simply linuxPackages*.kernel but for the manual-config kernel is the `dev' output (which has the build tree, source tree, etc.) The second change required trivial modifications in a bunch of expressions, I verified that all of the linuxPackages* sets defined in all-packages.nix have the same drv paths before and after the change. Signed-off-by: Shea Levy <shea@shealevy.com>
29 lines
811 B
Nix
29 lines
811 B
Nix
{ stdenv, fetchurl, builderDefs, kernelDev }:
|
|
let localDefs = builderDefs.passthru.function {
|
|
src = /* put a fetchurl here */
|
|
fetchurl {
|
|
url = http://downloads.sourceforge.net/madwifi/madwifi-0.9.4.tar.gz;
|
|
sha256 = "06jd5b8rfw7rmiva6jgmrb7n26g5plcg9marbnnmg68gbcqbr3xh";
|
|
};
|
|
|
|
buildInputs = [];
|
|
configureFlags = [];
|
|
makeFlags = [''KERNELPATH=${kernelDev}/lib/modules/*/build'' ''DESTDIR=$out''];
|
|
};
|
|
in with localDefs;
|
|
let
|
|
postInstall = fullDepEntry (''
|
|
ln -s $out/usr/local/bin $out/bin
|
|
'') [minInit doMakeInstall];
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
name = "atheros-0.9.4-${kernelDev.version}";
|
|
builder = writeScript (name + "-builder")
|
|
(textClosure localDefs [doMakeInstall
|
|
postInstall doForceShare doPropagate]);
|
|
meta = {
|
|
description = "Atheros WiFi driver";
|
|
inherit src;
|
|
};
|
|
}
|