From 54523e57b4a20f6fc814469eb29d7dd8343cb043 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 15 Nov 2021 15:30:00 +0000 Subject: [PATCH] you-get: install completions --- pkgs/tools/misc/you-get/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/you-get/default.nix b/pkgs/tools/misc/you-get/default.nix index bfd51a35fa7..a08fdcb1dd2 100644 --- a/pkgs/tools/misc/you-get/default.nix +++ b/pkgs/tools/misc/you-get/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonApplication, fetchPypi }: +{ lib, buildPythonApplication, fetchPypi, installShellFiles }: buildPythonApplication rec { pname = "you-get"; @@ -13,11 +13,20 @@ buildPythonApplication rec { sha256 = "99282aca720c7ee1d9ef4b63bbbd226e906ea170b789a459fafd5b0627b0b15f"; }; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd you-get \ + --zsh contrib/completion/_you-get \ + --fish contrib/completion/you-get.fish \ + --bash contrib/completion/you-get-completion.bash + ''; + meta = with lib; { description = "A tiny command line utility to download media contents from the web"; homepage = "https://you-get.org"; + changelog = "https://github.com/soimort/you-get/raw/v${version}/CHANGELOG.rst"; license = licenses.mit; maintainers = with maintainers; [ ryneeverett ]; - platforms = platforms.all; }; }