12 , installExampleScripts ? true
21 wl-present-binpath = lib.makeBinPath [
29 stdenv.mkDerivation rec {
33 src = fetchFromGitHub {
37 hash = "sha256-LafG2VEs7j4JwHayoT5euMp08RgSzk+HbfhCr6CX9OE=";
41 depsBuildBuild = [ pkg-config ];
42 nativeBuildInputs = [ cmake pkg-config wayland-scanner scdoc makeWrapper ];
43 buildInputs = [ libGL wayland wayland-protocols wlr-protocols bash ];
46 echo 'v${version}' > version.txt
47 substituteInPlace CMakeLists.txt \
48 --replace 'WL_PROTOCOL_DIR "/usr' 'WL_PROTOCOL_DIR "${wayland-protocols}' \
49 --replace 'WLR_PROTOCOL_DIR "/usr' 'WLR_PROTOCOL_DIR "${wlr-protocols}'
53 "-DINSTALL_EXAMPLE_SCRIPTS=${if installExampleScripts then "ON" else "OFF"}"
54 "-DINSTALL_DOCUMENTATION=ON"
57 postInstall = lib.optionalString installExampleScripts ''
58 wrapProgram $out/bin/wl-present --prefix PATH ":" ${wl-present-binpath}
62 homepage = "https://github.com/Ferdi265/wl-mirror";
63 description = "Simple Wayland output mirror client";
64 license = licenses.gpl3;
65 maintainers = with maintainers; [ synthetica ];
66 platforms = platforms.linux;