1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pytestCheckHook,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "diceware";
12 version = "0.10";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-srTMm1n1aNLvUb/fn34a+UHSX7j1wl8XAZHburzpZWk=";
20 };
21
22 postPatch = ''
23 substituteInPlace setup.py \
24 --replace "'pytest_runner'," ""
25 '';
26
27 propagatedBuildInputs = [ setuptools ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pytestFlagsArray = [
32 # see https://github.com/ulif/diceware/commit/a7d844df76cd4b95a717f21ef5aa6167477b6733
33 "-m 'not packaging'"
34 ];
35
36 pythonImportsCheck = [ "diceware" ];
37
38 meta = with lib; {
39 description = "Generates passphrases by concatenating words randomly picked from wordlists";
40 mainProgram = "diceware";
41 homepage = "https://github.com/ulif/diceware";
42 changelog = "https://github.com/ulif/diceware/blob/v${version}/CHANGES.rst";
43 license = licenses.gpl3;
44 maintainers = with maintainers; [ asymmetric ];
45 };
46}