nixpkgs-suyu/pkgs/development/libraries/egl-wayland/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
1.9 KiB
Nix
Raw Normal View History

2019-04-23 03:29:41 +02:00
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
2019-04-23 03:29:41 +02:00
, meson
, ninja
2021-07-03 15:40:23 +02:00
, wayland-scanner
2021-09-16 21:57:40 +02:00
, libGL
2019-04-23 03:29:41 +02:00
, libX11
, mesa
, wayland
2021-09-16 21:57:40 +02:00
, wayland-protocols
2019-04-23 03:29:41 +02:00
}:
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-09-16 21:57:40 +02:00
version = "1.1.9";
2019-04-23 03:29:41 +02:00
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "Nvidia";
repo = pname;
rev = version;
2021-09-16 21:57:40 +02:00
sha256 = "sha256-rcmGVEcOtKTR8sVkHV7Xb+8NuKWUapYn+/Fswi4z6Mc=";
2019-04-23 03:29:41 +02:00
};
2021-07-03 15:40:23 +02:00
depsBuildBuild = [
pkg-config
];
2019-04-23 03:29:41 +02:00
nativeBuildInputs = [
meson
ninja
pkg-config
2021-07-03 15:40:23 +02:00
wayland-scanner
2019-04-23 03:29:41 +02:00
];
buildInputs = [
eglexternalplatform
2021-09-16 21:57:40 +02:00
libGL
2019-04-23 03:29:41 +02:00
libX11
mesa
wayland
2021-09-16 21:57:40 +02:00
wayland-protocols
2019-04-23 03:29:41 +02: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 03:29:41 +02:00
meta = with lib; {
description = "The EGLStream-based Wayland external platform";
homepage = "https://github.com/NVIDIA/egl-wayland/";
2019-04-23 03:29:41 +02:00
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ hedning ];
};
}