mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 04:27:27 +03:00
ssh-openpgp-auth: init at 0.2.2
https://codeberg.org/wiktor/ssh-openpgp-auth
This commit is contained in:
parent
b6d1099124
commit
e33a3e4c7a
82
pkgs/by-name/ss/ssh-openpgp-auth/generic.nix
Normal file
82
pkgs/by-name/ss/ssh-openpgp-auth/generic.nix
Normal file
@ -0,0 +1,82 @@
|
||||
# This file is based upon upstream's package.nix shared among both
|
||||
# "ssh-openpgp-auth" and "sshd-openpgpg-auth"
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitea
|
||||
, pkg-config
|
||||
, just
|
||||
, rust-script
|
||||
, installShellFiles
|
||||
, bzip2
|
||||
, nettle
|
||||
, openssl
|
||||
, sqlite
|
||||
, stdenv
|
||||
, darwin
|
||||
, openssh
|
||||
# Arguments not supplied by callPackage
|
||||
, pname , version , srcHash , cargoHash, metaDescription
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "wiktor";
|
||||
repo = "ssh-openpgp-auth";
|
||||
# See also: https://codeberg.org/wiktor/ssh-openpgp-auth/pulls/92#issuecomment-1635274
|
||||
rev = "${pname}/${version}";
|
||||
hash = srcHash;
|
||||
};
|
||||
buildAndTestSubdir = pname;
|
||||
inherit cargoHash;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
rustPlatform.bindgenHook
|
||||
just
|
||||
rust-script
|
||||
installShellFiles
|
||||
];
|
||||
# Otherwise just's build, check and install phases take precedence over
|
||||
# buildRustPackage's phases.
|
||||
dontUseJustBuild = true;
|
||||
dontUseJustCheck = true;
|
||||
dontUseJustInstall = true;
|
||||
|
||||
postInstall = ''
|
||||
export HOME=$(mktemp -d)
|
||||
just generate manpages ${pname} $out/share/man/man1
|
||||
just generate shell_completions ${pname} shell_completions
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash shell_completions/${pname}.bash \
|
||||
--fish shell_completions/${pname}.fish \
|
||||
--zsh shell_completions/_${pname}
|
||||
'';
|
||||
|
||||
|
||||
buildInputs = [
|
||||
nettle
|
||||
openssl
|
||||
sqlite
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk_11_0.frameworks.CoreFoundation
|
||||
darwin.apple_sdk_11_0.frameworks.IOKit
|
||||
darwin.apple_sdk_11_0.frameworks.Security
|
||||
darwin.apple_sdk_11_0.frameworks.SystemConfiguration
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
nativeCheckInputs = [
|
||||
openssh
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = metaDescription;
|
||||
homepage = "https://codeberg.org/wiktor/ssh-openpgp-auth";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
mainProgram = pname;
|
||||
};
|
||||
}
|
10
pkgs/by-name/ss/ssh-openpgp-auth/package.nix
Normal file
10
pkgs/by-name/ss/ssh-openpgp-auth/package.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ callPackage }:
|
||||
|
||||
callPackage ./generic.nix {
|
||||
pname = "ssh-openpgp-auth";
|
||||
version = "0.2.2";
|
||||
srcHash = "sha256-5ew6jT6Zr54QYaWFQIGYXd8sqC3yHHZjPfoaCossm8o=";
|
||||
cargoHash = "sha256-/k/XAp7PHIJaJWf4Oa1JC1mMSR5pyeM4SSPCcr77cAg=";
|
||||
metaDescription =
|
||||
"Command-line tool that provides client-side functionality to transparently verify the identity of remote SSH hosts";
|
||||
}
|
Loading…
Reference in New Issue
Block a user