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

stdenv.mkDerivation rec {
  name = "xsettingsd-${version}";
  version = "git-2015-06-14";

  src = fetchFromGitHub {
    owner = "derat";
    repo = "xsettingsd";
    rev = "b4999f5e9e99224caf97d09f25ee731774ecd7be";
    sha256 = "18cp6a66ji483lrvf0vq855idwmcxd0s67ijpydgjlsr70c65j7s";
  };

  patches = [
    ./SConstruct.patch
  ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libX11 scons ];
  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;
    license = licenses.bsd2;
    platforms = platforms.linux;
  };
}