1 { lib, stdenv, fetchurl, kernel, perl, kmod, elfutils }:
6 name = "ndiswrapper-${version}-${kernel.version}";
9 hardeningDisable = [ "pic" ];
11 patches = [ ./no-sbin.patch ];
13 # need at least .config and include
17 echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
18 echo -n $kernel/lib/modules/*/build > kbuild_path
19 export PATH=${kmod}/sbin:$PATH
20 make KBUILD=$(echo \$kernel/lib/modules/*/build);
24 make install KBUILD=$(cat kbuild_path) DESTDIR=$out
25 mv $out/usr/sbin/* $out/sbin/
26 mv $out/usr/share $out/
29 patchShebangs $out/sbin
33 url = "mirror://sourceforge/ndiswrapper/files/stable/ndiswrapper-${version}.tar.gz";
34 sha256 = "1v6b66jhisl110jfl00hm43lmnrav32vs39d85gcbxrjqnmcx08g";
37 buildInputs = [ perl elfutils ];
40 description = "Ndis driver wrapper for the Linux kernel";
41 homepage = "https://sourceforge.net/projects/ndiswrapper";
43 platforms = [ "i686-linux" "x86_64-linux" ];
44 broken = lib.versionAtLeast kernel.version "5.8";