aboutsummaryrefslogtreecommitdiff
path: root/devShells/riscv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'devShells/riscv.nix')
-rw-r--r--devShells/riscv.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/devShells/riscv.nix b/devShells/riscv.nix
new file mode 100644
index 0000000..ded7859
--- /dev/null
+++ b/devShells/riscv.nix
@@ -0,0 +1,23 @@
+{ nixpkgs, shellrc, system }:
+let
+ pkgs = nixpkgs.legacyPackages.${system};
+ pkgs-riscv = import nixpkgs.outPath {
+ localSystem = system;
+ crossSystem = {
+ config = "riscv32-none-elf";
+ libc = "newlib";
+ gcc = {
+ arch = "rv32i";
+ };
+ };
+ };
+
+in pkgs.mkShell {
+ packages = (with pkgs; [
+ qtrvsim
+ ]) ++ (with pkgs-riscv.buildPackages; [
+ gcc pkg-config
+ ]);
+ inputsFrom = [ shellrc.packages.${system}.default ];
+ meta.platforms = nixpkgs.lib.platforms.linux;
+}