Files
tundlebool/flake.nix

36 lines
1.2 KiB
Nix
Raw Normal View History

2025-04-02 23:31:10 +02:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay , ...}:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
native-deps = with pkgs; [
2025-04-03 22:11:10 +02:00
pkg-config pipewire lld clang libclang alsa-lib openssl zlib libxkbcommon libGL wayland mangohud
2025-04-02 23:31:10 +02:00
];
in
with pkgs;
{
devShells.default = mkShell {
buildInputs = with pkgs; [
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
2025-04-03 21:47:34 +02:00
targets = ["x86_64-unknown-linux-gnu" "x86_64-pc-windows-gnu"];
2025-04-02 23:31:10 +02:00
})
cargo-bloat
2025-04-03 22:07:10 +02:00
pkgs.pkgsCross.mingwW64.buildPackages.gcc
2025-04-02 23:31:10 +02:00
] ++ native-deps;
LD_LIBRARY_PATH = (lib.makeLibraryPath native-deps);
2025-04-03 22:07:10 +02:00
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS = "-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
2025-04-02 23:31:10 +02:00
};
}
);
}