mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'stupremee/rust-src-in-nix-shell' into 'master'
Nix: Add rust-src component to rust toolchain See merge request veloren/veloren!1588
This commit is contained in:
commit
f8d48ad4a0
@ -3,10 +3,19 @@ let
|
|||||||
mozPkgs = import "${sources.nixpkgsMoz}/package-set.nix" {
|
mozPkgs = import "${sources.nixpkgsMoz}/package-set.nix" {
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
};
|
};
|
||||||
rustChannel = mozPkgs.rustChannelOf {
|
|
||||||
rustToolchain = ../rust-toolchain;
|
rustChannel = let
|
||||||
sha256 = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
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 {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
@ -14,14 +23,13 @@ let
|
|||||||
(final: prev: {
|
(final: prev: {
|
||||||
rustc = rustChannel.rust;
|
rustc = rustChannel.rust;
|
||||||
inherit (rustChannel)
|
inherit (rustChannel)
|
||||||
;
|
;
|
||||||
crate2nix = prev.callPackage sources.crate2nix { pkgs = prev; };
|
crate2nix = prev.callPackage sources.crate2nix { pkgs = prev; };
|
||||||
nixGL = prev.callPackage sources.nixGL { pkgs = prev; };
|
nixGL = prev.callPackage sources.nixGL { pkgs = prev; };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in with pkgs;
|
||||||
with pkgs;
|
|
||||||
let
|
let
|
||||||
# deps that crates need (for compiling)
|
# deps that crates need (for compiling)
|
||||||
crateDeps = {
|
crateDeps = {
|
||||||
@ -48,5 +56,4 @@ let
|
|||||||
++ [ libGL ];
|
++ [ libGL ];
|
||||||
|
|
||||||
gitLfsCheckFile = ../assets/voxygen/background/bg_main.png;
|
gitLfsCheckFile = ../assets/voxygen/background/bg_main.png;
|
||||||
in
|
in { inherit pkgs voxygenNeededLibs crateDeps gitLfsCheckFile; }
|
||||||
{ inherit pkgs voxygenNeededLibs crateDeps gitLfsCheckFile; }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user