zig-opengl/flake.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2024-10-05 21:47:37 -07:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
zig.url = "github:mitchellh/zig-overlay";
flake-utils = { url = "github:numtide/flake-utils"; };
};
outputs = { self, nixpkgs, zig, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem(system:
let
pkgs = import nixpkgs {
inherit system;
};
zig_exe = zig.packages.${system}.master;
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
zig_exe
libGL
glfw
# glib
# glib.dev
# gst_all_1.gstreamer
# gst_all_1.gstreamer.dev
# gst_all_1.gst-plugins-base
# gst_all_1.gst-plugins-good
] ++ lib.mapAttrsToList (attr: value: if (lib.hasPrefix "lib" attr && attr != "libAppleWM") then value else null) xorg; # include all of the xorg/x11 dev libraries
LIBGL_DEV_PATH = pkgs.libGL.dev;
GLFW_DEV_PATH = pkgs.glfw;
# GST_DEV_PATH = pkgs.gst_all_1.gstreamer.dev;
# GLIB_DEV_PATH = pkgs.glib.dev;
# GLIB_PATH = pkgs.glib.out;
};
}
);
}