2022-03-08 13:12:05 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, gawk, trousers, cryptsetup, openssl }:
|
2015-07-04 22:57:59 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tpm-luks";
|
2021-11-10 21:21:47 +00:00
|
|
|
version = "unstable-2015-07-11";
|
2015-07-04 22:57:59 +01:00
|
|
|
|
2022-03-08 13:12:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "momiji";
|
|
|
|
repo = "tpm-luks";
|
2015-07-11 12:50:24 +01:00
|
|
|
rev = "c9c5b7fdddbcdac1cd4d2ea6baddd0617cc88ffa";
|
2022-03-08 13:12:05 +00:00
|
|
|
sha256 = "sha256-HHyZLZAXfmuimpHV8fOWldZmi4I5uV1NnSmP4E7ZQtc=";
|
2015-07-04 22:57:59 +01:00
|
|
|
};
|
|
|
|
|
2019-03-11 22:48:45 +00:00
|
|
|
patches = [
|
|
|
|
./openssl-1.1.patch
|
|
|
|
./signed-ptr.patch
|
|
|
|
];
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ gawk trousers cryptsetup openssl ];
|
2015-07-04 22:57:59 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
make install DESTDIR=$out
|
|
|
|
mv $out/$out/sbin $out/bin
|
|
|
|
rm -r $out/nix
|
2021-11-10 21:21:47 +00:00
|
|
|
'';
|
2015-07-04 22:57:59 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-07-04 22:57:59 +01:00
|
|
|
description = "LUKS key storage in TPM NVRAM";
|
2021-11-10 21:21:47 +00:00
|
|
|
homepage = "https://github.com/shpedoikal/tpm-luks/";
|
2022-06-23 00:40:02 +01:00
|
|
|
maintainers = [ ];
|
2021-02-01 16:47:00 +00:00
|
|
|
license = with licenses; [ gpl2Only ];
|
2021-11-10 21:21:47 +00:00
|
|
|
platforms = platforms.linux;
|
2015-07-04 22:57:59 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|