depot/third_party/nixpkgs/pkgs/tools/wayland/wl-mirror/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

45 lines
1,011 B
Nix

{ 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;
};
}