Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
python3Packages,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
pandoc,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "pwdsphinx";
|
|
version = "2.0.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "stef";
|
|
repo = "pwdsphinx";
|
|
tag = "v${version}";
|
|
hash = "sha256-COSfA5QqIGWEnahmo5klFECK7XjyabGs1nG9vyhj/DM=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace ./setup.py \
|
|
--replace-fail 'zxcvbn-python' 'zxcvbn'
|
|
'';
|
|
|
|
build-system = [ python3Packages.setuptools ];
|
|
|
|
dependencies = with python3Packages; [
|
|
cbor2
|
|
pyequihash
|
|
pyoprf
|
|
pysodium
|
|
qrcodegen
|
|
securestring
|
|
zxcvbn
|
|
];
|
|
|
|
# for man pages
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pandoc
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/doc/pwdsphinx/
|
|
cp -r ./configs $out/share/doc/pwdsphinx/
|
|
installManPage man/*.1
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
python3Packages.pytestCheckHook
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
preCheck = ''
|
|
mkdir -p ~/.config/sphinx
|
|
cp ${src}/configs/config ~/.config/sphinx/config
|
|
# command fails without key but the command generates the key, so always pass
|
|
$out/bin/sphinx init || true
|
|
'';
|
|
|
|
pythonImportsCheck = [ "pwdsphinx" ];
|
|
|
|
meta = {
|
|
description = "Native backend for web-extensions for Sphinx-based password storage";
|
|
homepage = "https://www.ctrlc.hu/~stef/blog/posts/sphinx.html";
|
|
downloadPage = "https://github.com/stef/pwdsphinx";
|
|
changelog = "https://github.com/stef/pwdsphinx/releases/tag/v${version}";
|
|
teams = [ lib.teams.ngi ];
|
|
license = lib.licenses.gpl3Plus;
|
|
mainProgram = "sphinx";
|
|
};
|
|
}
|