summary refs log tree commit diff
path: root/pkgs/tools/misc/balanceofsatoshis/default.nix
blob: b1b17e02366bb44fbcb4913cc92c246731b61368 (plain) (blame)
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
, buildNpmPackage
, fetchFromGitHub
, installShellFiles
, python3
}:

buildNpmPackage rec {
  pname = "balanceofsatoshis";
  version = "15.8.15";

  src = fetchFromGitHub {
    owner = "alexbosworth";
    repo = "balanceofsatoshis";
    rev = "v${version}";
    hash = "sha256-8GWITeFn7ELUH7bxcNlmQvgperQutBwVUhp2yjeEWrM=";
  };

  npmDepsHash = "sha256-lTXv4pEjrzcOK68RO1K007r7dCbAyc45G8Oy8V3XLts=";

  nativeBuildInputs = [
    installShellFiles
    python3
  ];

  dontNpmBuild = true;

  npmFlags = [ "--ignore-scripts" ];

  postInstall = ''
    installShellCompletion --cmd bos \
        --bash <($out/bin/bos completion bash) \
        --zsh <($out/bin/bos completion zsh) \
        --fish <($out/bin/bos completion fish)
  '';

  meta = {
    changelog = "https://github.com/alexbosworth/balanceofsatoshis/blob/${src.rev}/CHANGELOG.md";
    description = "Tool for working with the balance of your satoshis on LND";
    homepage = "https://github.com/alexbosworth/balanceofsatoshis";
    license = lib.licenses.mit;
    mainProgram = "bos";
    maintainers = with lib.maintainers; [ mmilata ];
  };
}