1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/tools/misc/handlr/default.nix
Artturin 22eb09728d handlr: 0.6.4 -> unstable-2021-08-29
the main thing this fixes is crash on read-only mimeapps therefore
making handlr usable with a home-manager managed mimeapps.list
2022-05-18 18:19:13 +03:00

37 lines
1 KiB
Nix

{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "handlr";
version = "unstable-2021-08-29";
src = fetchFromGitHub {
owner = "chmln";
repo = pname;
rev = "90e78ba92d0355cb523abf268858f3123fd81238";
sha256 = "sha256-wENhlUBwfNg/r7yMKa1cQI1fbFw+qowwK8EdO912Yys=";
};
cargoSha256 = "sha256-30fSOzWq1CoIabPWGWndi/SaCN/ckxjlbtzuwV8rk6M=";
nativeBuildInputs = [ installShellFiles shared-mime-info ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
preCheck = ''
export HOME=$TEMPDIR
'';
postInstall = ''
installShellCompletion \
--zsh completions/_handlr \
--bash 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";
license = licenses.mit;
maintainers = with maintainers; [ mredaelli artturin ];
};
}