linuxPackages.ndiswrapper: 1.59 -> 1.62-pre, fix build

This commit is contained in:
Ding Xiang Fei 2018-10-07 19:17:42 +08:00
parent 36ff6dcbb2
commit d593c4d4c9
2 changed files with 22 additions and 15 deletions

View file

@ -1,16 +1,20 @@
{ stdenv, fetchurl, kernel, perl, kmod }:
{ stdenv, fetchFromGitHub, kernel, perl, kmod, libelf }:
let
version = "1.62-pre";
in
stdenv.mkDerivation {
name = "ndiswrapper-1.59-${kernel.version}";
name = "ndiswrapper-${version}-${kernel.version}";
inherit version;
hardeningDisable = [ "pic" ];
patches = [ ./no-sbin.patch ];
# need at least .config and include
# need at least .config and include
kernel = kernel.dev;
buildPhase = "
cd ndiswrapper
echo make KBUILD=$(echo \$kernel/lib/modules/*/build);
echo -n $kernel/lib/modules/*/build > kbuild_path
export PATH=${kmod}/sbin:$PATH
@ -26,18 +30,20 @@ stdenv.mkDerivation {
patchShebangs $out/sbin
'';
# should we use unstable?
src = fetchurl {
url = mirror://sourceforge/ndiswrapper/ndiswrapper-1.59.tar.gz;
sha256 = "1g6lynccyg4m7gd7vhy44pypsn8ifmibq6rqgvc672pwngzx79b6";
# should we use unstable?
src = fetchFromGitHub {
owner = "pgiri";
repo = "ndiswrapper";
rev = "f4d16afb29ab04408d02e38d4ea1148807778e21";
sha256 = "0iaw0vhchmqf1yh14v4a6whnbg4sx1hag8a4hrsh4fzgw9fx0ij4";
};
buildInputs = [ perl ];
buildInputs = [ perl libelf ];
meta = {
meta = {
description = "Ndis driver wrapper for the Linux kernel";
homepage = https://sourceforge.net/projects/ndiswrapper;
license = "GPL";
broken = true;
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View file

@ -1,7 +1,8 @@
diff -Naur ndiswrapper-1.59-orig/driver/Makefile ndiswrapper-1.59/driver/Makefile
--- ndiswrapper-1.59-orig/driver/Makefile 2013-11-28 14:42:35.000000000 -0500
+++ ndiswrapper-1.59/driver/Makefile 2014-01-04 18:31:43.242377375 -0500
@@ -191,7 +191,7 @@
diff --git a/ndiswrapper/driver/Makefile b/ndiswrapper/driver/Makefile
index bf42f7bc..ad23aa2d 100644
--- a/ndiswrapper/driver/Makefile
+++ b/ndiswrapper/driver/Makefile
@@ -191,7 +191,7 @@ clean:
rm -rf .tmp_versions
install: config_check $(MODULE)