Some checks failed
Build Zenyx ⚡ / 🧪 Run Cargo Tests (push) Successful in 3m58s
Build Zenyx ⚡ / 🏗️ Build aarch64-apple-darwin (push) Failing after 8m5s
Build Zenyx ⚡ / 🏗️ Build x86_64-apple-darwin (push) Failing after 8m8s
Build Zenyx ⚡ / 🏗️ Build aarch64-unknown-linux-gnu (push) Successful in 8m20s
Build Zenyx ⚡ / 🏗️ Build aarch64-pc-windows-msvc (push) Successful in 8m39s
Build Zenyx ⚡ / 🏗️ Build x86_64-unknown-linux-gnu (push) Successful in 6m4s
Build Zenyx ⚡ / 🏗️ Build x86_64-pc-windows-msvc (push) Successful in 6m18s
94 lines
2.6 KiB
Nix
94 lines
2.6 KiB
Nix
{
|
|
description = "Zenyx - A WSYWIG game engine written in rust ";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
|
alejandra.url = "github:kamadorueda/alejandra/3.1.0";
|
|
alejandra.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
utils,
|
|
rust-overlay,
|
|
alejandra,
|
|
...
|
|
}:
|
|
{
|
|
overlays.default = final: prev: {
|
|
zenyx = final.callPackage ./default.nix {};
|
|
};
|
|
}
|
|
// utils.lib.eachDefaultSystem (
|
|
system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
self.overlays.default
|
|
(import rust-overlay)
|
|
];
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
vulkan-tools
|
|
vulkan-tools-lunarg
|
|
shaderc
|
|
cargo-xbuild
|
|
cargo-pgo
|
|
cargo-cross
|
|
cargo-xwin
|
|
cargo-wizard
|
|
cargo-zigbuild
|
|
wine64
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
vulkan-loader
|
|
libGL
|
|
wayland
|
|
libxkbcommon
|
|
xorg.libXcursor
|
|
xorg.libXrandr
|
|
xorg.libXi
|
|
xorg.libX11
|
|
xorg.libxcb
|
|
];
|
|
in {
|
|
packages = {
|
|
inherit (pkgs) zenyx;
|
|
default = pkgs.zenyx;
|
|
windows = let
|
|
pkgsCross = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
crossSystem = nixpkgs.lib.systems.examples.mingwW64;
|
|
};
|
|
in pkgsCross.callPackage ./default.nix {};
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
name = "zenyx";
|
|
nativeBuildInputs = with pkgs; [
|
|
(rust-bin.stable.latest.default.override {
|
|
extensions = ["rust-src" "cargo" "rustfmt" "clippy"];
|
|
targets = [
|
|
"x86_64-pc-windows-msvc"
|
|
"x86_64-unknown-linux-gnu"
|
|
"x86_64-apple-darwin"
|
|
"aarch64-pc-windows-msvc"
|
|
"aarch64-unknown-linux-gnu"
|
|
"aarch64-apple-darwin"
|
|
];
|
|
})
|
|
pkg-config
|
|
] ++ nativeBuildInputs;
|
|
buildInputs = buildInputs;
|
|
LD_LIBRARY_PATH= pkgs.lib.makeLibraryPath buildInputs;
|
|
};
|
|
formatter = alejandra.packages.${system}.default;
|
|
}
|
|
);
|
|
}
|