mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
nix: update niv deps, regenerate Cargo.nix, add some comments and remove an unused variable
This commit is contained in:
parent
1a8caaf4de
commit
39843e847d
6217
nix/Cargo.nix
6217
nix/Cargo.nix
File diff suppressed because it is too large
Load Diff
@ -4,14 +4,16 @@ let
|
|||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
};
|
};
|
||||||
|
|
||||||
rustChannel = let
|
rustChannel =
|
||||||
|
let
|
||||||
channel = mozPkgs.rustChannelOf {
|
channel = mozPkgs.rustChannelOf {
|
||||||
rustToolchain = ../rust-toolchain;
|
rustToolchain = ../rust-toolchain;
|
||||||
sha256 = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
sha256 = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
||||||
};
|
};
|
||||||
flip = f: a: b: f b a;
|
flip = f: a: b: f b a;
|
||||||
mapAttrs = builtins.mapAttrs;
|
mapAttrs = builtins.mapAttrs;
|
||||||
in flip mapAttrs channel (name: value:
|
in
|
||||||
|
flip mapAttrs channel (name: value:
|
||||||
(if name == "rust" then
|
(if name == "rust" then
|
||||||
value.override { extensions = [ "rust-src" ]; }
|
value.override { extensions = [ "rust-src" ]; }
|
||||||
else
|
else
|
||||||
@ -29,7 +31,8 @@ let
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in with pkgs;
|
in
|
||||||
|
with pkgs;
|
||||||
let
|
let
|
||||||
# deps that crates need (for compiling)
|
# deps that crates need (for compiling)
|
||||||
crateDeps = {
|
crateDeps = {
|
||||||
@ -52,8 +55,10 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
# deps that voxygen needs to function
|
# 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 ])
|
voxygenNeededLibs = (with xorg; [ libX11 libXcursor libXrandr libXi ])
|
||||||
++ [ libGL ];
|
++ [ libGL ];
|
||||||
|
|
||||||
gitLfsCheckFile = ../assets/voxygen/background/bg_main.png;
|
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" ]
|
, cratesToBuild ? [ "veloren-voxygen" "veloren-server-cli" ]
|
||||||
, system ? builtins.currentSystem
|
, system ? builtins.currentSystem
|
||||||
, nixpkgs ? sources.nixpkgs
|
, nixpkgs ? sources.nixpkgs
|
||||||
, nvidia ? false
|
|
||||||
, sources ? import ./sources.nix { inherit system; }
|
, sources ? import ./sources.nix { inherit system; }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@ -22,7 +21,8 @@ let
|
|||||||
upstream = "https://gitlab.com/veloren/veloren";
|
upstream = "https://gitlab.com/veloren/veloren";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ maintainers.yusdacra ];
|
maintainers = [ maintainers.yusdacra ];
|
||||||
platforms = platforms.all;
|
# TODO: Make this work on BSD and Mac OS
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
isGitLfsSetup =
|
isGitLfsSetup =
|
||||||
|
@ -42,7 +42,7 @@ mkShell {
|
|||||||
substituters = https://cache.nixos.org https://veloren-nix.cachix.org
|
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=
|
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}
|
export LD_LIBRARY_PATH=${lib.makeLibraryPath voxygenNeededLibs}
|
||||||
|
|
||||||
# No need to install git-lfs and run fetch / checkout commands if we have it setup
|
# No need to install git-lfs and run fetch / checkout commands if we have it setup
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
"homepage": "",
|
"homepage": "",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b6bca3d80619f1565ba0ea635b0d38234e41c6bd",
|
"rev": "c00959877fb06b09468562518b408acda886c79e",
|
||||||
"sha256": "09d4f6h98rmxnxzm1x07jxgrc81k6mz7fjigq375fkmb41j2kdsi",
|
"sha256": "02anj9mbzy45bszlmv7k42mb5y7yj2lxc5vpbxgd3f5qljn5ih7y",
|
||||||
"type": "tarball",
|
"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"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"nixpkgsMoz": {
|
"nixpkgsMoz": {
|
||||||
|
Loading…
Reference in New Issue
Block a user