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

misc minor cross fixups from @bgamari #34173

Merged
merged 10 commits into from Jan 23, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 22, 2018

Another chunk of cross fixups from the big PR.

These are part of stack of patches I've used quite a bit.
Not sure if these are directly buildable from current 'staging',
but are mostly obvious fixes of input categorization.

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

@Ericson2314 Ericson2314 changed the title misc minor cross fixups from Ben misc minor cross fixups from @bgamari Jan 23, 2018
@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
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.

Mostly good!

configureFlags = optional (!cryptoSupport) "--without-crypto" ++ [
configureFlags = []
++ optional (buildPlatform != hostPlatform) "--with-libxml-prefix=${libxml2.dev}"
++ optional (!cryptoSupport) "--without-crypto"
Copy link
Member

Choose a reason for hiding this comment

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

We might as well put these on the end for the nice = [ idiomatic line since we're mass rebuilding today anyways.

@@ -41,7 +41,10 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ findXMLCatalogs ];

# TODO move cryptoSupport as last flag, when upgrading libxslt
configureFlags = optional (!cryptoSupport) "--without-crypto" ++ [
configureFlags = []
++ optional (buildPlatform != hostPlatform) "--with-libxml-prefix=${libxml2.dev}"
Copy link
Member

Choose a reason for hiding this comment

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

We can do this unconditionally

postPatch = '' substituteInPlace Makefile --replace 'STRIP=-s' "STRIP=" '';

# The build system is missing a -lz by default
makeFlags = "SHARED=yes PREFIX=\${out} CC=${stdenv.cc.targetPrefix}gcc";
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this worked before either? Let's use makeFlagsArray and CC=$CC.

@dtzWill
Copy link
Member Author

dtzWill commented Jan 23, 2018

libxslt fixed, can you add commit implementing what you're suggesting re:pciutils?

(or we can drop it for now, whichever you'd prefer)

@Ericson2314
Copy link
Member

@dtzWill Sure, will do.

@Ericson2314 Ericson2314 merged commit f432c48 into NixOS:staging Jan 23, 2018
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {

outputs = [ "out" "lib" ];

nativeBuildInputs = [ perl help2man ];
nativeBuildInputs = [ perl help2man m4 ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really both nativeBuildInput and propagatedBuildInput?

Copy link
Member

Choose a reason for hiding this comment

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

It's certainly possible, and fairly harmless if it isn't. But we can always try without too.

@dtzWill dtzWill deleted the fix/cross-misc-ben-1 branch January 23, 2018 14:32
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

5 participants