Init. Tested against cargo bench, the single-threaded consumer is confirmed working.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
rust-overlay,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
in
|
||||
with pkgs;
|
||||
{
|
||||
formatter = nixfmt-rfc-style;
|
||||
devShells.default = mkShell {
|
||||
buildInputs = [ rustToolchain ];
|
||||
};
|
||||
packages.default = callPackage ./package.nix { inherit rustPlatform; };
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user