about summary refs log tree commit diff
path: root/pkgs/tools/wayland/way-displays/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/wayland/way-displays/default.nix')
-rw-r--r--pkgs/tools/wayland/way-displays/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/wayland/way-displays/default.nix b/pkgs/tools/wayland/way-displays/default.nix
new file mode 100644
index 000000000000..77b97563d524
--- /dev/null
+++ b/pkgs/tools/wayland/way-displays/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, wayland
+, libinput
+, libyamlcpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "way-displays";
+  version = "1.5.3";
+
+  src = fetchFromGitHub {
+    owner = "alex-courtis";
+    repo = "way-displays";
+    rev = "${version}";
+    sha256 = "sha256-5A0qZRpWw3Deo9cGqGULpQMoPCVh85cWE/wJ5XSbVJk=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/cfg.cpp --replace "\"/etc" "\"$out/etc"
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    pkg-config
+    wayland
+  ];
+
+  buildInputs = [
+    wayland
+    libyamlcpp
+    libinput
+  ];
+
+  makeFlags = [ "DESTDIR=$(out) PREFIX= PREFIX_ETC="];
+
+  meta = with lib; {
+    homepage = "https://github.com/alex-courtis/way-displays";
+    description = "Auto Manage Your Wayland Displays";
+    license = licenses.mit;
+    maintainers = with maintainers; [ simoneruffini ];
+    platforms = platforms.linux;
+  };
+}