aboutsummaryrefslogtreecommitdiff
path: root/devShells/riscv.nix
blob: ded78592a9a892a8e2aa06dc1f419f6383235405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}