11 darwin_arch = if stdenv.hostPlatform.system == "aarch64-darwin" then "arm64" else "amd64";
13 chmod -R +w vendor/github.com/keys-pub/go-libfido2
14 cat << EOF > vendor/github.com/keys-pub/go-libfido2/fido2_static_${darwin_arch}.go
18 #cgo darwin LDFLAGS: -framework CoreFoundation -framework IOKit -L${lib.getLib openssl}/lib -L${lib.getLib libcbor}/lib -lfido2
19 #cgo darwin CFLAGS: -I${libfido2.dev}/include -I${openssl.dev}/include
26 pname = "age-plugin-fido2-hmac";
29 src = fetchFromGitHub {
31 repo = "age-plugin-fido2-hmac";
33 hash = "sha256-P2gNOZeuODWEb/puFe6EA1wW3pc0xgM567qe4FKbFXg=";
36 vendorHash = "sha256-h4/tyq9oZt41IfRJmmsLHUpJiPJ7YuFu59ccM7jHsFo=";
38 ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
40 buildInputs = [ libfido2 ];
42 postConfigure = lib.optional stdenv.hostPlatform.isDarwin darwin_configure;
45 description = "Age plugin to encrypt files with fido2 tokens using the hmac-secret extension and non-discoverable credentials";
46 homepage = "https://github.com/olastor/age-plugin-fido2-hmac/";
47 license = licenses.mit;
48 maintainers = with maintainers; [ matthewcroughan ];
49 mainProgram = "age-plugin-fido2-hmac";