Added a flake.nix and default.nix to properly build the package, which now can be used with nix build or nix run. The go modules are handled by gomod2nix, which can regerenate the gomod2nix.toml with nix develop and gomod2nix regenerate (if you change anything on the go modules). I've added a line in the justfile that make your release command also change the nix package version, so you don't have to worry about it. I've also added the result dir (the directory of the nix builds) to the gitignore.
The flake itself is locked with a flake.lock and can be updated with nix flake update. It's tracking nixos-unstable (the rolling-release branch of NixOS), but it can track the stable version if requested (although you'll have to change the url from time to time to update the stable version eg. 24.05 will be 24.11 in the next release).
Also added a shell.nix to handle nix develop, this pulls all the tooling for development and also gomod2nix. You can add more packages inside the pkgs.mkShell to enhance the development environment. I've added all the basic tools I've found in your justfile.
Adding nix infrastructure as suggested in https://github.com/hyprland-community/hyprls/issues/12#issuecomment-2233348793.
Added a flake.nix and default.nix to properly build the package, which now can be used with
nix build
ornix run
. The go modules are handled by gomod2nix, which can regerenate the gomod2nix.toml withnix develop
andgomod2nix regenerate
(if you change anything on the go modules). I've added a line in the justfile that make your release command also change the nix package version, so you don't have to worry about it. I've also added the result dir (the directory of the nix builds) to the gitignore.The flake itself is locked with a flake.lock and can be updated with
nix flake update
. It's tracking nixos-unstable (the rolling-release branch of NixOS), but it can track the stable version if requested (although you'll have to change the url from time to time to update the stable version eg. 24.05 will be 24.11 in the next release).Also added a shell.nix to handle
nix develop
, this pulls all the tooling for development and also gomod2nix. You can add more packages inside thepkgs.mkShell
to enhance the development environment. I've added all the basic tools I've found in your justfile.