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>
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ stdenv, fetchurl, kernelDev, perl }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "ndiswrapper-1.56-${kernelDev.version}";
|
|
|
|
# need at least .config and include
|
|
kernel = kernelDev;
|
|
|
|
buildPhase = "
|
|
echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
|
echo -n $kernel/lib/modules/*/build > kbuild_path
|
|
make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
|
";
|
|
|
|
installPhase = ''
|
|
make install KBUILD=$(cat kbuild_path) DESTDIR=$out
|
|
mv $out/usr/sbin/* $out/sbin/
|
|
mv $out/usr/share $out/
|
|
rm -r $out/usr
|
|
|
|
patchShebangs $out/sbin
|
|
'';
|
|
|
|
# should we use unstable?
|
|
src = fetchurl {
|
|
url = http://downloads.sourceforge.net/ndiswrapper/ndiswrapper-1.56.tar.gz;
|
|
sha256 = "10yqg1a08v6z1qm1qr1v4rbhl35c90gzrazapr09vp372hky8f57";
|
|
};
|
|
|
|
buildInputs = [ kernelDev perl ];
|
|
|
|
# this is a patch against svn head, not stable version
|
|
patches = [./prefix.patch];
|
|
|
|
meta = {
|
|
description = "Ndis driver wrapper for the Linux kernel";
|
|
homepage = http://sourceforge.net/projects/ndiswrapper;
|
|
license = "GPL";
|
|
};
|
|
}
|