nix: refactor crateDeps in common to look better

This commit is contained in:
Yusuf Bera Ertan 2020-12-11 18:00:16 +03:00
parent 4c61914b91
commit 9f8ec7e010
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -20,24 +20,16 @@ in
with pkgs;
let
# deps that crates need (for compiling)
crateDeps = {
libudev-sys = {
buildInputs = [ libudev ];
nativeBuildInputs = [ pkg-config ];
crateDeps =
let
makeDeps = b: n: { buildInputs = b; nativeBuildInputs = n; };
in
{
libudev-sys = makeDeps [ libudev ] [ pkg-config ];
alsa-sys = makeDeps [ alsaLib ] [ pkg-config ];
veloren-network = makeDeps [ openssl ] [ pkg-config ];
veloren-voxygen = makeDeps [ xorg.libxcb ] [ ];
};
alsa-sys = {
buildInputs = [ alsaLib ];
nativeBuildInputs = [ pkg-config ];
};
veloren-network = {
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
};
veloren-voxygen = {
buildInputs = [ xorg.libxcb ];
nativeBuildInputs = [ ];
};
};
# deps that voxygen needs to function
# FIXME: Wayland doesn't work (adding libxkbcommon, wayland and wayland-protocols results in a panic)