about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/sx/sx/package.nix
blob: 2e72d38d040df5f55f855adacc1e448b618f26bd (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
{ lib
, stdenvNoCC
, fetchFromGitHub
, patsh
, xorg
}:

stdenvNoCC.mkDerivation rec {
  pname = "sx";
  version = "3.0";

  src = fetchFromGitHub {
    owner = "earnestly";
    repo = pname;
    rev = version;
    hash = "sha256-hKoz7Kuus8Yp7D0F05wCOQs6BvV0NkRM9uUXTntLJxQ=";
  };

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

  nativeBuildInputs = [ patsh ];

  buildInputs = [
    xorg.xauth
    xorg.xorgserver
  ];

  postInstall = ''
    patsh -f $out/bin/sx -s ${builtins.storeDir}
  '';

  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;
    mainProgram = "sx";
    maintainers = with maintainers; [ figsoda thiagokokada ];
    platforms = platforms.linux;
  };
}