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

Misc static cross fixes #91975

Merged
merged 2 commits into from Jul 26, 2020
Merged

Misc static cross fixes #91975

merged 2 commits into from Jul 26, 2020

Conversation

symphorien
Copy link
Member

@symphorien symphorien commented Jul 1, 2020

Motivation for this change

cross compile x11vnc to i686 linux musl static

Things done

Tested on top of #89471

Tested that x11vnc still compile on x86_64-linux
Tested that a slightly modified x11vnc cross compiles to x86_64 musl static and i686 musl static
(I removed systemd and libgcrypt optional dependencies from libvncserver)

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

@@ -276,4 +280,28 @@ in {
libev = super.libev.override { static = true; };

libexecinfo = super.libexecinfo.override { enableShared = false; };

xorg = super.xorg.overrideScope' (xorgself: xorgsuper: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be preferably to introduce some kind of enableStatic option in the xorg derivations, if possible, but I guess that is difficult because they are "generated" and then overridden.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can change the signature of a function while overriding...

In any case I'd rather see something like #83664 implemented.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible with something like

libXxf86dga = lib.makeOverrideable ({enableStatic, ... } @attrs: super.libXxf86dga.overrideAttrs(oldAttrs: {
} // attrs));

but yea, not really worth it.

@FRidh FRidh added this to WIP in Staging via automation Jul 2, 2020
@FRidh FRidh moved this from WIP to Needs review in Staging Jul 2, 2020
@vcunat vcunat changed the base branch from master to staging July 26, 2020 07:35
Staging automation moved this from Needs review to Ready Jul 26, 2020
Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK.

I expect the rebuilds are mainly because of libjpeg(-turbo).

@vcunat vcunat merged commit 5bd8316 into NixOS:staging Jul 26, 2020
Staging automation moved this from Ready to Done Jul 26, 2020
@ofborg ofborg bot requested a review from vcunat July 26, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants