build raylib and raygui manually

This commit is contained in:
Fabien Freling 2023-10-15 23:05:24 +02:00 committed by Fabien Freling
parent ba3836fbfb
commit 3e52a42d88
15 changed files with 93 additions and 6384 deletions

View file

@ -4,27 +4,24 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
zig-overlay.url = "github:mitchellh/zig-overlay";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = {
# Put your original flake attributes here.
};
flake = { };
systems = [ "x86_64-linux" ];
# https://flake.parts/module-arguments.html#persystem-module-parameters
perSystem = { pkgs, system, ... }: {
# We need unstable for Zig
_module.args.pkgs = import inputs.nixpkgs-unstable {
inherit system;
# https://flake.parts/overlays
overlays = [
inputs.zig-overlay.overlays.default
];
# NOTE: zig overlay triggers issues with X11/GL libraries
# This might be misconfiguration on my end
overlays = [ ];
config = { };
};
@ -32,24 +29,41 @@
devShells.default = with pkgs;
mkShell {
# EM_CONFIG = pkgs.writeText ".emscripten" ''
# EMSCRIPTEN_ROOT = '${pkgs.emscripten}/share/emscripten'
# LLVM_ROOT = '${pkgs.emscripten.llvmEnv}/bin'
# BINARYEN_ROOT = '${pkgs.binaryen}'
# NODE_JS = '${pkgs.nodejs-18_x}/bin/node'
# CACHE = '${toString ./.cache}'
# '';
nativeBuildInputs = [ clang cmake just ninja tup ];
buildInputs = [
sqlite
# Zig / webAssembly impl.
zig
# zigpkgs."master" # Issue with X11/GL libraries
zls
emscripten
# Linux graphical deps
## X11
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXext
xorg.libXrandr
xorg.libXinerama
xorg.libxcb
libGL
# xorg.libXcursor
# xorg.libXi
# xorg.libXext
# xorg.libXrandr
# xorg.libXinerama
# libGLU
libGLU
pkg-config
## Wayland
wayland-protocols
wayland
libxkbcommon
];
};