2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cryptsetup
|
|
|
|
, pkg-config
|
2020-11-09 15:59:12 +00:00
|
|
|
, clang
|
|
|
|
, llvmPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "fido2luks";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "0.2.19";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shimunn";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "sha256-o21KdsAE9KznobdMMKfVmVnENsLW3cMZjssnrsoN+KY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cryptsetup ];
|
2020-11-09 15:59:12 +00:00
|
|
|
nativeBuildInputs = [ pkg-config clang ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
configurePhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
2020-11-09 15:59:12 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
cargoSha256 = "sha256-8JFe3mivf2Ewu1nLMugeeK+9ZXAGPHaqCyKfWfwLOc8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator";
|
|
|
|
homepage = "https://github.com/shimunn/fido2luks";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ prusnak mmahut ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|