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

treewide: build some unfree packages locally #68627

Merged
merged 1 commit into from Sep 20, 2019

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 13, 2019

Motivation for this change

Unfree packages aren't distributed by our binary cache due to legal
reasons[1] and are usually a prebuilt binary that requires some patching.
When using distributed builds[2], those are uploaded to another build
machine as fixed-output derivations from fetchurl are built locally[3]
which takes a certain amount of time and resources with almost no gain
as the build process is trivial in contrast to the up/download to a
remote builder.

This is why I figured that at least some of the packages should be
explicitly built locally, I've done something simlar for
citrix_workspace already in the past[4].

The following packages are affected by this:

  • idea.* (excluding free derivatives)
  • xmind
  • teamviewer

[1] https://nixos.wiki/wiki/FAQ/How_can_I_install_a_proprietary_or_unfree_package%3F#More_precision
[2] https://nixos.wiki/wiki/Distributed_build
[3]

, preferLocalBuild ? true

[4] 87f818d

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Unfree packages aren't distributed by our binary cache due to legal
reasons[1] and are usually a prebuilt binary that requires some patching.
When using distributed builds[2], those are uploaded to another build
machine as fixed-output derivations from `fetchurl` are built locally[3]
which takes a certain amount of time and resources with almost no gain
as the build process is trivial in contrast to the up/download to a
remote builder.

This is why I figured that at least some of the packages should be
explicitly built locally, I've done something simlar for
`citrix_workspace` already in the past[4].

The following packages are affected by this:

* `idea.*` (excluding free derivatives)
* `xmind`
* `teamviewer`

[1] https://nixos.wiki/wiki/FAQ/How_can_I_install_a_proprietary_or_unfree_package%3F#More_precision
[2] https://nixos.wiki/wiki/Distributed_build
[3] https://github.com/NixOS/nixpkgs/blob/267c8d6b2fea05bc811c8e2c2f4529b1436eeb9a/pkgs/build-support/fetchurl/default.nix#L95
[4] 87f818d
@Ma27
Copy link
Member Author

Ma27 commented Sep 20, 2019

Merging for now. Got a thumbs up from a commiter and as this only affects unfree packages I don't think that this will affect our binary caches negatively.

@Ma27 Ma27 merged commit 87a9e5e into NixOS:master Sep 20, 2019
@Ma27 Ma27 deleted the build-unfree-locally branch September 20, 2019 21:45
@7c6f434c
Copy link
Member

@volth doesn't it still try to substitute the source archives from the local private cache, and then the build phase should take not much more time than unpacking a NAR? If yes, I think this is better made explicit.

@7c6f434c
Copy link
Member

7c6f434c commented Jan 14, 2020 via email

@7c6f434c
Copy link
Member

7c6f434c commented Jan 14, 2020 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants