2023-08-30 02:44:20 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
2021-09-09 17:08:16 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "joshuto";
|
2024-03-15 23:57:11 +00:00
|
|
|
version = "0.9.8";
|
2021-09-09 17:08:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kamiyaa";
|
2023-07-04 21:01:46 +00:00
|
|
|
repo = "joshuto";
|
2022-07-24 20:11:27 +00:00
|
|
|
rev = "v${version}";
|
2024-03-15 23:57:11 +00:00
|
|
|
hash = "sha256-8OvaL6HqsJjBAbksR4EpC/ZgvdBSKlB37PP77p3T3PY=";
|
2021-09-09 17:08:16 +00:00
|
|
|
};
|
|
|
|
|
2024-03-15 23:57:11 +00:00
|
|
|
cargoHash = "sha256-zGqOmebD7kZAsWunWSB2NFOSg0cu8aM1dyhEIQz1j4I=";
|
2021-09-09 17:08:16 +00:00
|
|
|
|
2023-08-30 02:44:20 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-07-04 21:01:46 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
|
|
|
];
|
2021-09-09 17:08:16 +00:00
|
|
|
|
2023-08-30 02:44:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd joshuto \
|
|
|
|
--bash <($out/bin/joshuto completions bash) \
|
|
|
|
--zsh <($out/bin/joshuto completions zsh) \
|
|
|
|
--fish <($out/bin/joshuto completions fish)
|
|
|
|
'';
|
|
|
|
|
2021-09-09 17:08:16 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Ranger-like terminal file manager written in Rust";
|
|
|
|
homepage = "https://github.com/kamiyaa/joshuto";
|
2023-07-04 21:01:46 +00:00
|
|
|
changelog = "https://github.com/kamiyaa/joshuto/releases/tag/${src.rev}";
|
2021-09-09 17:08:16 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2023-08-30 02:44:56 +00:00
|
|
|
maintainers = with maintainers; [ figsoda totoroot xrelkd ];
|
2023-08-30 08:22:46 +00:00
|
|
|
mainProgram = "joshuto";
|
2021-09-09 17:08:16 +00:00
|
|
|
};
|
|
|
|
}
|