From 82aeab778fb5b7d721312b90910fcf8d210555b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 1 Sep 2020 08:10:34 +0200 Subject: [PATCH] pciutils: support static compilation Close PR #96012 (thanks). This "static style" was discussed on: https://github.com/NixOS/nixpkgs/pull/96223#issuecomment-681204478 --- pkgs/tools/system/pciutils/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index 4bbe2bdcee0a..1814d4b9765f 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -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}"