{ description = "VIctory — build the Windows executable on NixOS"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { nixpkgs, rust-overlay, ... }: let # The only supported development platform: the toolchain in # rust-toolchain.toml cross-builds x86_64-pc-windows-msvc. system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; overlays = [ (import rust-overlay) ]; }; in { devShells.${system}.default = pkgs.mkShellNoCC { packages = with pkgs; [ # Same channel, components and windows target as rustup would use. (rust-bin.fromRustupToolchainFile ./rust-toolchain.toml) # The Fedora instructions in docs/linux.md, in one shell: # cargo-xwin fetches the Windows SDK/CRT into ~/.cache/cargo-xwin. cargo-xwin clang llvm lld git ]; shellHook = '' echo "VIctory: cargo xwin build --release --locked -p victory --target x86_64-pc-windows-msvc" echo "Tests: cargo test --locked -p victory-core -p victory-formats -p victory-pipeline -p victory-shader -p victory-game -p xtask" ''; }; }; }