about summary refs log tree commit diff
path: root/pkgs/by-name/lu/luneta/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/lu/luneta/package.nix')
-rw-r--r--pkgs/by-name/lu/luneta/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/lu/luneta/package.nix b/pkgs/by-name/lu/luneta/package.nix
new file mode 100644
index 0000000000000..02e9a0724da2b
--- /dev/null
+++ b/pkgs/by-name/lu/luneta/package.nix
@@ -0,0 +1,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 ];
+  };
+}