about summary refs log tree commit diff
path: root/pkgs/by-name/lu/luneta/package.nix
blob: 02e9a0724da2be9436780a8400c492ef3f8c0af0 (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
{
  lib,
  buildDubPackage,
  fetchFromGitHub,
  ncurses,
}:

buildDubPackage rec {
  pname = "luneta";
  version = "0.7.4";

  src = fetchFromGitHub {
    owner = "fbeline";
    repo = "luneta";
    rev = "v${version}";
    hash = "sha256-pYE8hccXT87JIMh71PtXzVQBegTzU7bdpVEaV2VkaEk=";
  };

  # not sure why, but this alias does not resolve
  postPatch = ''
    substituteInPlace source/luneta/keyboard.d \
        --replace-fail "wint_t" "dchar"
  '';

  # ncurses dub package version is locked to 1.0.0 instead of using ~master
  dubLock = ./dub-lock.json;

  buildInputs = [ ncurses ];

  installPhase = ''
    runHook preInstall
    install -Dm755 luneta -t $out/bin
    runHook postInstall
  '';

  meta = {
    changelog = "https://github.com/fbeline/luneta/releases/tag/${src.rev}";
    description = "An interactive filter and fuzzy finder for the command-line";
    homepage = "https://github.com/fbeline/luneta";
    license = lib.licenses.gpl2Only;
    mainProgram = "luneta";
    maintainers = with lib.maintainers; [ tomasajt ];
  };
}