nixpkgs/pkgs/tools/security/fido2luks/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2019-12-01 11:57:05 +00:00
, rustPlatform
, fetchFromGitHub
, cryptsetup
, pkg-config
, clang
, llvmPackages
2022-09-08 09:29:47 +00:00
, fetchpatch
2019-12-01 11:57:05 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "fido2luks";
2022-04-28 10:50:21 +00:00
version = "0.2.20";
2019-12-01 11:57:05 +00:00
src = fetchFromGitHub {
owner = "shimunn";
repo = pname;
rev = version;
2022-04-28 10:50:21 +00:00
sha256 = "04gl7wn38f42mapmkf026rya668vvhm03yi8iqnz31xgggbr2irm";
2019-12-01 11:57:05 +00:00
};
2022-09-08 09:29:47 +00:00
cargoPatches = [
#https://github.com/shimunn/fido2luks/pull/50
(fetchpatch {
name = "libcryptsetup-rs.patch";
url = "https://github.com/shimunn/fido2luks/commit/c87a9bbb4cbbe90be7385d4bc2946716c593b91d.diff";
sha256 = "2IWz9gcEbXhHlz7VWoJNBZfwnJm/J3RRuXg91xH9Pl4=";
})
];
2019-12-01 11:57:05 +00:00
buildInputs = [ cryptsetup ];
nativeBuildInputs = [ pkg-config clang ];
2019-12-01 11:57:05 +00:00
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
'';
2022-09-08 09:29:47 +00:00
cargoSha256 = "U/2dAmFmW6rQvojaKSDdO+/WzajBJmhOZWvzwdiYBm0=";
2019-12-01 11:57:05 +00:00
meta = with lib; {
2019-12-01 11:57:05 +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;
};
}