about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/neocomp/default.nix
blob: e878f4f088e86c5f316a76e0d8d945aac31805ba (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
{ lib, stdenv
, fetchFromGitHub
, asciidoc
, docbook_xml_dtd_45
, docbook_xsl
, freetype
, judy
, libGL
, libconfig
, libdrm
, libxml2
, libxslt
, libXcomposite
, libXdamage
, libXext
, libXinerama
, libXrandr
, libXrender
, libXres
, pcre
, pkg-config
}:

stdenv.mkDerivation rec {
  pname = "neocomp";
  version = "unstable-2021-04-06";

  src = fetchFromGitHub {
    owner = "DelusionalLogic";
    repo = "NeoComp";
    rev = "ccd340d7b2dcd3f828aff958a638cc23686aee6f";
    sha256 = "sha256-tLLEwpAGNVTC+N41bM7pfskIli4Yvc95wH2/NT0OZ+8=";
  };

  nativeBuildInputs = [
    asciidoc
    docbook_xml_dtd_45
    docbook_xsl
    pkg-config
  ];

  buildInputs = [
    freetype
    judy
    libGL
    libconfig
    libdrm
    libxml2
    libxslt
    libXcomposite
    libXdamage
    libXext
    libXinerama
    libXrandr
    libXrender
    libXres
    pcre
  ];

  makeFlags = [
    "PREFIX=${placeholder "out"}"
    "CFGDIR=${placeholder "out"}/etc/xdg/neocomp"
    "ASTDIR=${placeholder "out"}/share/neocomp/assets"
    "COMPTON_VERSION=${version}"
  ];

  postPatch = ''
    substituteInPlace src/compton.c --replace \
      "assets_add_path(\"./assets/\");" \
      "assets_add_path(\"$out/share/neocomp/assets/\");"
    substituteInPlace src/assets/assets.c --replace \
      "#define MAX_PATH_LENGTH 64" \
      "#define MAX_PATH_LENGTH 128"
  '';

  meta = with lib; {
    homepage        = "https://github.com/DelusionalLogic/NeoComp";
    license         = licenses.gpl3Only;
    maintainers     = with maintainers; [ twey fortuneteller2k ];
    platforms       = platforms.linux;
    description     = "A fork of Compton, a compositor for X11";
    longDescription = ''
      NeoComp is a (hopefully) fast and (hopefully) simple compositor
      for X11, focused on delivering frames from the window to the
      framebuffer as quickly as possible.
    '';
  };
}