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

dhcp: cross compile #58305

Merged
merged 1 commit into from
Apr 16, 2019
Merged

dhcp: cross compile #58305

merged 1 commit into from
Apr 16, 2019

Conversation

illegalprime
Copy link
Member

@illegalprime illegalprime commented Mar 25, 2019

Motivation for this change

cross compile dhcp, dhclient still fails because makeWrapper wraps some scripts in the wrong bash changing makeWrapper to be in buildInputs fixed this.

The only note here is that when cross compiling DHCP wants to know the full path of a random device, on linux it's likely going to be /dev/random, but maybe this is hacky. not sure!

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -57,6 +63,8 @@ stdenv.mkDerivation rec {
substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
sed -i "includes/dhcpd.h" \
-"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"

export AR=$(${buildPackages.which}/bin/which $AR)
Copy link
Member

@matthewbauer matthewbauer Mar 26, 2019

Choose a reason for hiding this comment

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

I think the better way to do this is:

export AR=${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar

@illegalprime
Copy link
Member Author

updated

@matthewbauer
Copy link
Member

I think this should go to staging as well

@illegalprime illegalprime changed the base branch from master to staging April 4, 2019 15:36
@FRidh FRidh merged commit d888baa into NixOS:staging Apr 16, 2019
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.

5 participants