about summary refs log tree commit diff
path: root/pkgs/tools/graphics/adriconf/default.nix
blob: 8684c730b1a4e996e2d0524441bb128d413aa41b (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
{ stdenv
, lib
, fetchFromGitLab
, cmake
, pkg-config
, libdrm
, libGL
, atkmm
, pcre
, gtkmm4
, pugixml
, mesa
, pciutils
}:

stdenv.mkDerivation rec {
  pname = "adriconf";
  version = "2.7.2";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "mesa";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-0XTsYeS4tNAnGhuJ81fmjHhFS6fVq1lirui5b+ojxTQ=";
  };

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ libdrm libGL atkmm pcre gtkmm4 pugixml mesa pciutils ];

  cmakeFlags = [ "-DENABLE_UNIT_TESTS=off" ];

  postInstall = ''
    install -Dm444 ../flatpak/org.freedesktop.adriconf.metainfo.xml \
      -t $out/share/metainfo/
    install -Dm444 ../flatpak/org.freedesktop.adriconf.desktop \
      -t $out/share/applications/
    install -Dm444 ../flatpak/org.freedesktop.adriconf.png \
      -t $out/share/icons/hicolor/256x256/apps/
  '';

  meta = with lib; {
    homepage = "https://gitlab.freedesktop.org/mesa/adriconf/";
    description = "GUI tool used to configure open source graphics drivers";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ muscaln ];
    platforms = platforms.linux;
    mainProgram = "adriconf";
  };
}