Go: Difference between revisions
imported>Milahu add note: go.mod file must be in the source root |
imported>Milahu link to implementation of buildGoModule |
||
| Line 2: | Line 2: | ||
== Packaging go modules == | == Packaging go modules == | ||
There are helper tools such as [https://github.com/nix-community/vgo2nix vgo2nix] and [https://github.com/tweag/gomod2nix gomod2nix], however the nixpkgs library function '''buildGoModule''' does an absolutely fantastic job in packaging standard go modules. | There are helper tools such as [https://github.com/nix-community/vgo2nix vgo2nix] and [https://github.com/tweag/gomod2nix gomod2nix], however the nixpkgs library function '''buildGoModule''' ([https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/go-modules/generic/default.nix implementation]) does an absolutely fantastic job in packaging standard go modules. | ||
See [https://nixos.org/manual/nixpkgs/stable/#sec-language-go nixpkgs manual '''Language: Go'''] | See [https://nixos.org/manual/nixpkgs/stable/#sec-language-go nixpkgs manual '''Language: Go'''] | ||