Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildGoPackage: remove go version from name #21111

Merged
merged 1 commit into from Dec 13, 2016

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Dec 13, 2016

Motivation for this change

As a user installing the program it's not interesting what go version it
was compiled against. Not more interesting than any other potential
dependencies. It also makes it harder to install or update the package.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@zimbatm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @lethalman, @wkennington and @kamilchm to be potential reviewers.

@kamilchm
Copy link
Member

I was also wondering about renaming buildGoPackage to buildGoApplication like https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix#L36 if we want to treat it as a convention.

@zimbatm zimbatm changed the title goBuildPackage: remove go version from name buildGoPackage: remove go version from name Dec 13, 2016
As a user installing the program it's not interesting what go version it
was compiled against. Not more interesting than any other potential
dependencies. It also makes it harder to install or update the package.
@zimbatm
Copy link
Member Author

zimbatm commented Dec 13, 2016

Yeah maybe. I'm not convinced the naming for build<lang>Application is really good, the "application" term is way overloaded. But consistency is good.

I'll merge this PR for now and we can consider the naming bit later on.

@zimbatm zimbatm merged commit cbdc94f into NixOS:master Dec 13, 2016
@zimbatm zimbatm deleted the go-plain-name branch December 13, 2016 11:35
@kamilchm
Copy link
Member

kamilchm commented Dec 13, 2016

The application term was the only thing stopping me from making PR :/ I feel it awkward too but I couldn't find a better name.
Although the rename idea could be just because I wrongly associate buildGoPackage with a Go source package but instead it should be understand only as Nix package built from Go source.

@zimbatm
Copy link
Member Author

zimbatm commented Dec 13, 2016

Yeah same thinking here. Also how did we go from mkDerivation to build<lang>Package? It would be nice to define a unified taxonomy that clearly indicated what is what.

In my mind there are two broad kind of derivations: those that are designed to be installed using nix-env and the others.

For the first category we care about:

  • name = "${pname}-${version}"; for easy package discovery and upgrade (maybe with variations for multiple-output derivations)
  • having all the meta info in place for package search
  • following a subset of the FHS to avoid polluting the merged profile tree too much (we should add a check for this by the way)
  • being referenced in the top-level
    This first category maps better to the traditional "package" term that we see in other distributions.

For the second category:

  • not referenced in the top-level
  • that's about it

Libraries sit a bit in between both depending on how they are being used. nixpkgs used to host a lot of libraries intended to be used by the user, like the stackage layers. Nowadays I think we decided to focus on shipping packages and solve the library problems a bit differently, using <lang>2nix conversion tools or external library repositories. Having the <lang> version in the derivation name is mostly useful for the user and making debugging quicker (in case of version mismatches).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants