34 lines
819 B
Nix
34 lines
819 B
Nix
|
{
|
||
|
inputs = { fenix.url = "github:nix-community/fenix"; };
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils, fenix }:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs {
|
||
|
inherit system;
|
||
|
overlays = [ fenix.overlays.default ];
|
||
|
};
|
||
|
|
||
|
toolchain = pkgs.fenix.stable;
|
||
|
|
||
|
targetPkgs = pkgs.pkgsCross.riscv64;
|
||
|
in rec {
|
||
|
legacyPackages = pkgs;
|
||
|
|
||
|
devShell = pkgs.mkShell {
|
||
|
inputsFrom = [ ];
|
||
|
|
||
|
packages = (with pkgs; [
|
||
|
cargo-watch
|
||
|
cargo-deny
|
||
|
cargo-edit
|
||
|
|
||
|
targetPkgs.stdenv.cc
|
||
|
(qemu.override {
|
||
|
hostCpuTargets = [ "${targetPkgs.system}-user" ];
|
||
|
})
|
||
|
]) ++ (with toolchain; [ cargo rustc rustfmt clippy ]);
|
||
|
};
|
||
|
});
|
||
|
}
|