buildGoPackage: use $out instead of $bin
This commit is contained in:
parent
453dca2edc
commit
3f17518490
|
@ -191,18 +191,6 @@ deis = buildGoPackage rec {
|
|||
To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<varname>buildGoPackage</varname> produces <xref linkend='chap-multiple-output' xrefstyle="select: title" /> where <varname>bin</varname> includes program binaries. You can test build a Go binary as follows:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-build -A deis.bin
|
||||
</screen>
|
||||
or build all outputs with:
|
||||
<screen>
|
||||
<prompt>$ </prompt>nix-build -A deis.all
|
||||
</screen>
|
||||
<varname>bin</varname> output will be installed by default with <varname>nix-env -i</varname> or <varname>systemPackages</varname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
|
||||
<screen>
|
||||
|
|
|
@ -312,6 +312,11 @@ environment.systemPackages = [
|
|||
the <literal>notmuch.emacs</literal> output.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The default output of <literal>buildGoPackage</literal> is now <literal>$out</literal> instead of <literal>$bin</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -203,15 +203,15 @@ let
|
|||
installPhase = args.installPhase or ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $bin
|
||||
mkdir -p $out
|
||||
dir="$NIX_BUILD_TOP/go/bin"
|
||||
[ -e "$dir" ] && cp -r $dir $bin
|
||||
[ -e "$dir" ] && cp -r $dir $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = preFixup + ''
|
||||
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
|
||||
find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
@ -235,9 +235,6 @@ let
|
|||
|
||||
enableParallelBuilding = enableParallelBuilding;
|
||||
|
||||
# I prefer to call this dev but propagatedBuildInputs expects $out to exist
|
||||
outputs = args.outputs or [ "bin" "out" ];
|
||||
|
||||
meta = {
|
||||
# Add default meta information
|
||||
homepage = "https://${goPackagePath}";
|
||||
|
|
Loading…
Reference in New Issue