summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/xt/xtrace/package.nix
blob: 9ed1225b2a7d22aa3e655ea4aab6dbc8e4872eed (plain)
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
{
  lib,
  stdenv,
  autoreconfHook,
  fetchFromGitLab,
  libx11,
  xauth,
  makeWrapper,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "xtrace";
  version = "1.4.0";

  src = fetchFromGitLab {
    domain = "salsa.debian.org";
    owner = "debian";
    repo = "xtrace";
    rev = "xtrace-${finalAttrs.version}";
    sha256 = "1yff6x847nksciail9jly41mv70sl8sadh0m5d847ypbjmxcwjpq";
  };

  nativeBuildInputs = [
    autoreconfHook
    makeWrapper
  ];
  buildInputs = [ libx11 ];

  postInstall = ''
    wrapProgram "$out/bin/xtrace" \
        --prefix PATH ':' "${xauth}/bin"
  '';

  meta = {
    homepage = "https://salsa.debian.org/debian/xtrace";
    description = "Tool to trace X11 protocol connections";
    license = lib.licenses.gpl2Only;
    maintainers = [ ];
    platforms = with lib.platforms; linux;
    mainProgram = "xtrace";
  };
})