Merge pull request #125594 from spwhitt/handlr-completions

This commit is contained in:
Sandro 2021-06-05 21:28:47 +02:00 committed by GitHub
commit a58bfdb21c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv }:
{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "handlr";
@ -13,13 +13,19 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-xDQV8wVlzItz0lzR1nVRPVsg7nSf/khUhevDlGgSO3g=";
nativeBuildInputs = [ shared-mime-info ];
nativeBuildInputs = [ installShellFiles shared-mime-info ];
buildInputs = lib.optional stdenv.isDarwin libiconv;
preCheck = ''
export HOME=$TEMPDIR
'';
postInstall = ''
installShellCompletion \
--zsh completions/_handlr \
--fish completions/handlr.fish
'';
meta = with lib; {
description = "Alternative to xdg-open to manage default applications with ease";
homepage = "https://github.com/chmln/handlr";