File tree 2 files changed +25
-0
lines changed
pkgs/tools/system/pciutils
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
8
8
sha256 = "0byl2f897w5lhs4bvr6p7qwcz9bllj2zyfv7nywbcbsnb9ha9wrb" ;
9
9
} ;
10
10
11
+ patches = [ ./module-dir.diff ] ;
12
+
11
13
buildInputs = [ pkgconfig zlib kmod which ] ;
12
14
13
15
makeFlags = "SHARED=yes PREFIX=\ ${out}" ;
Original file line number Diff line number Diff line change
1
+ Don't override libkmod's way of finding modules.
2
+
3
+ (We override that behavior in nixpkgs to fit nixos.)
4
+
5
+ diff --git a/ls-kernel.c b/ls-kernel.c
6
+ index 78b70f1..ecacd0e 100644
7
+ --- a/ls-kernel.c
8
+ +++ b/ls-kernel.c
9
+ @@ -29,13 +29,7 @@ show_kernel_init(void)
10
+ if (show_kernel_inited >= 0)
11
+ return show_kernel_inited;
12
+
13
+ - struct utsname uts;
14
+ - if (uname(&uts) < 0)
15
+ - die("uname() failed: %m");
16
+ - char *name = alloca(64 + strlen(uts.release));
17
+ - sprintf(name, "/lib/modules/%s", uts.release);
18
+ -
19
+ - kmod_ctx = kmod_new(name, NULL);
20
+ + kmod_ctx = kmod_new(NULL, NULL);
21
+ if (!kmod_ctx)
22
+ {
23
+ fprintf(stderr, "lspci: Unable to initialize libkmod context\n");
You can’t perform that action at this time.
0 commit comments