2018-10-07 11:17:42 +00:00
|
|
|
{ stdenv, fetchFromGitHub, kernel, perl, kmod, libelf }:
|
|
|
|
let
|
|
|
|
version = "1.62-pre";
|
|
|
|
in
|
2008-01-28 19:34:00 +00:00
|
|
|
stdenv.mkDerivation {
|
2018-10-07 11:17:42 +00:00
|
|
|
name = "ndiswrapper-${version}-${kernel.version}";
|
|
|
|
inherit version;
|
2014-01-05 01:57:21 +00:00
|
|
|
|
2016-08-13 14:38:54 +00:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
patches = [ ./no-sbin.patch ];
|
2007-12-05 21:25:47 +00:00
|
|
|
|
2018-10-07 11:17:42 +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 = "
|
2018-10-07 11:17:42 +00:00
|
|
|
cd ndiswrapper
|
2008-06-15 15:11:19 +00: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 15:11:19 +00:00
|
|
|
make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
2007-12-05 21:25:47 +00:00
|
|
|
";
|
|
|
|
|
2008-06-15 16:24:19 +00: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 17:30:34 +00:00
|
|
|
|
|
|
|
patchShebangs $out/sbin
|
2008-06-15 16:24:19 +00:00
|
|
|
'';
|
2008-06-15 15:11:19 +00:00
|
|
|
|
2018-10-07 11:17:42 +00:00
|
|
|
# should we use unstable?
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pgiri";
|
|
|
|
repo = "ndiswrapper";
|
2018-12-25 19:38:35 +00:00
|
|
|
rev = "5e29f6a9d41df949b435066c173e3b1947f179d3";
|
|
|
|
sha256 = "0sprrmxxkf170bmh1nz9xw00gs89dddr84djlf666bn5bhy6jffi";
|
2007-12-05 21:25:47 +00:00
|
|
|
};
|
|
|
|
|
2018-10-07 11:17:42 +00:00
|
|
|
buildInputs = [ perl libelf ];
|
2007-12-05 21:25:47 +00:00
|
|
|
|
2018-10-07 11:17:42 +00:00
|
|
|
meta = {
|
2010-08-02 13:57:57 +00:00
|
|
|
description = "Ndis driver wrapper for the Linux kernel";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/ndiswrapper";
|
2010-08-02 13:57:57 +00:00
|
|
|
license = "GPL";
|
2018-10-07 11:17:42 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2007-12-05 21:25:47 +00:00
|
|
|
};
|
|
|
|
}
|