Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ctag-overlay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
self: super: rec {
my-universal-ctags = super.universal-ctags.overrideAttrs (old: rec {
version = "6.1.0";
src = super.fetchFromGitHub {
owner = "universal-ctags";
repo = "ctags";
rev = "v${version}";
sha256 = "sha256-f8+Ifjn7bhSYozOy7kn+zCLdHGrH3iFupHUZEGynz9Y=";
};
# disable checks, else we get `make[1]: *** No rule to make target 'optlib/cmake.c'. Stop.`
doCheck = false;
checkFlags = [ ];
});

# Skip building if same ctags version as registry
universal-ctags = if super.universal-ctags.version == my-universal-ctags.version then super.universal-ctags else my-universal-ctags;
}
19 changes: 2 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,7 @@
overlays = [ self.overlays.ctags ];
};
in { default = import ./shell.nix { inherit pkgs; }; });
# Pin a specific version of universal-ctags to the same version as in cmd/symbols/ctags-install-alpine.sh.
overlays.ctags = self: super: rec {
my-universal-ctags = super.universal-ctags.overrideAttrs (old: rec {
version = "6.1.0";
src = super.fetchFromGitHub {
owner = "universal-ctags";
repo = "ctags";
rev = "v${version}";
sha256 = "sha256-f8+Ifjn7bhSYozOy7kn+zCLdHGrH3iFupHUZEGynz9Y=";
};
# disable checks, else we get `make[1]: *** No rule to make target 'optlib/cmake.c'. Stop.`
doCheck = false;
checkFlags = [ ];
});
# Skip building if same ctags version as registry
universal-ctags = if super.universal-ctags.version == my-universal-ctags.version then super.universal-ctags else my-universal-ctags;
};
# Pin a specific version of universal-ctags to the same version as in ./install-ctags-alpine.sh.
overlays.ctags = import ./ctag-overlay.nix;
};
}
6 changes: 5 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ pkgs }:
{ pkgs ? import <nixpkgs> {
overlays = [
(import ./ctag-overlay.nix)
];
}}:
let
# pkgs.universal-ctags installs the binary as "ctags", not "universal-ctags"
# like zoekt expects.
Expand Down