git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit2f14e11f3a545130409c520909a64b86e92f737d authorAlyssa Ross <hi@alyssa.is> dateMon 24 Jan 2022, 10:20 (5 years ago) parent6fee71d
1 file changed+2−2
pkgs/os-specific/linux/cryptsetup/default.nix+2−2
pkgs/os-specific/linux/cryptsetup/default.nix+2−2
@@ -24,13 +24,13 @@ stdenv.mkDerivation rec {
2424 substituteInPlace tests/unit-utils-io.c --replace "| O_DIRECT" ""
2525 '';
2626
27− NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.targetPlatform.isStatic) "-lgcc_s";
27+ NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
2828
2929 configureFlags = [
3030 "--enable-cryptsetup-reencrypt"
3131 "--with-crypto_backend=openssl"
3232 "--disable-ssh-token"
33− ] ++ lib.optionals stdenv.targetPlatform.isStatic [
33+ ] ++ lib.optionals stdenv.hostPlatform.isStatic [
3434 "--enable-static-cryptsetup"
3535 ];
3636