~ruther/nix-envs

ref: d78625b32bd1853274fbaf9b9cf1cc17e64966cf nix-envs/programs/qtrvsim/flake.nix -rw-r--r-- 766 bytes
d78625b3 — Rutherther feat: add qtrvsim program 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  description = "QtMips package";


  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, flake-utils, nixpkgs }: 
  let
    system = "x86_64-linux";
    pkgs = import nixpkgs {
      system = "${system}";
    };
    riscPkgs = import nixpkgs {
      crossSystem.config = "riscv64-none-elf";
      system = "${system}";
    };
  in {
    packages.${system} = {
      qtrvsim = pkgs.qtrvsim;
      default = self.packages.${system}.qtrvsim;
    };

    devShells.${system}.default = riscPkgs.mkShell {
      packages = [
        pkgs.qtrvsim
      ];

      buildInputs = [
        riscPkgs.buildPackages.binutils
        riscPkgs.buildPackages.gcc
      ];
    };
  };
}
Do not follow this link