bibutils: support static builds

This commit is contained in:
Dmitry Kalinkin 2021-05-18 16:14:57 -04:00
parent de8dbb21fb
commit 8c5fd78d0b
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -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;