pciutils: support static compilation

Close PR #96012 (thanks).  This "static style" was discussed on:
https://github.com/NixOS/nixpkgs/pull/96223#issuecomment-681204478
This commit is contained in:
Vladimír Čunát 2020-09-01 08:10:34 +02:00
parent 5fa5d6d521
commit 82aeab778f
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }:
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which
, static ? stdenv.targetPlatform.isStatic
}:
stdenv.mkDerivation rec {
name = "pciutils-3.7.0"; # with release-date database
@ -12,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib kmod which ];
makeFlags = [
"SHARED=yes"
"SHARED=${if static then "no" else "yes"}"
"PREFIX=\${out}"
"STRIP="
"HOST=${stdenv.hostPlatform.system}"