about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/sx/sx/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/sx/sx/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/sx/sx/package.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/sx/sx/package.nix b/nixpkgs/pkgs/by-name/sx/sx/package.nix
new file mode 100644
index 000000000000..2e72d38d040d
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/sx/sx/package.nix
@@ -0,0 +1,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;
+  };
+}