build(toolchain),ci: switch to rust 1.82-beta for now

`precise_capturing` has no workaround but we need it in tests. The main
crate should still compile under stable rustc, which is enforced by CI.
This commit is contained in:
oxalica 2024-09-10 06:22:56 -04:00
parent 7160e5adbd
commit 199985c6a2
8 changed files with 88 additions and 34 deletions

View file

@ -7,6 +7,10 @@ rec {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -14,6 +18,7 @@ rec {
self,
nixpkgs,
naersk,
rust-overlay,
}:
let
inherit (nixpkgs) lib;
@ -26,7 +31,13 @@ rec {
system:
let
pkgs = nixpkgs.legacyPackages.${system};
naersk' = pkgs.callPackage naersk { };
rustBin = rust-overlay.lib.mkRustBin { } pkgs;
toolchain = rustBin.fromRustupToolchainFile ./rust-toolchain.toml;
naersk' = pkgs.callPackage naersk {
cargo = toolchain;
rustc = toolchain;
};
mkPkg =
{
pkg-config,
@ -75,6 +86,21 @@ rec {
}
);
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
nativeBuildInputs = [ pkgs.buildPackages.sqlite-interactive ];
env.RUST_LOG = "blahd=debug,blahctl=debug";
};
}
);
nixosModules = rec {
default = blahd;
blahd = import ./contrib/module.nix {