diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..5e54387 --- /dev/null +++ b/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchgit, pkgconfig, libu2f-host, pam, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "pam_fido2"; + version = "0.2.4"; + + src = fetchgit { + url = "https://git.shimun.net/shimun/fido2pam.git"; + rev = "${version}"; + sha256 = "0i1x0axhdnbza9sx8nyh8dqmc2hacjqya54415kixfm9ddx519q0"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ pam ]; + + cargoSha256 = "0qjw3hrjdldqbv57i1sx3vmr5rhvmjf5axc2ypn9rzkb1sa500rz"; + + meta = with stdenv.lib; { + homepage = "https://git.shimun.net/shimun/fido2pam"; + description = "A PAM module for allowing authentication with a FIDO2 device"; + license = licenses.lgpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ shimun ]; + }; +}