forked from rarias/nixos-riscv
WIP: Working spec cpu with clang epi
This commit is contained in:
19
flake.nix
19
flake.nix
@@ -1,17 +1,20 @@
|
||||
{
|
||||
inputs.nixpkgs.url = "github:rodarima/nixpkgs/fix-pkgs-static-gcc-march";
|
||||
#inputs.bscpkgs.url = "path:/home/Computational/rarias/bscpkgs";
|
||||
inputs.bscpkgs.url = "/home/Computational/rarias/bscpkgs";
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
outputs = { self, nixpkgs, bscpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlay = import ./overlay.nix;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
#overlay = import ./overlay.nix;
|
||||
#pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
overlay = import ./overlay.nix;
|
||||
#overlay = import ./overlay.nix;
|
||||
nixosConfigurations = {
|
||||
# The qemu configuration defines a system that runs in the RISC-V
|
||||
# architecture, but is build from an x86 host machine.
|
||||
qemu = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit self; };
|
||||
system = "${system}";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
@@ -21,6 +24,7 @@
|
||||
|
||||
# Same, but disable compressed instructions
|
||||
qemu-nc = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit self; };
|
||||
system = "${system}";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
@@ -31,6 +35,7 @@
|
||||
|
||||
# FPGA Lagarto Hun CPU
|
||||
lagarto-hun = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit self; };
|
||||
system = "${system}";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
@@ -47,9 +52,9 @@
|
||||
nixosconf = self.nixosConfigurations.qemu-nc;
|
||||
syspkgs = nixosconf.pkgs;
|
||||
toplevel = nixosconf.config.system.build.toplevel;
|
||||
in pkgs.mkShell {
|
||||
in syspkgs.mkShell {
|
||||
pname = "qemu-shell";
|
||||
buildInputs = with pkgs; [ qemu e2fsprogs ];
|
||||
buildInputs = with syspkgs; [ qemu e2fsprogs ];
|
||||
# Here we tell the run script where to find the system
|
||||
NIXOS_SYSTEM_TOPLEVEL = toplevel;
|
||||
OPENSBI = syspkgs.opensbi-uboot;
|
||||
@@ -59,7 +64,7 @@
|
||||
nixosconf = self.nixosConfigurations.lagarto-hun;
|
||||
syspkgs = nixosconf.pkgs;
|
||||
build = nixosconf.config.system.build;
|
||||
in pkgs.mkShell {
|
||||
in syspkgs.mkShell {
|
||||
pname = "lagarto-hun-shell";
|
||||
TOPLEVEL = build.toplevel;
|
||||
OPENSBI = syspkgs.opensbi;
|
||||
|
||||
Reference in New Issue
Block a user