From 5b538a6dd1f40dfe099a2a7fc4a5259acd653e2c Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 16 Apr 2015 19:02:50 +0200 Subject: [PATCH] manual: Document buildGoPackage renameImports --- doc/language-support.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/language-support.xml b/doc/language-support.xml index f2b64c93d22..8654fb06cfd 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -670,7 +670,11 @@ net = buildGoPackage rec { url = "https://${goPackagePath}"; sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav"; }; - propagatedBuildInputs = [ goPackages.text ]; + renameImports = [ + "code.google.com/p/go.crypto golang.org/x/crypto" + "code.google.com/p/goprotobuf github.com/golang/protobuf" + ]; + propagatedBuildInputs = [ goPackages.text ]; }; @@ -698,7 +702,21 @@ the following arguments are of special significance to the function: - + + + renameImports is a list of import paths to be renamed before + building the package. The path to be renamed can be a regular expression. + + + In this example imports will be renamed from + code.google.com/p/go.crypto to + golang.org/x/crypto and from + code.google.com/p/goprotobuf to + github.com/golang/protobuf. + + + + propagatedBuildInputs is where the dependencies of a Go library are listed. Only libraries should list propagatedBuildInputs. If a standalone