at 24.05-pre 1.1 kB view raw
1{ lib, python3, fetchFromGitHub }: 2 3let 4 inherit (python3.pkgs) buildPythonApplication pytest mock pexpect; 5 repo = "lesspass"; 6in 7buildPythonApplication rec { 8 pname = "lesspass-cli"; 9 version = "9.1.9"; 10 11 src = fetchFromGitHub { 12 owner = repo; 13 repo = repo; 14 rev = version; 15 sha256 = "126zk248s9r72qk9b8j27yvb8gglw49kazwz0sd69b5kkxvhz2dh"; 16 }; 17 sourceRoot = "${src.name}/cli"; 18 19 # some tests are designed to run against code in the source directory - adapt to run against 20 # *installed* code 21 postPatch = '' 22 for f in tests/test_functional.py tests/test_interaction.py ; do 23 substituteInPlace $f --replace "lesspass/core.py" "-m lesspass.core" 24 done 25 ''; 26 27 nativeCheckInputs = [ pytest mock pexpect ]; 28 checkPhase = '' 29 mv lesspass lesspass.hidden # ensure we're testing against *installed* package 30 pytest tests 31 ''; 32 33 meta = with lib; { 34 description = "Stateless password manager"; 35 homepage = "https://lesspass.com"; 36 maintainers = with maintainers; [ jasoncarr ]; 37 license = licenses.gpl3; 38 }; 39}