-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.nix
More file actions
23 lines (21 loc) · 701 Bytes
/
shell.nix
File metadata and controls
23 lines (21 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
with import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.riscv32-embedded;
};
let
hostNixpkgs = import <nixpkgs> {};
elf2hex = hostNixpkgs.stdenv.mkDerivation {
pname = "elf2hex";
version = "1.0.1";
depsBuildBuild = [ stdenv.cc ];
buildInputs = [ hostNixpkgs.python3 ];
configureFlags = "--target=riscv32-none-elf";
src = fetchurl {
url = "https://github.com/sifive/elf2hex/releases/download/v1.0.1/elf2hex-1.0.1.tar.gz";
sha256 = "1c65vzh2173xh8a707g17qgss4m5zp3i5czxfv55349102vyqany";
};
};
in
mkShell {
name = "riscv-toolchain-shell";
nativeBuildInputs = [ elf2hex hostNixpkgs.symbiyosys hostNixpkgs.verilator ];
}