fork of https://github.com/sourcegraph/zoekt
1{
2 description = "The Zoekt developer environment Nix Flake";
3
4 inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; };
5
6 outputs = { self, nixpkgs }: {
7 devShells = nixpkgs.lib.genAttrs [
8 "x86_64-linux"
9 "aarch64-linux"
10 "aarch64-darwin"
11 "x86_64-darwin"
12 ] (system:
13 let
14 pkgs = import nixpkgs {
15 inherit system;
16 overlays = [ self.overlays.ctags ];
17 };
18 in { default = import ./shell.nix { inherit pkgs; }; });
19 # Pin a specific version of universal-ctags to the same version as in cmd/symbols/ctags-install-alpine.sh.
20 overlays.ctags = self: super: rec {
21 my-universal-ctags = super.universal-ctags.overrideAttrs (old: rec {
22 version = "6.1.0";
23 src = super.fetchFromGitHub {
24 owner = "universal-ctags";
25 repo = "ctags";
26 rev = "v${version}";
27 sha256 = "sha256-f8+Ifjn7bhSYozOy7kn+zCLdHGrH3iFupHUZEGynz9Y=";
28 };
29 # disable checks, else we get `make[1]: *** No rule to make target 'optlib/cmake.c'. Stop.`
30 doCheck = false;
31 checkFlags = [ ];
32 });
33 # Skip building if same ctags version as registry
34 universal-ctags = if super.universal-ctags.version == my-universal-ctags.version then super.universal-ctags else my-universal-ctags;
35 };
36 };
37}