Skip to content

Commit

Permalink
Reformat flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Emin017 committed May 9, 2024
1 parent 9ddcafe commit b8f143e
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
description = "MEMU";
description = "MEMU";

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

outputs = { self, nixpkgs, flake-utils }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system;};
deps = with pkgs; [
git
gnumake autoconf automake
cmake ninja
pkgsCross.riscv64-embedded.buildPackages.gcc
];
in
{
legacyPackages = pkgs;
devShell = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
buildInputs = deps;
RV64_TOOLCHAIN_ROOT = "${pkgs.pkgsCross.riscv64-embedded.buildPackages.gcc}";
shellHook = ''
export EMU_CC=$RV64_TOOLCHAIN_ROOT/bin/riscv64-none-elf-gcc
export EMU_OBJCOPY=$RV64_TOOLCHAIN_ROOT/bin/riscv64-none-elf-objcopy
make test-img
unset EMU_CC
unset EMU_OBJCOPY
'';
};
}
)
// { inherit inputs;};
outputs = { self, nixpkgs, flake-utils }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system;};
deps = with pkgs; [
git
gnumake autoconf automake
cmake ninja
pkgsCross.riscv64-embedded.buildPackages.gcc
];
in
{
legacyPackages = pkgs;
devShell = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
buildInputs = deps;
RV64_TOOLCHAIN_ROOT = "${pkgs.pkgsCross.riscv64-embedded.buildPackages.gcc}";
shellHook = ''
export EMU_CC=$RV64_TOOLCHAIN_ROOT/bin/riscv64-none-elf-gcc
export EMU_OBJCOPY=$RV64_TOOLCHAIN_ROOT/bin/riscv64-none-elf-objcopy
make test-img
unset EMU_CC
unset EMU_OBJCOPY
'';
};
}
)
// { inherit inputs;};
}

0 comments on commit b8f143e

Please sign in to comment.