Skip to content

Misc static cross fixes#91975

Merged
vcunat merged 2 commits intoNixOS:stagingfrom
symphorien:misc-static-fixes2
Jul 26, 2020
Merged

Misc static cross fixes#91975
vcunat merged 2 commits intoNixOS:stagingfrom
symphorien:misc-static-fixes2

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.

@symphorien symphorien force-pushed the misc-static-fixes2 branch from 4a8b035 to 80ba806 Compare July 1, 2020 22:20
@ofborg ofborg bot requested review from colemickens and vcunat July 2, 2020 03:38
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jul 2, 2020

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.

@vcunat vcunat changed the base branch from master to staging July 26, 2020 07:35
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
@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

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants