about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/X11/xsettingsd/default.nix
blob: 7572e19fbf913d1c3f5d3f2999f89e86d89dcc92 (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
{ lib, stdenv, fetchFromGitHub, scons, pkg-config, libX11 }:

stdenv.mkDerivation rec {
  pname = "xsettingsd";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "derat";
    repo = "xsettingsd";
    rev = "v${version}";
    sha256 = "05m4jlw0mgwp24cvyklncpziq1prr2lg0cq9c055sh4n9d93d07v";
  };

  patches = [
    ./SConstruct.patch
  ];

  nativeBuildInputs = [ scons pkg-config ];

  buildInputs = [ libX11 ];

  buildPhase = ''
    scons -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
  '';

  installPhase = ''
    install -D -t "$out"/bin xsettingsd dump_xsettings
    install -D -t "$out"/usr/share/man/man1 xsettingsd.1 dump_xsettings.1
  '';

  meta = with lib; {
    description = "Provides settings to X11 applications via the XSETTINGS specification";
    homepage = "https://github.com/derat/xsettingsd";
    license = licenses.bsd3;
    platforms = platforms.linux;
    maintainers = [ maintainers.romildo ];
  };
}