From 4fa33b32e2567276f84a8ef49cb01328db801fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 13 Jun 2022 08:18:32 +0200 Subject: devShells/c: add --- devShells/riscv.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 devShells/riscv.nix (limited to 'devShells/riscv.nix') 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; +} -- cgit v1.2.3