application/octet-stream
•
1.74 KB
•
68 lines
{
description = "RubHub";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
# Target system(s) — adjust if you need macOS or other
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
runtimeLibs = with pkgs; [
libx11
libxcb
libxkbcommon
libxcursor
libxi
libxrandr
libxinerama
libxxf86vm
# OpenGL loader / drivers
mesa
libglvnd
# Audio/fonts often needed by frameworks
alsa-lib
fontconfig
];
in
{
default = pkgs.mkShell {
strictDeps = true;
nativeBuildInputs = with pkgs; [
rustc
cargo
rustfmt
clippy
rust-analyzer
bacon
mold
clang
tokei
libxcb
libx11
alsa-lib
fontconfig
cmake
];
buildInputs = runtimeLibs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath runtimeLibs;
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
LD = "${pkgs.mold}/bin/mold";
CC = "${pkgs.llvmPackages.clang}/bin/clang";
CXX = "${pkgs.llvmPackages.clang}/bin/clang++";
};
});
};
}