fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

add shell.nix

nix-shell provides a way to have isolated development environments.
Zoekt's development requirements are pretty vanilla: go and git.
However, I sometimes have issues with getting universal-ctags installed
across different environments I run.

I've seen some other go projects adopt the use of nix-shell, in
particular a few of the hashicorp projects. I've ended up using this for
a while now whenever developing in zoekt and want to share for others.

Change-Id: Icfcc3c7461565fed19aea607b04e03e67b42ce05

+24
+24
shell.nix
··· 1 + { pkgs ? import <nixpkgs> {} }: 2 + 3 + let 4 + # pkgs.universal-ctags installs the binary as "ctags", not "universal-ctags" 5 + # like zoekt expects. 6 + ctagsWrapper = pkgs.writeScriptBin "universal-ctags" '' 7 + #!${pkgs.stdenv.shell} 8 + exec ${pkgs.universal-ctags}/bin/ctags "$@" 9 + ''; 10 + 11 + in pkgs.mkShell { 12 + name = "zoekt"; 13 + 14 + nativeBuildInputs = [ 15 + pkgs.go 16 + 17 + # zoekt-git-index 18 + pkgs.git 19 + 20 + # Used to index symbols 21 + ctagsWrapper 22 + pkgs.universal-ctags 23 + ]; 24 + }