buildGoPackage: updated docs for goPackages after rework#16129
buildGoPackage: updated docs for goPackages after rework#16129rushmorem merged 1 commit intoNixOS:masterfrom
Conversation
|
By analyzing the blame information on this pull request, we identified @vcunat and @chris-martin to be potential reviewers |
| </callout> | ||
|
|
||
| <screen> | ||
| $ nix-build -A goPackages.net |
There was a problem hiding this comment.
Shouldn't we also explain how to build binaries especially now that we can no longer install by the attribute path in all-packages.nix? Say nix-build -A deis.bin for example...
There was a problem hiding this comment.
As it turned out packages can be installed with nix-env -i to have bin in the profile. It all about differences of multiple outputs in nix-build and nix-env. #16103 (comment)
There was a problem hiding this comment.
Yes, @vcunat's explanation helped make things clearer. I don't think this is an issue any more. But the documentation around this is seriously lacking IMHO.
There was a problem hiding this comment.
But is it lacking here or in somewhere between nix-build and multiple outputs? I can mention it here anyway.
There was a problem hiding this comment.
Re-reading nix-build shows that this is in fact documented there. It says "If a derivation has multiple outputs, nix-build will build the default (first) output." How about we make "bin" the default instead (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/go-modules/generic/default.nix#L198)?
There was a problem hiding this comment.
So maybe we should leave the decision what needs to be build to developer who want to use nix-build and rely on nix-env default for installation?
There was a problem hiding this comment.
Yes, that's what I think we should do.
There was a problem hiding this comment.
Should we remove all .bin attributes from all-packages then?
There was a problem hiding this comment.
Yes please, I hadn't realised that we added them for other packages besides go2nix.
|
Note that changing the order of outputs has impact on the way things work when the package is added into |
Motivation for this change
Stale docs for
goPackageson master after #16017Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)CC: @rushmorem @zimbatm