2019-05-05 20:56:23 +08:00
|
|
|
let
|
2020-09-09 16:51:50 +08:00
|
|
|
pkgs = import <nixpkgs> { overlays = [ (import ./nix/mozilla-overlay.nix) ]; };
|
|
|
|
rustPlatform = (import ./nix/rust-platform.nix { inherit pkgs; });
|
2019-05-05 20:56:23 +08:00
|
|
|
in
|
2020-09-09 16:51:50 +08:00
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "zynq-env";
|
|
|
|
buildInputs = [
|
|
|
|
rustPlatform.rust.rustc
|
|
|
|
rustPlatform.rust.cargo
|
|
|
|
pkgs.cacert
|
|
|
|
pkgs.cargo-xbuild
|
|
|
|
|
|
|
|
pkgs.openocd pkgs.gdb
|
|
|
|
pkgs.openssh pkgs.rsync
|
|
|
|
|
|
|
|
(import ./nix/mkbootimage.nix { inherit pkgs; })
|
|
|
|
];
|
2019-05-05 20:56:23 +08:00
|
|
|
|
2020-10-13 18:27:01 +08:00
|
|
|
XARGO_RUST_SRC = "${rustPlatform.rust.rustc.src}/library";
|
2019-05-05 20:56:23 +08:00
|
|
|
|
2020-09-09 16:51:50 +08:00
|
|
|
shellHook = ''
|
2020-09-09 17:56:50 +08:00
|
|
|
echo "Run 'cargo xbuild --release -p ...' to build."
|
2020-09-09 16:51:50 +08:00
|
|
|
'';
|
|
|
|
}
|