about summary refs log tree commit diff
path: root/pkgs/by-name/fi/fido2luks/package.nix
blob: 0504959697c6a055e4d9f77c22afbcb9458a1241 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  cryptsetup,
  pkg-config,
}:
rustPlatform.buildRustPackage rec {
  pname = "fido2luks";
  version = "0.2.21";

  src = fetchFromGitHub {
    owner = "shimunn";
    repo = pname;
    rev = version;
    sha256 = "sha256-bXwaFiRHURvS5KtTqIj+3GlGNbEulDgMDP51ZiO1w9o=";
  };

  cargoPatches = [
    ./0001-libcryptsetup-rs-bump-version-to-0.9-55.patch
    ./0002-cargo-update.patch
  ];

  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
  ];

  buildInputs = [ cryptsetup ];

  cargoHash = "sha256-BcwcgQzNH1p9pOVbelaGTN7bKqDgvxD4Red2JeavpJQ=";

  meta = {
    description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator";
    homepage = "https://github.com/shimunn/fido2luks";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ mmahut ];
    platforms = lib.platforms.linux;
  };
}