blob: ca449c89b65d4ab28f02480b4ed6b53b10805d15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib
, stdenv
, rustPlatform
, installShellFiles
, darwin
, version ? "git"
}:
rustPlatform.buildRustPackage rec {
pname = "joshuto";
inherit version;
src = ../.;
cargoLock = {
lockFile = ../Cargo.lock;
};
buildInputs = [
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
darwin.apple_sdk.frameworks.Foundation
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd joshuto \
--bash <($out/bin/joshuto completions bash) \
--zsh <($out/bin/joshuto completions zsh) \
--fish <($out/bin/joshuto completions fish)
'';
patchPhase = ''
sed -i 's/env!("CARGO_PKG_VERSION")/\"${version}\"/g' src/main.rs
'';
meta = with lib;{
description = "Ranger-like terminal file manager written in Rust";
homepage = "https://github.com/kamiyaa/joshuto";
license = licenses.lgpl3Only;
mainProgram = "joshuto";
};
}
|