about summary refs log tree commit diff
path: root/pkgs/tools/X11/xsettingsd/default.nix
blob: 254cc8a4961f12a6eb436eb2ac35c7fd9f1c1206 (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
{ stdenv, fetchFromGitHub, scons, libX11, pkgconfig }:

stdenv.mkDerivation rec {
  name = "xsettingsd-${version}";
  version = "0.0.1";

  src = fetchFromGitHub {
    owner = "derat";
    repo = "xsettingsd";
    rev = "2a516a91d8352b3b93a7a1ef5606dbd21fa06b7c";
    sha256 = "0f9lc5w18x6xs9kf72jpixprp3xb7wqag23cy8zrm33n2bza9dj0";
  };

  patches = [
    ./SConstruct.patch
  ];

  buildInputs = [ libX11 scons pkgconfig ];
  buildPhase = ''
    mkdir -p "$out"
    scons \
      -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
      "prefix=$out"
  '';
  
  installPhase = ''
    mkdir -p "$out"/bin
    install xsettingsd "$out"/bin
    install dump_xsettings "$out"/bin
  '';

  meta = with stdenv.lib; {
    description = "Provides settings to X11 applications via the XSETTINGS specification";
    homepage = https://github.com/derat/xsettingsd;
    platforms = platforms.linux;
  };
}