diff options
Diffstat (limited to 'devShells/apo.nix')
-rw-r--r-- | devShells/apo.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/devShells/apo.nix b/devShells/apo.nix new file mode 100644 index 0000000..dd8b772 --- /dev/null +++ b/devShells/apo.nix @@ -0,0 +1,34 @@ +{ + system, + nixpkgs, + default, + c, +}: let + pkgs = nixpkgs.legacyPackages.${system}; + riscvPkgs = import nixpkgs.outPath { + localSystem = system; + crossSystem = { + config = "riscv32-none-elf"; + libc = "newlib-nano"; + gcc = { + arch = "rv32i"; + }; + }; + }; + mipsPkgs = import nixpkgs.outPath { + localSystem = system; + crossSystem = { + config = "mips-none-elf"; + libc = "newlib-nano"; + }; + }; +in + pkgs.buildPackages.mkShell { + packages = with pkgs; [ + qtrvsim + riscvPkgs.buildPackages.gcc + mipsPkgs.buildPackages.gcc + ]; + inputsFrom = [default c]; + meta.platforms = nixpkgs.lib.platforms.linux; + } |