handlr: install shell completions for zsh and fish
This commit is contained in:
parent
2e88b6f989
commit
17e90ebdb8
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv }:
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "handlr";
|
pname = "handlr";
|
||||||
|
@ -13,13 +13,19 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
cargoSha256 = "sha256-xDQV8wVlzItz0lzR1nVRPVsg7nSf/khUhevDlGgSO3g=";
|
cargoSha256 = "sha256-xDQV8wVlzItz0lzR1nVRPVsg7nSf/khUhevDlGgSO3g=";
|
||||||
|
|
||||||
nativeBuildInputs = [ shared-mime-info ];
|
nativeBuildInputs = [ installShellFiles shared-mime-info ];
|
||||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export HOME=$TEMPDIR
|
export HOME=$TEMPDIR
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion \
|
||||||
|
--zsh completions/_handlr \
|
||||||
|
--fish completions/handlr.fish
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Alternative to xdg-open to manage default applications with ease";
|
description = "Alternative to xdg-open to manage default applications with ease";
|
||||||
homepage = "https://github.com/chmln/handlr";
|
homepage = "https://github.com/chmln/handlr";
|
||||||
|
|
Loading…
Reference in a new issue