at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 installShellFiles, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "xkcdpass"; 14 version = "1.20.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-tav9fStZzdpZ+Tf7IiEKxGSa0NLgnh+Hv+dKVOI60Yo="; 22 }; 23 24 nativeBuildInputs = [ installShellFiles ]; 25 26 build-system = [ setuptools ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pythonImportsCheck = [ "xkcdpass" ]; 31 32 disabledTests = lib.optionals (pythonAtLeast "3.10") [ 33 # https://github.com/redacted/XKCD-password-generator/issues/138 34 "test_entropy_printout_valid_input" 35 ]; 36 37 postInstall = '' 38 installManPage *.? 39 install -Dm444 -t $out/share/doc/${pname} README* 40 ''; 41 42 meta = with lib; { 43 description = "Generate secure multiword passwords/passphrases, inspired by XKCD"; 44 homepage = "https://github.com/redacted/XKCD-password-generator"; 45 license = licenses.bsd3; 46 maintainers = with maintainers; [ peterhoeg ]; 47 mainProgram = "xkcdpass"; 48 }; 49}