[Nix-dev] Added renameImports utility to goBuildPackage

Domen Kožar domen at dev.si
Thu Apr 16 18:51:03 CEST 2015


You can easily add docs for just this feature - without waiting for other
docs.

Start a section for goBuildPackage (you can steal buildPythonPackage
snippet) and
document only renameImports.

d.

On Thu, Apr 16, 2015 at 12:48 PM, Luca Bruno <lethalman88 at gmail.com> wrote:

> Sometimes git repos get renamed and break go packages because of
> different import paths.
> Since today I've added a simple renameImports utility, not sure if that
> was worth it because it was easy to do without it, anyway:
>
> renameImports = [
>   "foo bar"
>   "baz qux"
> ];
>
> Will rename imports from foo to bar and from baz to qux. The replaced
> import is a regexp. This code will simply run govers -m foo bar; govers
> -m baz qux.
>
> Since it seems a rather common thing to do, I've decided to add this
> common code to buildGoPackage, also it will be easier to switch a day to
> something else than govers (just in case).
>
> Hopefully we'll have nixpkgs docs about packaging go stuff a day.
>
> Best regards,
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150416/75a90962/attachment.html 


More information about the nix-dev mailing list