{
  description = "basement";
  inputs = {
    nixpkgs.url =
      "github:nixos/nixpkgs/d98abf5cf5914e5e4e9d57205e3af55ca90ffc1d";
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    flake-utils.url = "github:numtide/flake-utils";
    crane.url = "github:ipetkov/crane";
  };
  outputs = { ... }@inputs:
    inputs.flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import inputs.nixpkgs {
          inherit system;
          overlays = [ (import inputs.rust-overlay) ];
        };
        cross-pkgs = pkgs.pkgsCross.mingwW64;
        rust-bin = inputs.rust-overlay.lib.mkRustBin { } pkgs.pkgsCross.mingwW64.buildPackages;
        rust-pkg = rust-bin.stable."1.88.0".default.override {
          extensions = [ "rust-src" ];
          targets = [ "x86_64-pc-windows-gnu" ];
        };
      in
      {
        formatter = pkgs.nixpkgs-fmt;
        devShells.default = cross-pkgs.mkShell {
          nativeBuildInputs = [
            pkgs.just
            rust-pkg
            pkgs.pkg-config
          ];
          buildInputs = [
            cross-pkgs.windows.pthreads
          ];
        };
      });
}

You need to put the windows.pthreads in the buildInputs specifically, that is very important, and you need to use the rust-bin thing it is an issue with flakes.