1 # This file is based upon upstream's package.nix shared among both
2 # "ssh-openpgp-auth" and "sshd-openpgpg-auth"
17 # Arguments not supplied by callPackage
25 rustPlatform.buildRustPackage {
26 inherit pname version;
28 src = fetchFromGitea {
29 domain = "codeberg.org";
31 repo = "ssh-openpgp-auth";
32 # See also: https://codeberg.org/wiktor/ssh-openpgp-auth/pulls/92#issuecomment-1635274
33 rev = "${pname}/${version}";
36 buildAndTestSubdir = pname;
41 rustPlatform.bindgenHook
46 # Otherwise just's build, check and install phases take precedence over
47 # buildRustPackage's phases.
48 dontUseJustBuild = true;
49 dontUseJustCheck = true;
50 dontUseJustInstall = true;
53 export HOME=$(mktemp -d)
54 just generate manpages ${pname} $out/share/man/man1
55 just generate shell_completions ${pname} shell_completions
56 installShellCompletion --cmd ${pname} \
57 --bash shell_completions/${pname}.bash \
58 --fish shell_completions/${pname}.fish \
59 --zsh shell_completions/_${pname}
68 ++ lib.optionals stdenv.hostPlatform.isDarwin [
69 darwin.apple_sdk_11_0.frameworks.CoreFoundation
70 darwin.apple_sdk_11_0.frameworks.IOKit
71 darwin.apple_sdk_11_0.frameworks.Security
72 darwin.apple_sdk_11_0.frameworks.SystemConfiguration
81 description = metaDescription;
82 homepage = "https://codeberg.org/wiktor/ssh-openpgp-auth";
83 license = with licenses; [
87 maintainers = with maintainers; [ doronbehar ];