cryptsetup: fix static build

This commit is contained in:
Yureka 2021-12-06 10:27:11 +01:00 committed by Yuka
parent 95570a64dc
commit 2510939212

View file

@ -24,12 +24,14 @@ stdenv.mkDerivation rec {
substituteInPlace tests/unit-utils-io.c --replace "| O_DIRECT" ""
'';
NIX_LDFLAGS = "-lgcc_s";
NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.targetPlatform.isStatic) "-lgcc_s";
configureFlags = [
"--enable-cryptsetup-reencrypt"
"--with-crypto_backend=openssl"
"--disable-ssh-token"
] ++ lib.optionals stdenv.targetPlatform.isStatic [
"--enable-static-cryptsetup"
];
nativeBuildInputs = [ pkg-config ];