Merge pull request #222235 from OPNA2608/fix/egl-wayland_pkgconfig
This commit is contained in:
commit
829ddb2c75
3 changed files with 53 additions and 36 deletions
|
@ -2,6 +2,7 @@
|
|||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, eglexternalplatform
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
|
@ -13,35 +14,7 @@
|
|||
, wayland-protocols
|
||||
}:
|
||||
|
||||
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 {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "egl-wayland";
|
||||
version = "1.1.11";
|
||||
|
||||
|
@ -63,6 +36,12 @@ in stdenv.mkDerivation rec {
|
|||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Declares an includedir but doesn't install any headers
|
||||
# CMake's `pkg_check_modules(NAME wayland-eglstream IMPORTED_TARGET)` considers this an error
|
||||
sed -i -e '/includedir/d' wayland-eglstream.pc.in
|
||||
'';
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
@ -75,7 +54,6 @@ in stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
buildInputs = [
|
||||
eglexternalplatform
|
||||
libGL
|
||||
libX11
|
||||
libdrm
|
||||
|
@ -83,12 +61,9 @@ in stdenv.mkDerivation rec {
|
|||
wayland-protocols
|
||||
];
|
||||
|
||||
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:"
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
eglexternalplatform
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The EGLStream-based Wayland external platform";
|
||||
|
|
40
pkgs/development/libraries/eglexternalplatform/default.nix
Normal file
40
pkgs/development/libraries/eglexternalplatform/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ stdenvNoCC
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "eglexternalplatform";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Nvidia";
|
||||
repo = "eglexternalplatform";
|
||||
rev = "7c8f8e2218e46b1a4aa9538520919747f1184d86";
|
||||
sha256 = "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/include/
|
||||
cp interface/* $out/include/
|
||||
|
||||
substituteInPlace eglexternalplatform.pc \
|
||||
--replace "/usr/include/EGL" "$out/include"
|
||||
install -Dm644 {.,$out/share/pkgconfig}/eglexternalplatform.pc
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The EGL External Platform interface";
|
||||
homepage = "https://github.com/NVIDIA/eglexternalplatform";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ hedning ];
|
||||
};
|
||||
}
|
|
@ -19874,6 +19874,8 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
|
||||
};
|
||||
|
||||
eglexternalplatform = callPackage ../development/libraries/eglexternalplatform { };
|
||||
|
||||
egl-wayland = callPackage ../development/libraries/egl-wayland { };
|
||||
|
||||
elastix = callPackage ../development/libraries/science/biology/elastix {
|
||||
|
|
Loading…
Reference in a new issue