Specified Rust version in Cargo.toml nix shell and builder
parent
4ea9cdf612
commit
3eae9f5896
|
@ -6,6 +6,7 @@ description = "A W.I.P. bevy-engine game "
|
|||
authors = ["Johannes Hendrik Gerard van der Weide"]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.70"
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
||||
|
|
|
@ -41,5 +41,9 @@
|
|||
devShells = forAllSystems ({ pkgs }: {
|
||||
default = import ./nix/shell.nix { inherit pkgs; };
|
||||
});
|
||||
# Builder
|
||||
packages = forAllSystems ({ pkgs }: {
|
||||
default = import ./nix/default.nix { inherit pkgs; };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "hertog-game";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ../.;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rust-bin.stable."1.70.0".default
|
||||
makeWrapper
|
||||
pkg-config
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
vulkan-loader
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
libxkbcommon
|
||||
udev
|
||||
vulkan-loader
|
||||
wayland
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk_11_0.frameworks.Cocoa
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/bin/assets
|
||||
mkdir $out/bin/data
|
||||
cp -r assets $out/bin/
|
||||
cp -r data $out/bin/
|
||||
'';
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
pkgs.mkShell {
|
||||
# The Nix packages provided in the environment
|
||||
packages = (with pkgs; [
|
||||
rust-bin.stable."1.70.0".default
|
||||
# Fluff
|
||||
cargo-mommy
|
||||
onefetch
|
||||
|
|
Loading…
Reference in New Issue