diff options
author | Symphorien Gibol <symphorien+git@xlumurb.eu> | 2020-02-24 12:00:00 +0000 |
---|---|---|
committer | Symphorien Gibol <symphorien+git@xlumurb.eu> | 2020-02-24 12:00:00 +0000 |
commit | fb90fea6e85ba70c82bce69a3cd6250573437f83 (patch) | |
tree | 767afe4338eb45b1977d9e7f98430e82e2f22e34 /pkgs/applications/office/todoman | |
parent | ea79a830dcf9c0059656da7f52835d2663d5c436 (diff) | |
download | nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar.gz nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar.bz2 nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar.lz nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar.xz nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.tar.zst nixpkgs-fb90fea6e85ba70c82bce69a3cd6250573437f83.zip |
todoman: install shell completions
Diffstat (limited to 'pkgs/applications/office/todoman')
-rw-r--r-- | pkgs/applications/office/todoman/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index bfa162a54a2..9aeddf1a021 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -1,4 +1,4 @@ -{ stdenv, python3, glibcLocales }: +{ stdenv, python3, glibcLocales, installShellFiles, jq }: let inherit (python3.pkgs) buildPythonApplication fetchPypi; @@ -17,6 +17,7 @@ buildPythonApplication rec { LANG = "en_US.UTF-8"; LC_TYPE = "en_US.UTF-8"; + nativeBuildInputs = [ installShellFiles ]; buildInputs = [ glibcLocales ]; propagatedBuildInputs = with python3.pkgs; [ atomicwrites click click-log click-repl configobj humanize icalendar parsedatetime @@ -28,6 +29,12 @@ buildPythonApplication rec { makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" "--set CHARSET en_us.UTF-8" ]; + postInstall = '' + installShellCompletion --bash contrib/completion/bash/_todo + substituteInPlace contrib/completion/zsh/_todo --replace "jq " "${jq}/bin/jq " + installShellCompletion --zsh contrib/completion/zsh/_todo + ''; + preCheck = '' # Remove one failing test that only checks whether the command line works rm tests/test_main.py |