diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2019-01-31 16:05:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-31 16:05:30 -0500 |
commit | c0d3182f79101ab28ac67d7f39ef62f7b101786c (patch) | |
tree | bc9bf85864995cf5bb497e56372946f3352e0ccd /pkgs/development/tools | |
parent | c3065c55d4c7d7052a3712ce26cdc580a5a6beb5 (diff) | |
parent | f3fe429d445aecfc7cc3f80f1fed01e77012f668 (diff) |
Merge pull request #53585 from Scriptkiddi/litecli
litecli: init at 1.0.0
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/database/litecli/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/tools/database/litecli/default.nix b/pkgs/development/tools/database/litecli/default.nix new file mode 100644 index 000000000000..cbf1af440575 --- /dev/null +++ b/pkgs/development/tools/database/litecli/default.nix @@ -0,0 +1,51 @@ +{ lib, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "litecli"; + version = "1.0.0"; + + # Python 2 won't have prompt_toolkit 2.x.x + # See: https://github.com/NixOS/nixpkgs/blob/f49e2ad3657dede09dc998a4a98fd5033fb52243/pkgs/top-level/python-packages.nix#L3408 + disabled = python3Packages.isPy27; + + src = python3Packages.fetchPypi { + inherit pname version; + sha256 = "0s5a6r5q09144cc5169snwis5i2jrh3z2g4mw9wi2fsjxyhgpwq5"; + }; + + # fixes tests https://github.com/dbcli/litecli/pull/53 + postPatch = '' + substituteInPlace litecli/main.py \ + --replace 'except FileNotFoundError:' 'except (FileNotFoundError, OSError):' + ''; + + propagatedBuildInputs = with python3Packages; [ + cli-helpers + click + configobj + prompt_toolkit + pygments + sqlparse + ]; + + checkInputs = with python3Packages; [ + pytest + mock + ]; + + preCheck = '' + export XDG_CONFIG_HOME=$TMP + # add missing file + echo "litecli is awesome!" > tests/test.txt + ''; + + meta = with lib; { + description = "Command-line interface for SQLite"; + longDescription = '' + A command-line client for SQLite databases that has auto-completion and syntax highlighting. + ''; + homepage = https://litecli.com; + license = licenses.bsd3; + maintainers = with maintainers; [ Scriptkiddi ]; + }; +} |