voxelcore/flake.nix
VOXEL f506d5d8a2
Update flake.nix
Добавил новую зависимость 'freetype' в buildInputs
2026-02-21 02:29:32 +03:00

70 lines
1.4 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
description = "VoxelCore – voxel game engine in C++";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
voxel-core = pkgs.stdenv.mkDerivation {
name = "voxel-core";
src = ./.;
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
glm
glfw
glew
zlib
libpng
freetype
libvorbis
openal
luajit
curl
entt
mesa
freeglut
];
packages = with pkgs; [
glfw
mesa
freeglut
entt
];
cmakeFlags = [
"-DCMAKE_PREFIX_PATH=${pkgs.entt}"
"-DCMAKE_INCLUDE_PATH=${pkgs.entt}/include"
];
installPhase = ''
mkdir -p $out/bin
cp VoxelEngine $out/bin/
'';
};
in
{
packages.default = voxel-core;
apps.default = {
type = "app";
program = "${voxel-core}/bin/VoxelCore";
};
}
);
}