RustPhysicsMQ/flake.nix

51 lines
1.3 KiB
Nix

{
description = "DevShell for rust";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells.default = with pkgs;
mkShell rec {
buildInputs = [
pkg-config
udev
rustup
alsa-lib
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
xorg.libxcb
libxkbcommon
vulkan-loader
wayland
libGL
mesa
glfw
cmake
(pkgs.python3.withPackages (python-pkgs:
with python-pkgs; [
# select Python packages here
pandas
matplotlib
]))
];
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
builtins.toString (pkgs.lib.makeLibraryPath buildInputs)
}";
export LIBCLANG_PATH="${pkgs.libclang.lib}/lib";
'';
};
});
}