nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit d1de284af8035512396c7f4666e70b8e9b0559c6
parent c0c2f6f57eca6c566f9b54c4216d359a3620018a
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Thu, 29 Jun 2023 00:25:38 +0400

Add bash-completor

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/misc/bash-completor/default.nix | 30++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -319,6 +319,7 @@ lib.makeScope newScope ( apibackuper = callPackage ./misc/apibackuper { }; arduinojson = callPackage ./misc/arduinojson { }; ascii-dash = callPackage ./misc/ascii-dash { }; + bash-completor = callPackage ./misc/bash-completor { }; blink = callPackage ./misc/blink { }; btpd = callPackage ./misc/btpd { }; bwh = callPackage ./misc/bwh { diff --git a/pkgs/misc/bash-completor/default.nix b/pkgs/misc/bash-completor/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, bashInteractive, installShellFiles }: + +stdenv.mkDerivation (finalAttrs: { + pname = "bash-completor"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "adoyle-h"; + repo = "bash-completor"; + rev = "v${finalAttrs.version}"; + hash = "sha256-Ph+cQaXbykn703cdgkqlXcYMO4vvH6e0hCeecWS/6yA="; + }; + + nativeBuildInputs = [ bashInteractive installShellFiles ]; + + buildFlags = [ "build" ]; + + installPhase = '' + install -Dm755 dist/bash-completor -t $out/bin + installShellCompletion dist/bash-completor.completion.bash + ''; + + meta = with lib; { + description = "Creating a bash completion script in a declarative way"; + inherit (finalAttrs.src.meta) homepage; + license = licenses.asl20; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +})