Skip to content
Open
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
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "dexter - Elixir LSP server";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
packages.default = pkgs.buildGoModule {
pname = "dexter";
version = "0.6.0";
Copy link
Copy Markdown
Contributor

@anddani anddani Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "0.6.0";
version = self.shortRev or self.dirtyRev or "dev";

src = ./.;
nativeBuildInputs = with pkgs; [ pkg-config ];
vendorHash = "sha256-18Cuyn9BhoGPVzElUGmE4GUKybm1qV/lA0nVpiGyOOY=";

postInstall = ''
mv $out/bin/cmd $out/bin/dexter
'';

overrideModAttrs = old: {
postBuild = (old.postBuild or "") + ''
# go mod vendor strips directories without .go files; restore CGO C sources
chmod -R u+w vendor
local gomodcache="$GOPATH/pkg/mod"
local ts_go="$gomodcache/github.com/tree-sitter/go-tree-sitter@v0.25.0"
local ts_ex="$gomodcache/github.com/elixir-lang/tree-sitter-elixir@v0.3.5"
cp -r "$ts_go/include" vendor/github.com/tree-sitter/go-tree-sitter/
cp -r "$ts_go/src" vendor/github.com/tree-sitter/go-tree-sitter/
cp -r "$ts_ex/src" vendor/github.com/tree-sitter/tree-sitter-elixir/
'';
};
};
});
}