2019-08-21 16:59:58 +08:00
|
|
|
let
|
|
|
|
mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
|
|
|
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
|
|
|
in
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
project = callPackage ./default.nix {};
|
|
|
|
in
|
|
|
|
with project;
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "armdev-env";
|
|
|
|
buildInputs = with rustPlatform.rust; [
|
|
|
|
rustc cargo cargo-xbuild
|
|
|
|
rustcSrc
|
2019-09-17 05:41:22 +08:00
|
|
|
pkgsCross.arm-embedded.stdenv.cc
|
2019-08-21 16:59:58 +08:00
|
|
|
openocd
|
|
|
|
];
|
|
|
|
|
|
|
|
# Set Environment Variables
|
|
|
|
RUST_BACKTRACE = 1;
|
|
|
|
XARGO_RUST_SRC = "${rustcSrc}/src";
|
2019-09-17 05:41:22 +08:00
|
|
|
RUST_COMPILER_RT_ROOT = "${rustcSrc}/src/llvm-project/compiler-rt";
|
2019-08-21 16:59:58 +08:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
echo "Run 'cargo xbuild --release' to build."
|
|
|
|
'';
|
|
|
|
}
|