@@ -8,17 +8,31 @@
8, wayland-scanner
8, wayland-scanner
9, wlr-protocols
9, wlr-protocols
11+, installExampleScripts ? true
19+ wl-present-binpath = lib.makeBinPath [
13stdenv.mkDerivation rec {
27stdenv.mkDerivation rec {
14 pname = "wl-mirror";
28 pname = "wl-mirror";
15− version = "0.5.0";
29+ version = "0.8.1";
17 src = fetchFromGitHub {
31 src = fetchFromGitHub {
18 owner = "Ferdi265";
32 owner = "Ferdi265";
19 repo = "wl-mirror";
33 repo = "wl-mirror";
20 rev = "v${version}";
34 rev = "v${version}";
21− sha256 = "1wjdjzj6h1q51yg70gdrq2yrgg6ihamcwhizxfrjq8955yy2y6ly";
35+ hash = "sha256-P5rvZPpIStlOSGj3PaiXAMPWqgWpkC+4IrixEMwoGJU=";
24 patchPhase = ''
38 patchPhase = ''
@@ -27,19 +41,22 @@ stdenv.mkDerivation rec {
27 --replace 'WLR_PROTOCOL_DIR "/usr' 'WLR_PROTOCOL_DIR "${wlr-protocols}'
41 --replace 'WLR_PROTOCOL_DIR "/usr' 'WLR_PROTOCOL_DIR "${wlr-protocols}'
30− nativeBuildInputs = [ cmake pkg-config wayland-scanner ];
44+ cmakeFlags = [
31− buildInputs = [
45+ "-DINSTALL_EXAMPLE_SCRIPTS=${if installExampleScripts then "ON" else "OFF"}"
48+ postInstall = lib.optionalString installExampleScripts ''
49+ wrapProgram $out/bin/wl-present --prefix PATH ":" ${wl-present-binpath}
52+ nativeBuildInputs = [ cmake pkg-config wayland-scanner makeWrapper ];
53+ buildInputs = [ libGL wayland wayland-protocols wlr-protocols ];
38 meta = with lib; {
55 meta = with lib; {
39 homepage = "https://github.com/Ferdi265/wl-mirror";
56 homepage = "https://github.com/Ferdi265/wl-mirror";
40 description = "Mirrors an output onto a Wayland surface.";
57 description = "Mirrors an output onto a Wayland surface.";
41 license = licenses.gpl3;
58 license = licenses.gpl3;
42− maintainers = with maintainers; [ twitchyliquid64 ];
59+ maintainers = with maintainers; [ synthetica twitchyliquid64 ];
43 platforms = platforms.linux;
60 platforms = platforms.linux;