39 lines
988 B
Nix
39 lines
988 B
Nix
{
|
|
description = "Project Tool";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { nixpkgs, rust-overlay, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ (import rust-overlay) ];
|
|
};
|
|
|
|
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
|
|
# For unstable rustfmt features
|
|
rustNightlyToolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal.override {
|
|
extensions = [ "rustfmt" ];
|
|
});
|
|
|
|
buildTools = with pkgs; [
|
|
rustToolchain
|
|
rustNightlyToolchain
|
|
pkg-config
|
|
];
|
|
|
|
devShell = pkgs.mkShell {
|
|
name = "projtool";
|
|
buildInputs = buildTools;
|
|
};
|
|
in {
|
|
devShells.${system}.default = devShell;
|
|
};
|
|
}
|