2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, freeglut
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, mesa
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, wayland-scanner
|
|
|
|
, 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
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
wayland-scanner
|
|
|
|
glslang
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
freeglut
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
mesa
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
vulkan-loader
|
|
|
|
libxkbcommon
|
|
|
|
libdecor
|
|
|
|
] ++ lib.optional (mesa ? osmesa) mesa.osmesa;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|