Unverified Commit f0811283 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #301615 from TomaSajt/luneta

luneta: init at 0.7.4
parents 241d162a bf6eeb31
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
{
  "dependencies": {
    "arsd-official": {
      "version": "7.2.0",
      "sha256": "1m546r6l0pkk80y5f3ff8im08hp59nwzjb5ikjhfiswvdizpwjlh"
    },
    "fuzzyd": {
      "version": "2.2.0-beta",
      "sha256": "0wzih4yrlrrj12ls9hd27gnxrj4j4c0ha9xprdfc7azszlv16j6g"
    },
    "ncurses": {
      "version": "1.0.0",
      "sha256": "0ivl88vp2dy9rpv6x3f9jlyqa7aps2x1kkyx80w2d4vcs31pzmb2"
    },
    "riverd-loader": {
      "version": "1.0.2",
      "sha256": "0c94551bscnia7vpixaq4xd2anprkd7pkf0q0anyadv5kqa8xgip"
    },
    "riverd-ncurses": {
      "version": "1.0.5",
      "sha256": "1wgdschv6hpdjykf5bblxphnhnpy2kvw8hq8h5iaygi9zr7jf286"
    }
  }
}
+44 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}