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

pciutils: fix build on darwin #98609

Merged
merged 1 commit into from Sep 25, 2020
Merged

pciutils: fix build on darwin #98609

merged 1 commit into from Sep 25, 2020

Conversation

r-burns
Copy link
Contributor

@r-burns r-burns commented Sep 24, 2020

Makefile assumes CC=gcc, so we should use our own CC. To avoid affecting currently working derivations, this is only done when !stdenv.cc.isGNU.
Darwin also requires IOKit framework.
I'm adding preConfigure via optionalAttrs to avoid affecting any non-darwin derivations. Let me know if there's a clearer way to achieve this.

Motivation for this change

ZHF 20.09 #97479

Things done
  • 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 (Ubuntu x86_64)
  • 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.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Sep 24, 2020
@ofborg ofborg bot requested a review from vcunat September 24, 2020 02:19
@vcunat
Copy link
Member

vcunat commented Sep 24, 2020

Let me know if there's a clearer way to achieve this.

Adding null attribute doesn't cause a rebuild, so using that with if is probably a bit more readable, but I don't mind either.

Add IOKit to macOS prereqs, and patch Makefile to use $CC
@risicle
Copy link
Contributor

risicle commented Sep 25, 2020

WFM macos 10.14

@risicle risicle merged commit 5bb4508 into NixOS:master Sep 25, 2020
@risicle risicle added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 25, 2020
@r-burns r-burns deleted the pciutils branch September 25, 2020 19:49
@vcunat vcunat removed the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants