1{ stdenv, fetchurl, pkgconfig, libdrm, libpciaccess, cairo, xorgproto, udev
2, libX11, libXext, libXv, libXrandr, glib, bison, libunwind, python3, kmod
3, procps, utilmacros, gtk-doc, openssl, peg, elfutils
4}:
5
6stdenv.mkDerivation rec {
7 pname = "intel-gpu-tools";
8 version = "1.25";
9
10 src = fetchurl {
11 url = "https://xorg.freedesktop.org/archive/individual/app/igt-gpu-tools-${version}.tar.xz";
12 sha256 = "04fx7xclhick3k7fyk9c4mn8mxzf1253j1r0hrvj9sl40j7lsia0";
13 };
14
15 nativeBuildInputs = [ pkgconfig utilmacros ];
16 buildInputs = [ libdrm libpciaccess cairo xorgproto udev libX11 kmod
17 libXext libXv libXrandr glib bison libunwind python3 procps
18 gtk-doc openssl peg elfutils ];
19
20 NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ];
21
22 preConfigure = ''
23 ./autogen.sh
24 '';
25
26 preBuild = ''
27 patchShebangs tests
28
29 patchShebangs debugger/system_routine/pre_cpp.py
30 substituteInPlace tools/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'
31 substituteInPlace tests/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'
32 '';
33
34 enableParallelBuilding = true;
35
36 meta = with stdenv.lib; {
37 homepage = "https://01.org/linuxgraphics/";
38 description = "Tools for development and testing of the Intel DRM driver";
39 license = licenses.mit;
40 platforms = [ "x86_64-linux" "i686-linux" ];
41 maintainers = with maintainers; [ pSub ];
42 };
43}