2023-08-08 07:41:06 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, installShellFiles
|
|
|
|
, procps
|
|
|
|
}:
|
2017-03-19 09:16:22 +00:00
|
|
|
|
2019-01-17 21:17:12 +00:00
|
|
|
python3Packages.buildPythonPackage rec {
|
2019-03-12 21:40:29 +00:00
|
|
|
pname = "yubikey-manager";
|
2023-10-11 05:12:44 +00:00
|
|
|
version = "5.2.1";
|
2022-01-11 23:01:53 +00:00
|
|
|
format = "pyproject";
|
2017-03-19 09:16:22 +00:00
|
|
|
|
2021-07-30 22:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yubico";
|
2023-04-26 19:04:02 +00:00
|
|
|
repo = "yubikey-manager";
|
|
|
|
rev = version;
|
2023-10-11 05:12:44 +00:00
|
|
|
hash = "sha256-CUe/oB/+Hq9evnLwl8r0k5ObhI3vDt7oX79+20yMfjY=";
|
2017-03-19 09:16:22 +00:00
|
|
|
};
|
|
|
|
|
2021-09-10 11:50:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "ykman/pcsc/__init__.py" \
|
2022-08-30 00:27:52 +00:00
|
|
|
--replace 'pkill' '${if stdenv.isLinux then "${procps}" else "/usr"}/bin/pkill'
|
2021-09-10 11:50:09 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-08 07:41:06 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
installShellFiles
|
|
|
|
];
|
2021-07-30 22:57:28 +00:00
|
|
|
|
2023-08-08 07:41:06 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
cryptography
|
|
|
|
pyscard
|
|
|
|
fido2
|
|
|
|
click
|
|
|
|
keyring
|
|
|
|
];
|
2017-03-19 09:16:22 +00:00
|
|
|
|
2023-08-08 07:41:06 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"keyring"
|
2017-03-19 09:16:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-08-08 07:41:06 +00:00
|
|
|
installManPage man/ykman.1
|
2019-05-30 19:32:14 +00:00
|
|
|
|
2023-08-08 07:41:06 +00:00
|
|
|
installShellCompletion --cmd ykman \
|
|
|
|
--bash <(_YKMAN_COMPLETE=bash_source "$out/bin/ykman") \
|
|
|
|
--zsh <(_YKMAN_COMPLETE=zsh_source "$out/bin/ykman") \
|
|
|
|
--fish <(_YKMAN_COMPLETE=fish_source "$out/bin/ykman") \
|
2017-03-19 09:16:22 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-08 07:41:06 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
|
|
|
pytestCheckHook
|
|
|
|
makefun
|
|
|
|
];
|
2017-09-10 03:07:14 +00:00
|
|
|
|
2017-03-19 09:16:22 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://developers.yubico.com/yubikey-manager";
|
2023-08-08 07:41:06 +00:00
|
|
|
changelog = "https://github.com/Yubico/yubikey-manager/releases/tag/${version}";
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Command line tool for configuring any YubiKey over all USB transports";
|
2018-12-02 05:29:28 +00:00
|
|
|
|
2017-03-19 09:16:22 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
2023-08-08 07:44:19 +00:00
|
|
|
maintainers = with maintainers; [ benley lassulus pinpox nickcao ];
|
2022-09-21 05:41:31 +00:00
|
|
|
mainProgram = "ykman";
|
2017-03-19 09:16:22 +00:00
|
|
|
};
|
|
|
|
}
|