Files
nixpkgs/pkgs/by-name/pi/piglit/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

102 lines
1.9 KiB
Nix

{
stdenv,
fetchFromGitLab,
lib,
cmake,
glslang,
libffi,
libgbm,
libglut,
libGL,
libGLU,
libglvnd,
makeWrapper,
ninja,
pkg-config,
python3,
vulkan-loader,
waffle,
wayland,
wayland-protocols,
wayland-scanner,
libXau,
libX11,
libXrender,
libxcb,
libxkbcommon,
mesa,
}:
stdenv.mkDerivation {
pname = "piglit";
version = "unstable-2025-04-15";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "piglit";
rev = "d06f7bac988e67db53cbc05dc0b096b00856ab93";
hash = "sha256-bH9NjLEldlZwylq7S0q2vC5IQhUej0xZ6wD+mrWBK5A=";
};
buildInputs = [
glslang
libffi
libgbm
libglut
libGL
libGLU
libglvnd
libXau
libX11
libXrender
libxcb
libxkbcommon
(python3.withPackages (
ps: with ps; [
mako
numpy
]
))
vulkan-loader
waffle
wayland
wayland-protocols
wayland-scanner
];
nativeBuildInputs = [
cmake
makeWrapper
ninja
pkg-config
];
# Find data dir: piglit searches for the data directory in some places, however as it is wrapped,
# it search in ../lib/.piglit-wrapped, we just replace the script name with "piglit" again.
prePatch = ''
substituteInPlace piglit \
--replace 'script_basename_noext = os.path.splitext(os.path.basename(__file__))[0]' 'script_basename_noext = "piglit"'
'';
postInstall = ''
wrapProgram $out/bin/piglit \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libGL
libglvnd
]
} \
--prefix PATH : "${waffle}/bin"
'';
meta = with lib; {
description = "OpenGL test suite, and test-suite runner";
homepage = "https://gitlab.freedesktop.org/mesa/piglit";
license = licenses.free; # custom license. See COPYING in the source repo.
inherit (mesa.meta) platforms;
maintainers = with maintainers; [ Flakebi ];
mainProgram = "piglit";
};
}