2023-03-24 00:07:29 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2023-01-20 10:41:00 +00:00
|
|
|
, freeglut, glew, libGL, libGLU, libX11, libXext, mesa
|
2023-03-24 00:07:29 +00:00
|
|
|
, meson, ninja, pkg-config, wayland, wayland-protocols
|
|
|
|
, vulkan-loader, libxkbcommon, libdecor, glslang }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mesa-demos";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "9.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-03-24 00:07:29 +00:00
|
|
|
url = "https://archive.mesa3d.org/demos/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-MEaj0mp7BRr3690lel8jv+sWDK1u2VIynN/x6fHtSWs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
freeglut glew libX11 libXext libGL libGLU mesa wayland
|
2023-03-24 00:07:29 +00:00
|
|
|
wayland-protocols vulkan-loader libxkbcommon libdecor glslang
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ lib.optional (mesa ? osmesa) mesa.osmesa ;
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Degl=${if stdenv.isDarwin then "disabled" else "auto"}"
|
|
|
|
"-Dlibdrm=${if mesa.libdrm == null then "disabled" else "enabled"}"
|
|
|
|
"-Dosmesa=${if mesa ? osmesa then "enabled" else "disabled"}"
|
|
|
|
"-Dwayland=${if wayland.withLibraries then "enabled" else "disabled"}"
|
|
|
|
"-Dwith-system-data-files=true"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
inherit (mesa.meta) homepage platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Collection of demos and test programs for OpenGL and Mesa";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ andersk ];
|
|
|
|
};
|
|
|
|
}
|