veloren/nix/common.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{ nixpkgs, sources, system }:
let
rustChannel = import ./rustPkgs.nix {
pkgs = import nixpkgs { inherit system; };
inherit (sources) nixpkgsMoz;
};
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
rustc = rustChannel.rust;
crate2nix = prev.callPackage sources.crate2nix { pkgs = prev; };
})
];
};
in
with pkgs;
{
inherit pkgs;
# deps that crates need (for compiling)
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 ] [ ];
2020-12-12 14:26:02 +00:00
xcb = makeDeps [ ] [ python3 ];
};
# deps that voxygen needs to function
# FIXME: Wayland doesn't work (adding libxkbcommon, wayland and wayland-protocols results in a panic)
voxygenNeededLibs = (with xorg; [ libX11 libXcursor libXrandr libXi ])
++ [ libGL ];
gitLfsCheckFile = ../assets/voxygen/background/bg_main.png;
}