pciutils: 3.5.2 -> 3.5.4

The patch was integrated upstream.
This commit is contained in:
Vladimír Čunát 2017-04-01 12:56:27 +02:00
parent ae58febf70
commit 0062dd2f14
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 2 additions and 27 deletions

View File

@ -1,15 +1,13 @@
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }:
stdenv.mkDerivation rec {
name = "pciutils-3.5.2"; # with database from 2016-10
name = "pciutils-3.5.4"; # with database from 2017-02
src = fetchurl {
url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz";
sha256 = "1z2y4f3cyvm7a0dyan0n6jpb3p9pvh35lrim0058slj0kwd1969s";
sha256 = "0rpy7kkb2y89wmbcbfjjjxsk2x89v5xxhxib4vpl131ip5m3qab4";
};
patches = [ ./module-dir.diff ];
buildInputs = [ pkgconfig zlib kmod which ];
makeFlags = "SHARED=yes PREFIX=\${out}";

View File

@ -1,23 +0,0 @@
Don't override libkmod's way of finding modules.
(We override that behavior in nixpkgs to fit nixos.)
diff --git a/ls-kernel.c b/ls-kernel.c
index 78b70f1..ecacd0e 100644
--- a/ls-kernel.c
+++ b/ls-kernel.c
@@ -29,13 +29,7 @@ show_kernel_init(void)
if (show_kernel_inited >= 0)
return show_kernel_inited;
- struct utsname uts;
- if (uname(&uts) < 0)
- die("uname() failed: %m");
- char *name = alloca(64 + strlen(uts.release));
- sprintf(name, "/lib/modules/%s", uts.release);
-
- kmod_ctx = kmod_new(name, NULL);
+ kmod_ctx = kmod_new(NULL, NULL);
if (!kmod_ctx)
{
fprintf(stderr, "lspci: Unable to initialize libkmod context\n");