2014-01-05 01:57:21 +00:00
|
|
|
{ stdenv, fetchurl, kernel, perl, kmod }:
|
2010-08-02 14:57:57 +01:00
|
|
|
|
2008-01-28 19:34:00 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "ndiswrapper-1.59-${kernel.version}";
|
|
|
|
|
2016-08-13 15:38:54 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
patches = [ ./no-sbin.patch ];
|
2007-12-05 21:25:47 +00:00
|
|
|
|
|
|
|
# need at least .config and include
|
2014-01-05 01:57:21 +00:00
|
|
|
kernel = kernel.dev;
|
2007-12-05 21:25:47 +00:00
|
|
|
|
|
|
|
buildPhase = "
|
2008-06-15 16:11:19 +01:00
|
|
|
echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
|
|
|
echo -n $kernel/lib/modules/*/build > kbuild_path
|
2014-01-05 01:57:21 +00:00
|
|
|
export PATH=${kmod}/sbin:$PATH
|
2008-06-15 16:11:19 +01:00
|
|
|
make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
2007-12-05 21:25:47 +00:00
|
|
|
";
|
|
|
|
|
2008-06-15 17:24:19 +01:00
|
|
|
installPhase = ''
|
|
|
|
make install KBUILD=$(cat kbuild_path) DESTDIR=$out
|
|
|
|
mv $out/usr/sbin/* $out/sbin/
|
|
|
|
mv $out/usr/share $out/
|
|
|
|
rm -r $out/usr
|
2008-06-15 18:30:34 +01:00
|
|
|
|
|
|
|
patchShebangs $out/sbin
|
2008-06-15 17:24:19 +01:00
|
|
|
'';
|
2008-06-15 16:11:19 +01:00
|
|
|
|
2007-12-05 21:25:47 +00:00
|
|
|
# should we use unstable?
|
2010-08-02 14:57:57 +01:00
|
|
|
src = fetchurl {
|
2014-01-05 01:57:21 +00:00
|
|
|
url = mirror://sourceforge/ndiswrapper/ndiswrapper-1.59.tar.gz;
|
|
|
|
sha256 = "1g6lynccyg4m7gd7vhy44pypsn8ifmibq6rqgvc672pwngzx79b6";
|
2007-12-05 21:25:47 +00:00
|
|
|
};
|
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
buildInputs = [ perl ];
|
2007-12-05 21:25:47 +00:00
|
|
|
|
|
|
|
meta = {
|
2010-08-02 14:57:57 +01:00
|
|
|
description = "Ndis driver wrapper for the Linux kernel";
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://sourceforge.net/projects/ndiswrapper;
|
2010-08-02 14:57:57 +01:00
|
|
|
license = "GPL";
|
2016-12-08 22:09:58 +00:00
|
|
|
broken = true;
|
2007-12-05 21:25:47 +00:00
|
|
|
};
|
|
|
|
}
|