nixpkgs/pkgs/by-name/jo/joshuto/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

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";
version = "0.9.8";
2021-09-09 17:08:16 +00:00
src = fetchFromGitHub {
owner = "kamiyaa";
repo = "joshuto";
2022-07-24 20:11:27 +00:00
rev = "v${version}";
hash = "sha256-8OvaL6HqsJjBAbksR4EpC/ZgvdBSKlB37PP77p3T3PY=";
2021-09-09 17:08:16 +00:00
};
cargoHash = "sha256-zGqOmebD7kZAsWunWSB2NFOSg0cu8aM1dyhEIQz1j4I=";
2021-09-09 17:08:16 +00:00
2023-08-30 02:44:20 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation
];
2021-09-09 17:08:16 +00:00
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2023-08-30 02:44:20 +00:00
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";
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
};
}