Merge pull request #40457 from jfrankenau/zsh-completions

Install shell completions for beets, borg, exa, youtube-dl
This commit is contained in:
Robert Schütz 2018-05-13 23:04:36 +02:00 committed by GitHub
commit 6a5b1fd72e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 3 deletions

View file

@ -174,6 +174,11 @@ in pythonPackages.buildPythonApplication rec {
test/test_replaygain.py
'';
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp extra/_beet $out/share/zsh/site-functions/
'';
doCheck = true;
preCheck = ''
@ -222,7 +227,7 @@ in pythonPackages.buildPythonApplication rec {
meta = {
description = "Music tagger and library organizer";
homepage = http://beets.radbox.org;
homepage = http://beets.io;
license = licenses.mit;
maintainers = with maintainers; [ aszlig domenkozar pjones ];
platforms = platforms.linux;

View file

@ -44,11 +44,20 @@ python3Packages.buildPythonApplication rec {
make -C docs man
mkdir -p $out/share/man
cp -R docs/_build/man $out/share/man/man1
mkdir -p $out/share/bash-completion/completions
cp scripts/shell_completions/bash/borg $out/share/bash-completion/completions/
mkdir -p $out/share/fish/vendor_completions.d
cp scripts/shell_completions/fish/borg.fish $out/share/fish/vendor_completions.d/
mkdir -p $out/share/zsh/site-functions
cp scripts/shell_completions/zsh/_borg $out/share/zsh/site-functions/
'';
meta = with stdenv.lib; {
description = "A deduplicating backup program (attic fork)";
homepage = https://borgbackup.github.io/;
homepage = https://www.borgbackup.org;
license = licenses.bsd3;
platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage
maintainers = with maintainers; [ flokli ];

View file

@ -23,6 +23,20 @@ buildRustPackage rec {
libiconv darwin.apple_sdk.frameworks.Security ]
;
postInstall = ''
mkdir -p $out/share/man/man1
cp contrib/man/exa.1 $out/share/man/man1/
mkdir -p $out/share/bash-completion/completions
cp contrib/completions.bash $out/share/bash-completion/completions/exa
mkdir -p $out/share/fish/vendor_completions.d
cp contrib/completions.fish $out/share/fish/vendor_completions.d/exa.fish
mkdir -p $out/share/zsh/site-functions
cp contrib/completions.zsh $out/share/zsh/site-functions/_exa
'';
# Some tests fail, but Travis ensures a proper build
doCheck = false;

View file

@ -38,11 +38,16 @@ buildPythonApplication rec {
++ optional phantomjsSupport phantomjs2;
in [ ''--prefix PATH : "${makeBinPath packagesToBinPath}"'' ];
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp youtube-dl.zsh $out/share/zsh/site-functions/_youtube-dl
'';
# Requires network
doCheck = false;
meta = {
homepage = http://rg3.github.io/youtube-dl/;
homepage = https://rg3.github.io/youtube-dl/;
repositories.git = https://github.com/rg3/youtube-dl.git;
description = "Command-line tool to download videos from YouTube.com and other sites";
longDescription = ''