2020-12-11 12:00:04 +00:00
|
|
|
{ nixpkgs, sources, system }:
|
2020-11-28 14:45:58 +00:00
|
|
|
let
|
2020-12-11 12:00:04 +00:00
|
|
|
rustChannel = import ./rustPkgs.nix {
|
2020-11-28 14:45:58 +00:00
|
|
|
pkgs = import nixpkgs { inherit system; };
|
2020-12-11 12:00:04 +00:00
|
|
|
inherit (sources) nixpkgsMoz;
|
2020-11-28 14:45:58 +00:00
|
|
|
};
|
2020-12-02 11:48:14 +00:00
|
|
|
|
2020-11-28 14:45:58 +00:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
2020-11-30 00:48:00 +00:00
|
|
|
(final: prev: {
|
2020-11-28 14:45:58 +00:00
|
|
|
rustc = rustChannel.rust;
|
2020-11-30 00:48:00 +00:00
|
|
|
crate2nix = prev.callPackage sources.crate2nix { pkgs = prev; };
|
|
|
|
nixGL = prev.callPackage sources.nixGL { pkgs = prev; };
|
2020-11-28 14:45:58 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2020-12-11 12:00:04 +00:00
|
|
|
|
2020-12-02 20:29:55 +00:00
|
|
|
in
|
|
|
|
with pkgs;
|
2020-11-24 01:08:57 +00:00
|
|
|
let
|
2020-11-30 00:48:00 +00:00
|
|
|
# deps that crates need (for compiling)
|
2020-11-24 01:08:57 +00:00
|
|
|
crateDeps = {
|
2020-11-30 00:48:00 +00:00
|
|
|
libudev-sys = {
|
|
|
|
buildInputs = [ libudev ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
};
|
|
|
|
alsa-sys = {
|
|
|
|
buildInputs = [ alsaLib ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
};
|
|
|
|
veloren-network = {
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
};
|
|
|
|
veloren-voxygen = {
|
|
|
|
buildInputs = [ xorg.libxcb ];
|
|
|
|
nativeBuildInputs = [ ];
|
|
|
|
};
|
2020-11-24 01:08:57 +00:00
|
|
|
};
|
2020-11-30 00:48:00 +00:00
|
|
|
|
|
|
|
# deps that voxygen needs to function
|
2020-12-02 20:29:55 +00:00
|
|
|
# FIXME: Wayland doesn't work (adding libxkbcommon, wayland and wayland-protocols results in a panic)
|
2020-11-30 00:48:00 +00:00
|
|
|
voxygenNeededLibs = (with xorg; [ libX11 libXcursor libXrandr libXi ])
|
|
|
|
++ [ libGL ];
|
|
|
|
|
|
|
|
gitLfsCheckFile = ../assets/voxygen/background/bg_main.png;
|
2020-12-02 20:29:55 +00:00
|
|
|
in
|
2020-12-11 12:00:04 +00:00
|
|
|
{
|
|
|
|
inherit
|
|
|
|
crateDeps
|
|
|
|
gitLfsCheckFile
|
|
|
|
pkgs
|
|
|
|
voxygenNeededLibs
|
|
|
|
;
|
|
|
|
}
|