From 8c5fd78d0b929c2283f3db1ee2c9914b46462840 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 18 May 2021 16:14:57 -0400 Subject: [PATCH] bibutils: support static builds --- pkgs/tools/misc/bibutils/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/bibutils/default.nix b/pkgs/tools/misc/bibutils/default.nix index cf42e56b571..1415faadef8 100644 --- a/pkgs/tools/misc/bibutils/default.nix +++ b/pkgs/tools/misc/bibutils/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +, static ? stdenv.hostPlatform.isStatic +}: stdenv.mkDerivation rec { pname = "bibutils"; @@ -9,7 +13,11 @@ stdenv.mkDerivation rec { sha256 = "15p4av74ihsg03j854dkdqihpspwnp58p9g1lhx48w8kz91c0ml6"; }; - configureFlags = [ "--dynamic" "--install-dir" "$(out)/bin" "--install-lib" "$(out)/lib" ]; + configureFlags = [ + (if static then "--static" else "--dynamic") + "--install-dir" "$(out)/bin" + "--install-lib" "$(out)/lib" + ]; dontAddPrefix = true; doCheck = true;