mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'yusdacra/update-cargonix' into 'master'
Update Nix deps, regenerate Cargo.nix and minor changes See merge request veloren/veloren!1590
This commit is contained in:
commit
f93c2874f9
7415
nix/Cargo.nix
7415
nix/Cargo.nix
File diff suppressed because it is too large
Load Diff
@ -4,18 +4,20 @@ let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
};
|
||||
|
||||
rustChannel = let
|
||||
channel = mozPkgs.rustChannelOf {
|
||||
rustToolchain = ../rust-toolchain;
|
||||
sha256 = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
||||
};
|
||||
flip = f: a: b: f b a;
|
||||
mapAttrs = builtins.mapAttrs;
|
||||
in flip mapAttrs channel (name: value:
|
||||
(if name == "rust" then
|
||||
value.override { extensions = [ "rust-src" ]; }
|
||||
else
|
||||
value));
|
||||
rustChannel =
|
||||
let
|
||||
channel = mozPkgs.rustChannelOf {
|
||||
rustToolchain = ../rust-toolchain;
|
||||
sha256 = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
||||
};
|
||||
flip = f: a: b: f b a;
|
||||
mapAttrs = builtins.mapAttrs;
|
||||
in
|
||||
flip mapAttrs channel (name: value:
|
||||
(if name == "rust" then
|
||||
value.override { extensions = [ "rust-src" ]; }
|
||||
else
|
||||
value));
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
@ -23,13 +25,14 @@ let
|
||||
(final: prev: {
|
||||
rustc = rustChannel.rust;
|
||||
inherit (rustChannel)
|
||||
;
|
||||
;
|
||||
crate2nix = prev.callPackage sources.crate2nix { pkgs = prev; };
|
||||
nixGL = prev.callPackage sources.nixGL { pkgs = prev; };
|
||||
})
|
||||
];
|
||||
};
|
||||
in with pkgs;
|
||||
in
|
||||
with pkgs;
|
||||
let
|
||||
# deps that crates need (for compiling)
|
||||
crateDeps = {
|
||||
@ -52,8 +55,10 @@ let
|
||||
};
|
||||
|
||||
# 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;
|
||||
in { inherit pkgs voxygenNeededLibs crateDeps gitLfsCheckFile; }
|
||||
in
|
||||
{ inherit pkgs voxygenNeededLibs crateDeps gitLfsCheckFile; }
|
||||
|
@ -5,7 +5,6 @@
|
||||
, cratesToBuild ? [ "veloren-voxygen" "veloren-server-cli" ]
|
||||
, system ? builtins.currentSystem
|
||||
, nixpkgs ? sources.nixpkgs
|
||||
, nvidia ? false
|
||||
, sources ? import ./sources.nix { inherit system; }
|
||||
}:
|
||||
let
|
||||
@ -22,7 +21,8 @@ let
|
||||
upstream = "https://gitlab.com/veloren/veloren";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.yusdacra ];
|
||||
platforms = platforms.all;
|
||||
# TODO: Make this work on BSD and Mac OS
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
isGitLfsSetup =
|
||||
|
@ -1,2 +1,5 @@
|
||||
source_env nix/envrc-common
|
||||
watch_file nix/shell.nix
|
||||
watch_file nix/common.nix
|
||||
watch_file nix/sources.nix
|
||||
watch_file nix/sources.json
|
||||
use nix nix/shell.nix
|
||||
|
@ -1,4 +0,0 @@
|
||||
watch_file nix/shell.nix
|
||||
watch_file nix/common.nix
|
||||
watch_file nix/sources.nix
|
||||
watch_file nix/sources.json
|
@ -1,2 +1,5 @@
|
||||
source_env nix/envrc-common
|
||||
watch_file nix/shell.nix
|
||||
watch_file nix/common.nix
|
||||
watch_file nix/sources.nix
|
||||
watch_file nix/sources.json
|
||||
use nix nix/shell.nix --arg nvidia true
|
||||
|
@ -42,7 +42,7 @@ mkShell {
|
||||
substituters = https://cache.nixos.org https://veloren-nix.cachix.org
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= veloren-nix.cachix.org-1:zokfKJqVsNV6kI/oJdLF6TYBdNPYGSb+diMVQPn/5Rc=
|
||||
"
|
||||
# We need this so that Voxygen runs
|
||||
# Add libraries Voxygen needs so that it runs
|
||||
export LD_LIBRARY_PATH=${lib.makeLibraryPath voxygenNeededLibs}
|
||||
|
||||
# No need to install git-lfs and run fetch / checkout commands if we have it setup
|
||||
|
@ -29,10 +29,10 @@
|
||||
"homepage": "",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b6bca3d80619f1565ba0ea635b0d38234e41c6bd",
|
||||
"sha256": "09d4f6h98rmxnxzm1x07jxgrc81k6mz7fjigq375fkmb41j2kdsi",
|
||||
"rev": "c00959877fb06b09468562518b408acda886c79e",
|
||||
"sha256": "02anj9mbzy45bszlmv7k42mb5y7yj2lxc5vpbxgd3f5qljn5ih7y",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/b6bca3d80619f1565ba0ea635b0d38234e41c6bd.tar.gz",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/c00959877fb06b09468562518b408acda886c79e.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixpkgsMoz": {
|
||||
|
Loading…
Reference in New Issue
Block a user