mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
71 lines
1.2 KiB
Nix
71 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, libglut
|
|
, libGL
|
|
, libGLU
|
|
, libX11
|
|
, libXext
|
|
, mesa
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, wayland
|
|
, wayland-scanner
|
|
, wayland-protocols
|
|
, vulkan-loader
|
|
, libxkbcommon
|
|
, libdecor
|
|
, glslang
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mesa-demos";
|
|
version = "9.0.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://archive.mesa3d.org/demos/${pname}-${version}.tar.xz";
|
|
sha256 = "sha256-MEaj0mp7BRr3690lel8jv+sWDK1u2VIynN/x6fHtSWs=";
|
|
};
|
|
|
|
depsBuildBuild = [
|
|
pkg-config
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
wayland-scanner
|
|
glslang
|
|
];
|
|
|
|
buildInputs = [
|
|
libglut
|
|
libX11
|
|
libXext
|
|
libGL
|
|
libGLU
|
|
mesa
|
|
wayland
|
|
wayland-protocols
|
|
vulkan-loader
|
|
libxkbcommon
|
|
libdecor
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Degl=${if stdenv.hostPlatform.isDarwin then "disabled" else "auto"}"
|
|
(lib.mesonEnable "libdrm" (stdenv.hostPlatform.isLinux))
|
|
(lib.mesonEnable "osmesa" false)
|
|
(lib.mesonEnable "wayland" (lib.meta.availableOn stdenv.hostPlatform wayland))
|
|
];
|
|
|
|
meta = with lib; {
|
|
inherit (mesa.meta) homepage platforms;
|
|
description = "Collection of demos and test programs for OpenGL and Mesa";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ andersk ];
|
|
};
|
|
}
|