summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom <twitchyliquid64@ciphersink.net>2021-11-26 09:03:06 -0800
committerPatrick Hilhorst <git@hilhorst.be>2021-12-02 20:58:42 +0100
commit44ffab49ce15ae35bd25746bd048e9be28468cf9 (patch)
tree47a97471d569bd5d98235b7635fa3014516e3c7a
parentMerge pull request #148314 from NixOS/backport-147296-to-release-21.11 (diff)
downloadnixpkgs-44ffab49ce15ae35bd25746bd048e9be28468cf9.tar.gz
wl-mirror: init at 0.5.0
(cherry picked from commit b71ed45cfc402ee498b973dc919e8bcf433deeea)
-rw-r--r--pkgs/tools/wayland/wl-mirror/default.nix45
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/wayland/wl-mirror/default.nix b/pkgs/tools/wayland/wl-mirror/default.nix
new file mode 100644
index 000000000000..0836723760e7
--- /dev/null
+++ b/pkgs/tools/wayland/wl-mirror/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wayland
+, wayland-protocols
+, wayland-scanner
+, wlr-protocols
+, libGL
+}:
+
+stdenv.mkDerivation rec {
+ pname = "wl-mirror";
+ version = "0.5.0";
+
+ src = fetchFromGitHub {
+ owner = "Ferdi265";
+ repo = "wl-mirror";
+ rev = "v${version}";
+ sha256 = "1wjdjzj6h1q51yg70gdrq2yrgg6ihamcwhizxfrjq8955yy2y6ly";
+ };
+
+ patchPhase = ''
+ substituteInPlace CMakeLists.txt \
+ --replace 'WL_PROTOCOL_DIR "/usr' 'WL_PROTOCOL_DIR "${wayland-protocols}' \
+ --replace 'WLR_PROTOCOL_DIR "/usr' 'WLR_PROTOCOL_DIR "${wlr-protocols}'
+ '';
+
+ nativeBuildInputs = [ cmake pkg-config wayland-scanner ];
+ buildInputs = [
+ libGL
+ wayland
+ wayland-protocols
+ wlr-protocols
+ ];
+
+ meta = with lib; {
+ homepage = "https://github.com/Ferdi265/wl-mirror";
+ description = "Mirrors an output onto a Wayland surface.";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ twitchyliquid64 ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 61caf96e43b4..7f143213b474 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2547,6 +2547,8 @@ with pkgs;
wl-clipboard = callPackage ../tools/wayland/wl-clipboard { };
+ wl-mirror = callPackage ../tools/wayland/wl-mirror { };
+
wlogout = callPackage ../tools/wayland/wlogout { };
wlr-randr = callPackage ../tools/wayland/wlr-randr { };