2024-09-01 05:14:57 -05:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs = {
|
|
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
};
|
|
|
|
yafas = {
|
|
|
|
url = "github:UbiqueLambda/yafas";
|
|
|
|
};
|
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
yafas,
|
|
|
|
fenix,
|
|
|
|
...
|
|
|
|
}: yafas.allSystems nixpkgs ({ pkgs, system }: {
|
2024-09-01 05:32:20 -05:00
|
|
|
devShells.default = pkgs.mkShell.override {
|
2024-09-11 05:45:33 -05:00
|
|
|
stdenv = if pkgs.stdenv.isLinux then
|
|
|
|
pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv
|
|
|
|
else
|
|
|
|
pkgs.clangStdenv;
|
2024-09-01 05:32:20 -05:00
|
|
|
} rec {
|
2024-09-11 05:43:08 -05:00
|
|
|
packages = with pkgs; [
|
2024-09-01 05:14:57 -05:00
|
|
|
(fenix.packages.${system}.complete.withComponents [
|
|
|
|
"cargo"
|
|
|
|
"clippy"
|
|
|
|
"rustc"
|
|
|
|
"rustfmt"
|
|
|
|
"rust-src"
|
|
|
|
"rust-analyzer"
|
|
|
|
])
|
2024-09-11 05:46:20 -05:00
|
|
|
gdb
|
2024-09-01 05:14:57 -05:00
|
|
|
lldb
|
|
|
|
cmake
|
|
|
|
pkg-config
|
2024-09-11 05:43:08 -05:00
|
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
libGL
|
|
|
|
glslang
|
2024-09-01 05:14:57 -05:00
|
|
|
vulkan-tools
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
2024-09-11 05:43:08 -05:00
|
|
|
xorg.libxcb
|
|
|
|
libxkbcommon
|
2024-09-01 05:14:57 -05:00
|
|
|
wayland
|
|
|
|
udev
|
2024-09-11 05:43:08 -05:00
|
|
|
openssl
|
2024-09-01 05:14:57 -05:00
|
|
|
];
|
|
|
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
2024-09-01 05:32:20 -05:00
|
|
|
RUSTFLAGS = "-Zthreads=8";
|
2024-09-01 05:14:57 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|