add dependencies for linux hosts

This commit is contained in:
2026-04-24 18:19:03 +02:00
parent 0155516457
commit 47740ea4d5

View File

@@ -7,8 +7,15 @@
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
@@ -29,44 +36,51 @@
];
};
linuxLibs = lib.optionals pkgs.stdenv.isLinux (with pkgs; [
alsa-lib
libudev-zero
vulkan-loader
wayland
libxkbcommon
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
]);
in {
linuxLibs = lib.optionals pkgs.stdenv.isLinux (
with pkgs;
[
alsa-lib
libudev-zero
vulkan-loader
wayland
libxkbcommon
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
]
);
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
rustToolchain
pkg-config
clang
cmake
git
just
bacon
cargo-edit
cargo-watch
cargo-nextest
nil
nixd
taplo
imagemagick
pngquant
ffmpeg
jq
fd
ripgrep
tree
python3
nodejs_22
libiconv
] ++ linuxLibs;
packages =
with pkgs;
[
rustToolchain
pkg-config
clang
cmake
git
just
bacon
cargo-edit
cargo-watch
cargo-nextest
nil
nixd
taplo
imagemagick
pngquant
ffmpeg
jq
fd
ripgrep
tree
python3
nodejs_22
libiconv
]
++ linuxLibs;
shellHook = ''
export RUST_SRC_PATH="${rustToolchain}/lib/rustlib/src/rust/library"