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

flex: fix for cross #34170

Merged
merged 4 commits into from Jan 23, 2018
Merged

flex: fix for cross #34170

merged 4 commits into from Jan 23, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 22, 2018

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

bgamari and others added 3 commits January 22, 2018 16:51
Flex needs both a C compiler for the build environment, as well as a native m4.

(cherry picked from commit 81827c0)
linux-pam appears to rely on this while cross-compiling.

(cherry picked from commit 4009dd1)
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.

Thanks for moving these along!

buildInputs = [ bison ];

propagatedBuildInputs = [ m4 ];
nativePropagatedBuildInputs = [ m4 ];
Copy link
Member

Choose a reason for hiding this comment

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

nativePropagatedBuildInputs isn't a thing (it would be propagatedNativeBuildInputs) but I don't think this needs to be changed at all.


nativeBuildInputs = [ buildPackages.stdenv.cc autoreconfHook help2man ];
Copy link
Member

Choose a reason for hiding this comment

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

buildPackages.stdenv.cc should be a depsBuildBuild.

buildInputs = [ bison ];

propagatedBuildInputs = [ m4 ];
nativePropagatedBuildInputs = [ m4 ];

postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) ''
sed -i Makefile -e 's/-no-undefined//;'
'';

crossAttrs = {
Copy link
Member

Choose a reason for hiding this comment

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

I wan't to get rid of crossAttrs, so could you make all the inner attributes conditional "top-level" ones instead?

* top-level attributes, not crossAttrs
* use depsBuildBuild
@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jan 23, 2018
@dtzWill
Copy link
Member Author

dtzWill commented Jan 23, 2018

Feedback addressed, but need to rebuild-all-the-things to test it still builds properly.

@Ericson2314
Copy link
Member

I unchecked the box for you

@dtzWill
Copy link
Member Author

dtzWill commented Jan 23, 2018

Tested on aarch64.

@Ericson2314 Ericson2314 merged commit f83bf0e into NixOS:staging Jan 23, 2018
@dtzWill dtzWill deleted the fix/flex-cross branch January 23, 2018 01:26
@Ericson2314 Ericson2314 added this to @bgamari's numerous fixes in Cross compilation Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 501+ 10.rebuild-darwin-stdenv 10.rebuild-linux: 501+
Projects
No open projects
Cross compilation
@bgamari's and @dtzWill's num...
Development

Successfully merging this pull request may close these issues.

None yet

4 participants