From 1a1ab9474e17dd0e65306dbce00e638d582324bf Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Tue, 16 Jun 2020 15:01:11 +0200 Subject: [PATCH] tpm2-abrmd: build from source instead of release tarball --- pkgs/tools/security/tpm2-abrmd/default.nix | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/security/tpm2-abrmd/default.nix b/pkgs/tools/security/tpm2-abrmd/default.nix index b1edf6123707..de584438ed62 100644 --- a/pkgs/tools/security/tpm2-abrmd/default.nix +++ b/pkgs/tools/security/tpm2-abrmd/default.nix @@ -1,22 +1,31 @@ -{ stdenv, fetchurl, lib -, makeWrapper, tpm2-tss, pkgconfig, glib, which, dbus, cmocka }: +{ stdenv, lib, fetchFromGitHub +, autoreconfHook, pkg-config, autoconf-archive, makeWrapper, which +, tpm2-tss, glib, dbus +, cmocka +}: stdenv.mkDerivation rec { pname = "tpm2-abrmd"; version = "2.3.2"; - src = fetchurl { - url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "040d01pdzkj0nc1c0vsf6gfqf28cgil03ix8dasijvhiha4c20nz"; + src = fetchFromGitHub { + owner = "tpm2-software"; + repo = pname; + rev = version; + sha256 = "0jzglnlb700clcq6mjhhgvcq29a6893h888wsn9fbrh4f255sw8q"; }; - nativeBuildInputs = [ pkgconfig makeWrapper ]; - buildInputs = [ - tpm2-tss glib which dbus cmocka - ]; + nativeBuildInputs = [ pkg-config makeWrapper autoreconfHook autoconf-archive which ]; + buildInputs = [ tpm2-tss glib dbus cmocka ]; enableParallelBuilding = true; + # Emulate the required behavior of ./bootstrap in the original + # package + preAutoreconf = '' + echo "${version}" > VERSION + ''; + # Unit tests are currently broken as the check phase attempts to start a dbus daemon etc. #configureFlags = [ "--enable-unit" ]; doCheck = false;