cryptsetup: don't look at targetPlatform

targetPlatform refers to the platform the program being compiled will
produce binaries for, which only makes sense for things like
compilers, not cryptsetup.  The correct platform to look at to check
static support is hostPlatform, which refers to the architecture the
program being compiled will run on.
This commit is contained in:
Alyssa Ross 2022-01-24 10:20:24 +00:00 committed by sterni
parent 6fee71d339
commit 2f14e11f3a

View file

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