35 lines
879 B
Nix
35 lines
879 B
Nix
{
|
|
description = "Rust Spellbook";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-22.05";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
version = builtins.string 0 8 self.lastModifiedDate;
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
rust = pkgs.rust-bin.nightly.latest.default.override {
|
|
extensions = [ "rust-src" ];
|
|
};
|
|
avr = pkgs.pkgsCross.avr.buildPackages;
|
|
in {
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
name = "rust-avr";
|
|
buildInputs = [
|
|
avr.gcc
|
|
avr.avrdude
|
|
rust
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|