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

openssh: fix cross-compilation #107606

Merged
merged 1 commit into from Dec 26, 2020
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

krb5-config from the host platform needs to be added to PATH so it can be run during build. This works because krb5-config is a platform independent shell-script. Before #100906, krb5-config was not used, so we didn't run into this problem.

cc @KAction @nh2
cc @Ericson2314 Is this the best way of solving this problem?

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
  • 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.

krb5-config from the host platform needs to be added to PATH so it can be run
during build. This works because krb5-config is a platform independent
shell-script. Before NixOS#100906, krb5-config was not used, so we didn't run into
this problem.
@@ -1,4 +1,5 @@
{ stdenv
, pkgs
Copy link
Member

Choose a reason for hiding this comment

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

I thought you should never put pkgs into inputs?

Copy link
Member

Choose a reason for hiding this comment

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

this is rare, but correct. It is just like doing buildPackages explicitly, with the reason being to disable splicing.

Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be best to have an explanatory comment then.

@Ericson2314
Copy link
Member

Ah, good old #51176 yet again.

@Ericson2314 Ericson2314 merged commit d6eebc0 into NixOS:master Dec 26, 2020
@Ericson2314
Copy link
Member

I did find myself compelled to to do the "real solution" with #107647 and openssh/openssh-portable#219.

@nh2
Copy link
Contributor

nh2 commented Dec 26, 2020

@Ericson2314 That is very much appreciated!

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

4 participants