2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, mercurial
|
|
|
|
, git
|
2022-10-30 15:09:59 +00:00
|
|
|
, openssh
|
|
|
|
, nixosTests
|
2024-07-01 15:47:52 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "hound";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-13 14:23:35 +00:00
|
|
|
owner = "hound-search";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "hound";
|
2021-03-09 03:18:52 +00:00
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-Qdk57zLjTXLdDEmB6K+sZAym5s0BekJJa/CpYeOBOcY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
patches = [
|
|
|
|
# add check config flag
|
|
|
|
# https://github.com/hound-search/hound/pull/485/files
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/MarcelCoding/hound/commit/b2f1cef335eff235394de336593687236a3b88bb.patch";
|
|
|
|
hash = "sha256-3+EBvnA8JIx2P6YM+8LpojDIX7hNXJ0vwVN4oSAouZ4=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/MarcelCoding/hound/commit/f917a457570ad8659d02fca4311cc91cadcadc00.patch";
|
|
|
|
hash = "sha256-CGvcIoSbgiayli5B8JRjvGfLuH2fscNpNTEm7xwkfpo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
vendorHash = "sha256-0psvz4bnhGuwwSAXvQp0ju0GebxoUyY2Rjp/D43KF78=";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
# requires network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-10-30 15:09:59 +00:00
|
|
|
wrapProgram $out/bin/houndd --prefix PATH : ${lib.makeBinPath [ mercurial git openssh ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) hound; };
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Lightning fast code searching made easy";
|
2023-04-29 16:46:19 +00:00
|
|
|
homepage = "https://github.com/hound-search/hound";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ grahamc SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|