You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withimport<nixpkgs>{};letpkgs=import../../../nixpkgs;pkgsNative=pkgs{};pkgsCross=pkgs{inheritsystem;inheritcrossSystem;};crossSystem=rec{config="arm-linux-gnueabihf";bigEndian=false;arch="arm";float="hard";fpu="vfpv3-d16";withTLS=true;libc="glibc";platform=platforms.armv7l-hf-multiplatform;openssl.system="linux-generic32";inherit(platform)gcc;};rustc=pkgsNative.rustc.override{targets=["armv7-unknown-linux-gnueabihf"];targetToolchains=[pkgsCross.gccCrossStageFinal];};cargo=pkgsNative.cargo.override{inheritrustc;};instdenv.mkDerivationrec{name="arm-hello";buildInputs=[cargopkgsCross.gccCrossStageFinalqemu];shellHook='' PS1="rust-arm> " alias build="cargo build --target=${rustc.target}" alias run-debug="qemu-arm target/${rustc.target}/debug/${name}" alias run-release="qemu-arm target/${rustc.target}/release/${name}" '';}
Things done
Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)
NixOS
OS X
Linux
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/)
don't merge this just yet, I want to rework this. rust is moving to using cargo as a build system, so the rustc and cargo packages can share the bootstrapping code. should this be a new package then? or can we put the cargo and rustc code in the same folder so that we can share the bootstrapping code through local imports without polluting all-packages?
So final building and testing is still pending, but I think it should be ok. If someone wants to test it on mac osx to make sure there are no regressions, that would be good...
mmh that is right there is no build-managers cargo anymore. have you added any custom patches to nixpkgs? I'm not having that problem... I rebased on master and added a sha256 fix for the exa package, and added a rustc alias, can you try again?
nix-build . -A rustc
...
output path ‘/nix/store/dx95c8mp9g1gqvy5qin10xzwngw2yr97-rust-e4e8b66’ has r:sha256 hash ‘1pz4qx70mqv78fxm4w1mq7csk5pssq4qmr2vwwb5v8hyx03caff8’ when ‘167rh7hs77grn895h54s7np7f0k7b6i8z4wdfinncg4chy08hxq1’ was expected
I get these spurious hash changes sometimes too. My rust src is currently cached, so I didn't notice the change. I think fetchgit isn't 100% deterministic.
Maybe. If I would make a wild guess I'd say this happens when a submodule
gets a new branch. But I haven't looked into this, since once it's
committed the package is in the binary cache, so it isn't an issue until
you make a change...
On Jun 15, 2016 1:13 PM, "Moritz Ulrich" notifications@github.com wrote:
Ugh, non-determinism in fetchgit isn't good. It pulls quite a bunch of
submodules (I think), maybe it's related to that?
Sorry! I was busy at work yesterday (while my machine built all of Rust in Nix). To me it looks good. I think it's fine to merge it, but we should try to investigate the sha256 issue further.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
To try out rust on arm (depends on #15867):
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)