manual: Document buildGoPackage renameImports
This commit is contained in:
parent
23a92ba43c
commit
5b538a6dd1
@ -670,7 +670,11 @@ net = buildGoPackage rec {
|
|||||||
url = "https://${goPackagePath}";
|
url = "https://${goPackagePath}";
|
||||||
sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav";
|
sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-3' />
|
renameImports = [ <co xml:id='ex-buildGoPackage-3' />
|
||||||
|
"code.google.com/p/go.crypto golang.org/x/crypto"
|
||||||
|
"code.google.com/p/goprotobuf github.com/golang/protobuf"
|
||||||
|
];
|
||||||
|
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-4' />
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
@ -698,7 +702,21 @@ the following arguments are of special significance to the function:
|
|||||||
</para>
|
</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs='ex-buildGoPackage-3'>
|
<callout arearefs='ex-buildGoPackage-4'>
|
||||||
|
<para>
|
||||||
|
<varname>renameImports</varname> is a list of import paths to be renamed before
|
||||||
|
building the package. The path to be renamed can be a regular expression.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
In this example imports will be renamed from
|
||||||
|
<literal>code.google.com/p/go.crypto</literal> to
|
||||||
|
<literal>golang.org/x/crypto</literal> and from
|
||||||
|
<literal>code.google.com/p/goprotobuf</literal> to
|
||||||
|
<literal>github.com/golang/protobuf</literal>.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
|
||||||
|
<callout arearefs='ex-buildGoPackage-4'>
|
||||||
<para>
|
<para>
|
||||||
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
|
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
|
||||||
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
|
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
|
||||||
|
Loading…
x
Reference in New Issue
Block a user