!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

210 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.48 Servers

Load older messages


SenderMessageTime
5 Jun 2025
@diamondburned:matrix.orgdiamond (it/its)for haskell and C you're basically kind of using Nix as a build tool and dependency management system already06:55:20
@s_r:matrix.org@s_r:matrix.org for those you get the dependencies in buildInputs 06:55:29
@diamondburned:matrix.orgdiamond (it/its)same for Python unless you use like Poetry06:55:30
@diamondburned:matrix.orgdiamond (it/its)you can theoretically package Go modules up as Nix derivations but like why when the language has already good dependency management on its own06:56:04
@diamondburned:matrix.orgdiamond (it/its)you'd rather just use the good dependency management and put it behind a fixed-output derivation06:56:19
@diamondburned:matrix.orgdiamond (it/its)at least for now until Nix has something better to deal with it06:56:25
@s_r:matrix.org@s_r:matrix.orgThat's fine, I'm not against using vendor :)06:56:38
@s_r:matrix.org@s_r:matrix.org does mkShell for go pull the module dependencies in? 06:57:39
@diamondburned:matrix.orgdiamond (it/its) go the tool will do this for you 06:58:38
@diamondburned:matrix.orgdiamond (it/its) (it does in buildGoModule too) 06:58:53
@diamondburned:matrix.orgdiamond (it/its)((you just need the FDO hash for its output))06:59:02
@s_r:matrix.org@s_r:matrix.org the problem with buildGoModule is that it sets the flag to do vendoring, if mkShell doesn't do that it might be nicer 06:59:55
@s_r:matrix.org@s_r:matrix.orgI'll give it a go later today07:00:08
@diamondburned:matrix.orgdiamond (it/its) i mean it might if you tell it to, but all of your mkShell should just be packages = [ go ] which only grabs the package in 07:00:31
@diamondburned:matrix.orgdiamond (it/its)maybe gopls and gotools for the standard dev tools07:00:44
@diamondburned:matrix.orgdiamond (it/its)LSP + goimports07:00:47
@diamondburned:matrix.orgdiamond (it/its) also if you don't mind doing go mod vendor but you do mind checking the whole vendor directory in, you could look at gomod2nix which generates a go.sum-esque file that is Nix-compatible instead 07:03:09
@diamondburned:matrix.orgdiamond (it/its) or use Tailscale's funny narhash tool 07:03:16
@diamondburned:matrix.orgdiamond (it/its) or use Tailscale's funny nardump tool 07:03:30
@diamondburned:matrix.orgdiamond (it/its)https://github.com/tailscale/tailscale/tree/main/cmd/nardump https://github.com/tailscale/tailscale/blob/main/update-flake.sh07:04:10
@s_r:matrix.org@s_r:matrix.orgI think I have some ideas now. Thanks!07:08:51
@tioan:dunwyn.xyz@tioan:dunwyn.xyz left the room.19:01:57
6 Jun 2025
@antifuchs:asf.computerantifuchsCan recommend https://github.com/antifuchs/generate-go-sri, which is based on the tailscale tool (:15:45:38
@antifuchs:asf.computerantifuchs* Can recommend https://github.com/antifuchs/generate-go-sri, which is based on the tailscale tool and process. It works well on my repos, which is why I made it a flake thing (:15:46:05
@mikejw:matrix.orgmikejw joined the room.17:47:29
7 Jun 2025
@deeok:matrix.orgmatrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms) left the room.22:07:34
@deeok:matrix.orgmatrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms) joined the room.23:49:43
9 Jun 2025
@sigmasquadron:matrix.orgSigmaSquadron joined the room.13:05:33
@kleha:matrix.orgKleha joined the room.23:57:20
11 Jun 2025
@hcbt:matrix.orghcbt joined the room.20:48:43

Show newer messages


Back to Room ListRoom Version: 9