summary refs log tree commit diff
path: root/pkgs/development/tools/misc/intel-gpu-tools/default.nix
blob: 40cf1e14e94d59db4f1068788260438159116c15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{ lib
, stdenv
, fetchurl
, fetchpatch
, pkg-config
, libdrm
, libpciaccess
, cairo
, xorgproto
, udev
, libX11
, libXext
, libXv
, libXrandr
, glib
, bison
, libunwind
, python3
, kmod
, procps
, utilmacros
, gtk-doc
, docbook_xsl
, openssl
, peg
, elfutils
, meson
, ninja
, valgrind
, xmlrpc_c
, gsl
, alsa-lib
, curl
, json_c
, liboping
, flex
, docutils
}:

stdenv.mkDerivation rec {
  pname = "intel-gpu-tools";
  version = "1.26";

  src = fetchurl {
    url = "https://xorg.freedesktop.org/archive/individual/app/igt-gpu-tools-${version}.tar.xz";
    sha256 = "1dwvxh1yplsh1a7h3gpp40g91v12cfxy6yy99s1v9yr2kwxikm1n";
  };

  patches = [
    # fix build with meson 0.60
    (fetchpatch {
      url = "https://github.com/freedesktop/xorg-intel-gpu-tools/commit/963917a3565466832a3b2fc22e9285d34a0bf944.patch";
      sha256 = "sha256-goO2N7aK2dJYMhFGS1DlvjEYMSijN6stV6Q5z/RP8Ko=";
    })
  ];

  nativeBuildInputs = [ pkg-config utilmacros meson ninja flex bison gtk-doc docutils docbook_xsl ];
  buildInputs = [
    libdrm
    libpciaccess
    cairo
    xorgproto
    udev
    libX11
    kmod
    libXext
    libXv
    libXrandr
    glib
    libunwind
    python3
    procps
    openssl
    peg
    elfutils
    valgrind
    xmlrpc_c
    gsl
    alsa-lib
    curl
    json_c
    liboping
  ];

  NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ];

  preConfigure = ''
    patchShebangs tests man
  '';

  hardeningDisable = [ "bindnow" ];

  meta = with lib; {
    homepage = "https://01.org/linuxgraphics/";
    description = "Tools for development and testing of the Intel DRM driver";
    license = licenses.mit;
    platforms = [ "x86_64-linux" "i686-linux" ];
    maintainers = with maintainers; [ pSub ];
  };
}