2019-04-23 02:29:41 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-04-23 02:29:41 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, libX11
|
|
|
|
, mesa
|
2019-11-27 11:36:59 +00:00
|
|
|
, libGL
|
2019-04-23 02:29:41 +01:00
|
|
|
, wayland
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
eglexternalplatform = stdenv.mkDerivation {
|
|
|
|
pname = "eglexternalplatform";
|
|
|
|
version = "1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Nvidia";
|
|
|
|
repo = "eglexternalplatform";
|
|
|
|
rev = "7c8f8e2218e46b1a4aa9538520919747f1184d86";
|
|
|
|
sha256 = "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/include/"
|
|
|
|
cp interface/eglexternalplatform.h "$out/include/"
|
|
|
|
cp interface/eglexternalplatformversion.h "$out/include/"
|
|
|
|
|
|
|
|
substituteInPlace eglexternalplatform.pc \
|
|
|
|
--replace "/usr/include/EGL" "$out/include"
|
|
|
|
mkdir -p "$out/share/pkgconfig"
|
|
|
|
cp eglexternalplatform.pc "$out/share/pkgconfig/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "egl-wayland";
|
2021-03-28 05:40:05 +01:00
|
|
|
version = "1.1.6";
|
2019-04-23 02:29:41 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Nvidia";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-03-28 05:40:05 +01:00
|
|
|
sha256 = "1n9lg8hpjgxlf7dpddkjhbslsfd0symla2wk6jjmnl9n9jv2gmzk";
|
2019-04-23 02:29:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-04-23 02:29:41 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
eglexternalplatform
|
|
|
|
libX11
|
|
|
|
mesa
|
2019-11-27 11:36:59 +00:00
|
|
|
libGL
|
2019-04-23 02:29:41 +01:00
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
2021-03-28 05:40:05 +01:00
|
|
|
postFixup = ''
|
|
|
|
# Doubled prefix in pc file after postbuild hook replaces includedir prefix variable with dev output path
|
|
|
|
substituteInPlace $dev/lib/pkgconfig/wayland-eglstream.pc \
|
|
|
|
--replace "=$dev/$dev" "=$dev" \
|
|
|
|
--replace "Requires:" "Requires.private:"
|
|
|
|
'';
|
|
|
|
|
2019-04-23 02:29:41 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The EGLStream-based Wayland external platform";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/NVIDIA/egl-wayland/";
|
2019-04-23 02:29:41 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ hedning ];
|
|
|
|
};
|
|
|
|
}
|