diff --git a/pkgs/tools/X11/sx/default.nix b/pkgs/tools/X11/sx/default.nix new file mode 100644 index 000000000000..c03d4443fcf0 --- /dev/null +++ b/pkgs/tools/X11/sx/default.nix @@ -0,0 +1,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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b276d2435ee2..3ea5ca31ee5d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9144,6 +9144,10 @@ in squeekboard = callPackage ../applications/accessibility/squeekboard { }; + sx = callPackage ../tools/X11/sx { + inherit (xorg) xauth xorgserver; + }; + t = callPackage ../tools/misc/t { }; tabnine = callPackage ../development/tools/tabnine { };