-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Expand file tree
/
Copy pathpackage.nix
More file actions
42 lines (35 loc) · 1.11 KB
/
package.nix
File metadata and controls
42 lines (35 loc) · 1.11 KB
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
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "trippy";
version = "0.13.0";
src = fetchFromGitHub {
owner = "fujiapple852";
repo = "trippy";
rev = finalAttrs.version;
hash = "sha256-+WLWtHguDm23VLjZ4aQnyLAnE/uynONj8lsfVMTTuwY=";
};
nativeBuildInputs = [ installShellFiles ];
cargoHash = "sha256-kVqj+rYPxfv/9h+HDdSL5jU6DoU5KoJVVQot4O4WVNc=";
cargoBuildFlags = [ "--package trippy" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
local INSTALL="$out/bin/trip"
installShellCompletion --cmd trip \
--bash <($out/bin/trip --generate bash) \
--fish <($out/bin/trip --generate fish) \
--zsh <($out/bin/trip --generate zsh)
'';
meta = {
description = "Network diagnostic tool";
homepage = "https://trippy.cli.rs";
changelog = "https://github.com/fujiapple852/trippy/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.matthiasbeyer ];
mainProgram = "trip";
};
})