This repository has no description
1.2 kB
44 lines
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 nettle,
7 nix-update-script,
8}:
9rustPlatform.buildRustPackage (finalAttrs: {
10 pname = "age-plugin-gpg";
11 version = "0.1.0";
12
13 src = fetchFromGitHub {
14 owner = "CertainLach";
15 repo = "age-plugin-gpg";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-HfCl+YAjKPNFtLAHjNyjlHhRxD85qZLWsfKzqORtj5U=";
18 };
19
20 # Encrypt to keys that are only in the gpg keyring (no secret key or
21 # smartcard stub in gpg-agent), e.g. on hosts generating clan vars.
22 patches = [ ./keyring-fallback.patch ];
23
24 # not cargoLock.lockFile from src: reading it is import from derivation
25 cargoHash = "sha256-lmy5MCCuYwHThobQhk/mRbWrSyHdwniARNbBfmZaeQk=";
26
27 nativeBuildInputs = [
28 pkg-config
29 rustPlatform.bindgenHook
30 ];
31
32 buildInputs = [ nettle ];
33
34 passthru.updateScript = nix-update-script { extraArgs = [ "--flake" ]; };
35
36 meta = {
37 description = "Age plugin utilizing gpg-agent & keygrips as recipients/identities";
38 homepage = "https://github.com/CertainLach/age-plugin-gpg";
39 license = lib.licenses.mit;
40 mainProgram = "age-plugin-gpg";
41 platforms = lib.platforms.unix;
42 maintainers = [ ];
43 };
44})