1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 21:17:46 +00:00
nixpkgs/pkgs/development/libraries/egl-wayland/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

80 lines
1.6 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, meson
, ninja
, libX11
, mesa
, libGL
, 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";
version = "1.1.4";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "Nvidia";
repo = pname;
rev = version;
sha256 = "0wvamjcfycd7rgk7v14g2rin55xin9rfkxmivyay3cm08vnl7y1d";
};
# Add missing include
# https://github.com/NVIDIA/egl-wayland/pull/24
patches = [ ./eglmesaext.patch ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
eglexternalplatform
libX11
mesa
libGL
wayland
];
meta = with lib; {
description = "The EGLStream-based Wayland external platform";
homepage = "https://github.com/NVIDIA/egl-wayland/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ hedning ];
};
}