2021-01-15 15:45:37 +01:00
|
|
|
{ lib, stdenv, fetchurl, kernel, perl, kmod, libelf }:
|
2018-10-07 13:17:42 +02:00
|
|
|
let
|
2020-11-08 12:05:54 +01:00
|
|
|
version = "1.63";
|
2018-10-07 13:17:42 +02:00
|
|
|
in
|
2008-01-28 20:34:00 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-10-07 13:17:42 +02:00
|
|
|
name = "ndiswrapper-${version}-${kernel.version}";
|
|
|
|
inherit version;
|
2014-01-05 02:57:21 +01:00
|
|
|
|
2016-08-13 16:38:54 +02:00
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2014-01-05 02:57:21 +01:00
|
|
|
patches = [ ./no-sbin.patch ];
|
2007-12-05 22:25:47 +01:00
|
|
|
|
2018-10-07 13:17:42 +02:00
|
|
|
# need at least .config and include
|
2014-01-05 02:57:21 +01:00
|
|
|
kernel = kernel.dev;
|
2007-12-05 22:25:47 +01:00
|
|
|
|
|
|
|
buildPhase = "
|
2008-06-15 17:11:19 +02:00
|
|
|
echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
|
|
|
echo -n $kernel/lib/modules/*/build > kbuild_path
|
2014-01-05 02:57:21 +01:00
|
|
|
export PATH=${kmod}/sbin:$PATH
|
2008-06-15 17:11:19 +02:00
|
|
|
make KBUILD=$(echo \$kernel/lib/modules/*/build);
|
2007-12-05 22:25:47 +01:00
|
|
|
";
|
|
|
|
|
2008-06-15 18:24:19 +02: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 19:30:34 +02:00
|
|
|
|
|
|
|
patchShebangs $out/sbin
|
2008-06-15 18:24:19 +02:00
|
|
|
'';
|
2008-06-15 17:11:19 +02:00
|
|
|
|
2020-11-08 12:05:54 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/ndiswrapper/files/stable/ndiswrapper-${version}.tar.gz";
|
|
|
|
sha256 = "1v6b66jhisl110jfl00hm43lmnrav32vs39d85gcbxrjqnmcx08g";
|
2007-12-05 22:25:47 +01:00
|
|
|
};
|
|
|
|
|
2018-10-07 13:17:42 +02:00
|
|
|
buildInputs = [ perl libelf ];
|
2007-12-05 22:25:47 +01:00
|
|
|
|
2018-10-07 13:17:42 +02:00
|
|
|
meta = {
|
2010-08-02 15:57:57 +02:00
|
|
|
description = "Ndis driver wrapper for the Linux kernel";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://sourceforge.net/projects/ndiswrapper";
|
2010-08-02 15:57:57 +02:00
|
|
|
license = "GPL";
|
2018-10-07 13:17:42 +02:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2021-01-15 15:45:37 +01:00
|
|
|
broken = lib.versionAtLeast kernel.version "5.8";
|
2007-12-05 22:25:47 +01:00
|
|
|
};
|
|
|
|
}
|