summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorJason Carr <jcarr250@gmail.com>2019-06-24 19:59:55 -0400
committerJason Carr <jcarr250@gmail.com>2019-08-22 18:31:26 -0400
commit4e4a4461d85e378aa068653b0e56d7fef3903a88 (patch)
treeec8364390d160d112ed9ca6282a2deb1cbc6cfd4 /pkgs/tools/security
parent26dc4cd263ed49d56de50fde0655388240718b11 (diff)
lesspass-cli: init at 9.0.0
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/lesspass-cli/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/security/lesspass-cli/default.nix b/pkgs/tools/security/lesspass-cli/default.nix
new file mode 100644
index 000000000000..afcdf0c0a07a
--- /dev/null
+++ b/pkgs/tools/security/lesspass-cli/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, python3, fetchFromGitHub }:
+
+let
+ inherit (python3.pkgs) buildPythonApplication pytest mock pexpect;
+in
+buildPythonApplication rec {
+ pname = "lesspass-cli";
+ version = "9.0.0";
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = version;
+ sha256 = "1mdv0c0fn4d72iigy8hz4s7kf7q3pg4gjjadxwxyjwsalapnsapk";
+ };
+ sourceRoot = "source/cli";
+
+ # some tests are designed to run against code in the source directory - adapt to run against
+ # *installed* code
+ postPatch = ''
+ for f in tests/test_functional.py tests/test_interaction.py ; do
+ substituteInPlace $f --replace "lesspass/core.py" "-m lesspass.core"
+ done
+ '';
+
+ checkInputs = [ pytest mock pexpect ];
+ checkPhase = ''
+ mv lesspass lesspass.hidden # ensure we're testing against *installed* package
+ pytest tests
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Stateless password manager";
+ homepage = https://lesspass.com;
+ maintainers = with maintainers; [ jasoncarr ];
+ license = licenses.gpl3;
+ };
+}