From fa63c18d8835ac59e4cfa478d6eac31dcfe8177b Mon Sep 17 00:00:00 2001 From: Scott Stephens Date: Fri, 29 Aug 2025 14:37:15 -0400 Subject: [PATCH] tpm2-tss: change default path of fapi config file The default path is hard-coded at compile time. Previously it pointed to a location inside the nix store, which made it necessary to use environment variables to specify the path to a user-specified file. The nature of the config file is such that it's not possible to specify one that works for every system this package may be installed in, so user-configuration is usually necessary. The default is now /etc/tpm2-tss/fapi-config.json, which is more compatible with non-nixos config conventions. NixOS compatibility is now accomplished by linking from the well-known location to a config file in the nix store. --- pkgs/development/libraries/tpm2-tss/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix index 10c68cad19c3..524a3c1a8657 100644 --- a/pkgs/development/libraries/tpm2-tss/default.nix +++ b/pkgs/development/libraries/tpm2-tss/default.nix @@ -113,6 +113,8 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \ --replace-fail '"libtpms.so.0"' '"${libtpms.out}/lib/libtpms.so.0"' done + substituteInPlace src/tss2-fapi/ifapi_config.c \ + --replace-fail 'SYSCONFDIR' '"/etc"' '' # tcti tests rely on mocking function calls, which appears not to be supported # on clang