depot/third_party/nixpkgs/pkgs/development/python-modules/diceware/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

50 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "diceware";
version = "0.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-srTMm1n1aNLvUb/fn34a+UHSX7j1wl8XAZHburzpZWk=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest_runner'," ""
'';
propagatedBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [
# see https://github.com/ulif/diceware/commit/a7d844df76cd4b95a717f21ef5aa6167477b6733
"-m 'not packaging'"
];
pythonImportsCheck = [
"diceware"
];
meta = with lib; {
description = "Generates passphrases by concatenating words randomly picked from wordlists";
homepage = "https://github.com/ulif/diceware";
changelog = "https://github.com/ulif/diceware/blob/v${version}/CHANGES.rst";
license = licenses.gpl3;
maintainers = with maintainers; [ asymmetric ];
};
}