about summary refs log tree commit diff
path: root/pkgs/tools/X11/sx/default.nix
blob: c03d4443fcf0ea4cdf4507245b0a0ce9f0f94912 (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
{ coreutils, fetchFromGitHub, lib, makeWrapper, stdenv, util-linux, xauth, xorgserver }:

stdenv.mkDerivation rec {
  pname = "sx";
  version = "2.1.7";

  src = fetchFromGitHub {
    owner = "earnestly";
    repo = pname;
    rev = version;
    sha256 = "0xv15m30nhcknasqiybj5wwf7l91q4a4jf6xind8x5x00c6br6nl";
  };

  nativeBuildInputs = [ makeWrapper ];

  makeFlags = [ "PREFIX=$(out)" ];

  postInstall = ''
    wrapProgram $out/bin/sx \
      --prefix PATH : ${lib.makeBinPath [ coreutils util-linux xorgserver xauth ]}
  '';

  meta = with lib; {
    description = "Simple alternative to both xinit and startx for starting a Xorg server";
    homepage = "https://github.com/earnestly/sx";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = with maintainers; [ figsoda ];
  };
}