kubi/flake.nix

77 lines
1.6 KiB
Nix
Raw Normal View History

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 =
{
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-11-07 12:18:15 -06:00
} {
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
];
2024-11-07 12:18:15 -06:00
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
libGL
2024-12-11 13:56:43 -06:00
glslang
2024-11-07 12:18:15 -06:00
vulkan-tools
vulkan-headers
vulkan-loader
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
xorg.libxcb
libxkbcommon
]);
2024-09-01 05:32:20 -05:00
RUSTFLAGS = "-Zthreads=8";
2024-09-01 05:14:57 -05:00
};
}
);
}