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

perl: fix errant references when cross-compiling #65761

Merged
merged 1 commit into from Nov 5, 2019

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

Cross-compiled Perl ends up with references to its source tarball and build coreutils.

Things done

The source tarball reference was a bit perplexing, but it turns out that Perl's build system uses the src environment variable, and writes its value into a header in the output. For native builds, some part of the config ends up of overwriting this variable, but this does not happen when cross-compiling.

The coreutils reference was simply an assumption that the correct binary would be in PATH.

  • 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @edolstra

@lopsided98
Copy link
Contributor Author

I guess we need some special case for the Darwin bootstrap perl. I'm not sure what package provides pwd in that case.

@lopsided98
Copy link
Contributor Author

Oh, I see #58979 ran into the same problem.

@lopsided98
Copy link
Contributor Author

I applied the coreutils fix only to cross builds and added a comment explaining why this was done.

@matthewbauer matthewbauer added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Aug 28, 2019
@lopsided98
Copy link
Contributor Author

Sorry, I accidentally rebased on master...

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

I would put the comments outside the ''...'' that way they don't affect the drv. Otherwise looks good!

@lopsided98
Copy link
Contributor Author

I fixed the comments.

@Ericson2314
Copy link
Member

Thank you!

@Ericson2314 Ericson2314 merged commit f11ed19 into NixOS:staging Nov 5, 2019
@lopsided98 lopsided98 deleted the perl-cross-references branch November 5, 2019 23:55
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

3 participants