mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
nix: fix build failing when on tag, combine nixpkgs.nix and common.nix
This commit is contained in:
parent
bce6e1c6e9
commit
3c7f0e4375
@ -1,5 +1,24 @@
|
||||
{ pkgs }:
|
||||
with pkgs;
|
||||
{ system, sources ? import ./sources.nix { inherit system; }
|
||||
, nixpkgs ? sources.nixpkgs }:
|
||||
let
|
||||
mozPkgs = import "${sources.nixpkgsMoz}/package-set.nix" {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
};
|
||||
rustChannel = mozPkgs.rustChannelOf {
|
||||
rustToolchain = ../rust-toolchain;
|
||||
hash = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
||||
};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(self: super: {
|
||||
rustc = rustChannel.rust;
|
||||
inherit (rustChannel)
|
||||
;
|
||||
})
|
||||
];
|
||||
};
|
||||
in with pkgs;
|
||||
let
|
||||
xorgLibraries = with xorg; [ libX11 libXcursor libXrandr libXi ];
|
||||
otherLibraries = [
|
||||
@ -19,4 +38,4 @@ let
|
||||
veloren-network = [ pkg-config openssl ];
|
||||
veloren-voxygen = [ atk cairo glib gtk3 pango ];
|
||||
};
|
||||
in { inherit neededLibPaths crateDeps; }
|
||||
in { inherit pkgs neededLibPaths crateDeps; }
|
||||
|
@ -12,8 +12,8 @@ let
|
||||
isBuildingVoxygen = isBuildingCrate "veloren-voxygen";
|
||||
isBuildingServerCli = isBuildingCrate "veloren-server-cli";
|
||||
|
||||
pkgs = import ./nixpkgs.nix { inherit sources system; };
|
||||
common = import ./common.nix { inherit pkgs; };
|
||||
common = import ./common.nix { inherit sources system; };
|
||||
inherit (common) pkgs;
|
||||
|
||||
meta = with pkgs; {
|
||||
description = "Veloren is a multiplayer voxel RPG written in Rust.";
|
||||
@ -42,7 +42,7 @@ let
|
||||
name = "git";
|
||||
}
|
||||
}
|
||||
${pkgs.git}/bin/git ${subcommands} > $out
|
||||
(${pkgs.git}/bin/git ${subcommands}) > $out
|
||||
'')
|
||||
else
|
||||
abort ''
|
||||
|
@ -1,21 +0,0 @@
|
||||
{ system, sources ? import ./sources.nix { inherit system; }
|
||||
, nixpkgs ? sources.nixpkgs }:
|
||||
|
||||
let
|
||||
mozPkgs = import "${sources.nixpkgsMoz}/package-set.nix" {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
};
|
||||
rustChannel = mozPkgs.rustChannelOf {
|
||||
rustToolchain = ../rust-toolchain;
|
||||
hash = "sha256-P4FTKRe0nM1FRDV0Q+QY2WcC8M9IR7aPMMLWDfv+rEk=";
|
||||
};
|
||||
in import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(self: super: {
|
||||
rustc = rustChannel.rust;
|
||||
inherit (rustChannel)
|
||||
;
|
||||
})
|
||||
];
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
{ nixpkgs ? <nixpkgs>, sources ? import ./sources.nix { }
|
||||
, system ? builtins.currentSystem }:
|
||||
let
|
||||
pkgs = import ./nixpkgs.nix { inherit sources nixpkgs system; };
|
||||
common = import ./common.nix { inherit pkgs; };
|
||||
common = import ./common.nix { inherit nixpkgs sources system; };
|
||||
inherit (common) pkgs;
|
||||
crate2nix = pkgs.callPackage sources.crate2nix { inherit pkgs; };
|
||||
in with pkgs;
|
||||
mkShell {
|
||||
name = "veloren-shell";
|
||||
nativeBuildInputs = [ git git-lfs niv nixfmt crate2nix cargo rustc ];
|
||||
nativeBuildInputs =
|
||||
[ git git-lfs niv nixfmt crate2nix cargo rustc rustfmt clippy ];
|
||||
buildInputs = lib.concatLists (lib.attrValues common.crateDeps);
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH=${common.neededLibPaths}
|
||||
|
Loading…
Reference in New Issue
Block a user