1 { stdenv, lib, fetchFromGitHub
2 , autoreconfHook, pkg-config, autoconf-archive, makeWrapper, which
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
12 owner = "tpm2-software";
15 sha256 = "0lsng4sb9ikfpp0scvl9wmh0zpjdmdf5bqbjnpfyh4gk25qxn9mw";
18 nativeBuildInputs = [ pkg-config makeWrapper autoreconfHook autoconf-archive which ];
19 buildInputs = [ tpm2-tss glib dbus ];
20 checkInputs = [ cmocka ];
22 enableParallelBuilding = true;
24 # Emulate the required behavior of ./bootstrap in the original
27 echo "${version}" > VERSION
30 # Unit tests are currently broken as the check phase attempts to start a dbus daemon etc.
31 #configureFlags = [ "--enable-unit" ];
34 # Even though tpm2-tss is in the RUNPATH, starting from 2.3.0 abrmd
35 # seems to require the path to the device TCTI (used for accessing
36 # /dev/tpm0) in it's LD_LIBRARY_PATH
38 wrapProgram $out/bin/tpm2-abrmd \
39 --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ tpm2-tss ]}"
43 description = "TPM2 resource manager, accessible via D-Bus";
44 homepage = "https://github.com/tpm2-software/tpm2-tools";
45 license = licenses.bsd3;
46 platforms = platforms.linux;
47 maintainers = with maintainers; [ matthiasbeyer ];