summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorSebastian Neubauer <sebastian.neubauer@amd.com>2020-10-28 12:32:51 +0100
committerSebastian Neubauer <sebastian.neubauer@amd.com>2020-11-03 14:49:37 +0100
commit2907f280d3d966aeac091bb4bdb7a1b7a3767aa5 (patch)
tree87d3ccb2e62bf74760d274a39754ef57085b0d18 /pkgs/tools/graphics
parent156fe5442ef5e6fdf767dd64060c016c335e8f02 (diff)
piglit: init at unstable-2020-10-23
piglit is a test runner for mesa. To check that it is working, run `piglit run sanity results/sanity`
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/piglit/default.nix77
1 files changed, 77 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/piglit/default.nix b/pkgs/tools/graphics/piglit/default.nix
new file mode 100644
index 000000000000..e2c2b6e6e972
--- /dev/null
+++ b/pkgs/tools/graphics/piglit/default.nix
@@ -0,0 +1,77 @@
+{ stdenv
+, fetchFromGitLab
+, lib
+, cmake
+, freeglut
+, libGL
+, libGLU
+, libglvnd
+, makeWrapper
+, ninja
+, pkg-config
+, python3
+, waffle
+, wayland
+, libX11
+, libXrender
+, libxcb
+, libxkbcommon
+}:
+
+stdenv.mkDerivation rec {
+ pname = "piglit";
+ version = "unstable-2020-10-23";
+
+ src = fetchFromGitLab {
+ domain = "gitlab.freedesktop.org";
+ owner = "mesa";
+ repo = "piglit";
+ rev = "59e695c16fdcdd4ea4f16365f0e397a93cef7b80";
+ sha256 = "kx0+2Sdvdc3SbpAIl2OuGCWCpaLJC/7cXG+ZLvf92g8=";
+ };
+
+ buildInputs = [
+ freeglut
+ libGL
+ libGLU
+ libglvnd
+ libX11
+ libXrender
+ libxcb
+ libxkbcommon
+ (python3.withPackages (ps: with ps; [
+ Mako
+ numpy
+ ]))
+ waffle
+ wayland
+ ];
+
+ 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 : ${stdenv.lib.makeLibraryPath [ libGL libglvnd ]} \
+ --prefix PATH : "${waffle}/bin"
+ '';
+
+ meta = with lib; {
+ description = "An 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.
+ platforms = platforms.mesaPlatforms;
+ maintainers = with maintainers; [ Flakebi ];
+ };
+}