diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/system/pciutils/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/system/pciutils/default.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/system/pciutils/default.nix b/nixpkgs/pkgs/tools/system/pciutils/default.nix index e76ab496ef98..cf6616417ed0 100644 --- a/nixpkgs/pkgs/tools/system/pciutils/default.nix +++ b/nixpkgs/pkgs/tools/system/pciutils/default.nix @@ -1,18 +1,26 @@ -{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }: +{ stdenv, fetchurl, pkgconfig, zlib, kmod, which +, static ? stdenv.targetPlatform.isStatic +, darwin ? null +}: stdenv.mkDerivation rec { - name = "pciutils-3.6.4"; # with release-date database + name = "pciutils-3.7.0"; # with release-date database src = fetchurl { url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz"; - sha256 = "0mb0f2phdcmp4kfiqsszn2k6nlln0w160ffzrjjv4bbfjwrgfzzn"; + sha256 = "1ss0rnfsx8gvqjxaji4mvbhf9xyih4cadmgadbwwv8mnx1xvjh4x"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ zlib kmod which ]; + buildInputs = [ zlib kmod which ] ++ + stdenv.lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.IOKit; + + preConfigure = if stdenv.cc.isGNU then null else '' + substituteInPlace Makefile --replace 'CC=$(CROSS_COMPILE)gcc' "" + ''; makeFlags = [ - "SHARED=yes" + "SHARED=${if static then "no" else "yes"}" "PREFIX=\${out}" "STRIP=" "HOST=${stdenv.hostPlatform.system}" |