Skip to content

Feature/mingw coreutils#43710

Closed
angerman wants to merge 3 commits intoNixOS:masterfrom
angerman:feature/mingw-coreutils
Closed

Feature/mingw coreutils#43710
angerman wants to merge 3 commits intoNixOS:masterfrom
angerman:feature/mingw-coreutils

Conversation

@angerman
Copy link
Contributor

Motivation for this change

Broken out of #43559

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@angerman angerman requested a review from Ericson2314 as a code owner July 18, 2018 02:35

assert aclSupport -> acl != null;
assert selinuxSupport -> libselinux != null && libsepol != null;
assert hostPlatform.libc != "msvcrt";
Copy link
Member

Choose a reason for hiding this comment

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

I think it would make more sense to avoid the assertion and just do platforms = platforms.unix below. Assertions are annoying because there is no way to override them with something like allowUnsupportedPlatform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fair point.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 18, 2018
cc_solib = getLib cc;
# The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
coreutils_bin = if nativeTools then "" else getBin coreutils;
coreutils_bin = if (nativeTools || targetPlatform.isWindows) then "" else getBin coreutils;
Copy link
Member

Choose a reason for hiding this comment

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

I still think this one is in error? It means cc-wrapper won't use coreutils, which seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. this is right. It should not use coreutils on windows. We don't have them on windows.

Copy link
Member

Choose a reason for hiding this comment

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

But that means you won't use them on Linux when you are making windows binaries. Use hostPlatform to turn it just when compiling on Windows (for any target).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm... I'll try hostPlatform, let's see. My issue was that it tried to buld coreutils for windows when cross compiling windows stuff on linux.

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 think we don't want the cc-wrapper changes. The rest is good, though.

@matthewbauer
Copy link
Member

matthewbauer commented Aug 1, 2018

@angerman Did you ever run into this bug:

libraries/Win32/ghc.mk:4: libraries/Win32/dist-install/build/.depend-v-p.haskell: No such file or directory
make[1]: *** [libraries/Win32/ghc.mk:4: libraries/Win32/dist-install/build/Graphics/Win32/GDI/Types.hs] Error 1

? Here is the build:

https://hydra.nixos.org/build/78166084

@angerman
Copy link
Contributor Author

angerman commented Aug 1, 2018

@matthewbauer I haven't. But I remember there being some similar sounding issues with recent git checkouts of GHC. I haven't looked into those though...

@matthewbauer
Copy link
Member

Applied in acaa6c9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants