2021-06-06 07:54:09 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, shared-mime-info, libiconv, installShellFiles }:
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "handlr";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "unstable-2021-08-29";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chmln";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "90e78ba92d0355cb523abf268858f3123fd81238";
|
|
|
|
sha256 = "sha256-wENhlUBwfNg/r7yMKa1cQI1fbFw+qowwK8EdO912Yys=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cargoSha256 = "sha256-30fSOzWq1CoIabPWGWndi/SaCN/ckxjlbtzuwV8rk6M=";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles shared-mime-info ];
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TEMPDIR
|
|
|
|
'';
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion \
|
|
|
|
--zsh completions/_handlr \
|
2022-06-16 17:23:12 +00:00
|
|
|
--bash completions/handlr \
|
2021-06-06 07:54:09 +00:00
|
|
|
--fish completions/handlr.fish
|
|
|
|
'';
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Alternative to xdg-open to manage default applications with ease";
|
|
|
|
homepage = "https://github.com/chmln/handlr";
|
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ mredaelli artturin ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "handlr";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
}
|