about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix
blob: 233f77613fe8dbc5ab8be91d861bd9f57ec0dec8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, installShellFiles
}:

buildPythonPackage rec {
  pname = "xkcdpass";
  version = "1.19.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-F7977Tb8iu/pRy6YhginJgK0N0G3CjPpHjomLTFf1F8=";
  };

  nativeBuildInputs = [ installShellFiles ];

  checkInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "xkcdpass" ];

  postInstall = ''
    installManPage *.?
    install -Dm444 -t $out/share/doc/${pname} README*
  '';

  meta = with lib; {
    description = "Generate secure multiword passwords/passphrases, inspired by XKCD";
    homepage = "https://pypi.python.org/pypi/xkcdpass/";
    license = licenses.bsd3;
    maintainers = with maintainers; [ peterhoeg ];
  };
}