diff options
author | Alan Pearce | 2024-05-09 16:47:41 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 19:27:55 +0200 |
commit | e062ca72b222b890e345548bd8422d5df98e9fef (patch) | |
tree | 89f52ebfdb1fb8069e6323d9dde42f5491dad5d1 /nix/overlays | |
parent | 967f6fdf5c1693d3aa27079b3ae28768fb7356c6 (diff) | |
download | searchix-e062ca72b222b890e345548bd8422d5df98e9fef.tar.lz searchix-e062ca72b222b890e345548bd8422d5df98e9fef.tar.zst searchix-e062ca72b222b890e345548bd8422d5df98e9fef.zip |
feat: import sources from configuration in go code and index options
Diffstat (limited to 'nix/overlays')
-rw-r--r-- | nix/overlays/bleve.nix | 39 | ||||
-rw-r--r-- | nix/overlays/default.nix | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/nix/overlays/bleve.nix b/nix/overlays/bleve.nix new file mode 100644 index 0000000..8e36679 --- /dev/null +++ b/nix/overlays/bleve.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, fetchFromGitHub +, installShellFiles +, buildGoModule +}: +let + gomod = builtins.fromTOML (builtins.readFile ./../../gomod2nix.toml); + version = gomod.mod."github.com/blevesearch/bleve/v2".version; +in +buildGoModule rec { + pname = "bleve"; + inherit version; + + src = fetchFromGitHub { + owner = "blevesearch"; + repo = "bleve"; + rev = version; + hash = "sha256-E7ykT0t4QTn615WfTE9EygD+p5kQQ3Qm7zZ/Jqb8tK8="; + }; + + vendorHash = "sha256-gkajiRCY+tPifBz5PRelFCZCfaWN/pti+7amuRmQI6Q="; + + subPackages = [ "cmd/bleve" ]; + + nativeBuildInputs = [ installShellFiles ]; + postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.targetPlatform) '' + installShellCompletion --cmd bleve \ + --bash <($out/bin/bleve completion bash) \ + --fish <($out/bin/bleve completion fish) \ + --zsh <($out/bin/bleve completion zsh) + ''; + + meta = { + description = "Command-line tool to interact with bleve indexes"; + homepage = "http://blevesearch.com"; + licenses = lib.licenses.asl20; + }; +} diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index 3e5c925..db27c7e 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -3,4 +3,5 @@ self: super: { (final: prev: super.callPackage ./prettier-plugin-go-template { } ); + bleve = super.callPackage ./bleve.nix { }; } |