Anarchyphase-Website/flake.nix
2026-04-21 21:35:28 +02:00

55 lines
1.3 KiB
Nix

{
description = "Rust Development Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
gcc
gnumake
python3
sqlite
];
buildInputs = with pkgs; [
rustc
cargo
rust-analyzer
rustfmt
clippy
pkgs.cudaPackages.cuda_nvcc
pkgs.cudaPackages.cudatoolkit
# --- LIBRARIES ---
openssl
libiconv
glib
libva
];
shellHook = ''
export CUDA_PATH=${pkgs.cudaPackages.cudatoolkit}
export LD_LIBRARY_PATH=${pkgs.cudaPackages.cuda_nvcc}/lib:${pkgs.cudaPackages.cudatoolkit}/lib:/run/opengl-driver/lib:$LD_LIBRARY_PATH
echo "Entered nix shell"
'';
};
});
}