-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mir: init at 2.11.0 #207534
Closed
Closed
mir: init at 2.11.0 #207534
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
pkgs/development/libraries/eglexternalplatform/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ lib | ||
, stdenvNoCC | ||
, fetchFromGitHub | ||
}: | ||
|
||
stdenvNoCC.mkDerivation rec { | ||
pname = "eglexternalplatform"; | ||
version = "1.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Nvidia"; | ||
repo = "eglexternalplatform"; | ||
rev = version; | ||
sha256 = "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"; | ||
}; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
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/" | ||
|
||
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, boost | ||
, egl-wayland | ||
, libglvnd | ||
, glm | ||
, glog | ||
, lttng-ust | ||
, udev | ||
, glib | ||
, wayland | ||
, libxcb | ||
, xorg | ||
, libdrm | ||
, mesa | ||
, libepoxy | ||
, nettle | ||
, libxkbcommon | ||
, libinput | ||
, libxmlxx | ||
, libuuid | ||
, pcre2 | ||
, freetype | ||
, libyamlcpp | ||
, python3 | ||
, libevdev | ||
, libselinux | ||
, libsepol | ||
, eglexternalplatform | ||
, doxygen | ||
, libxslt | ||
, pkg-config | ||
}: | ||
|
||
let | ||
pythonEnv = python3.withPackages(ps: [ ps.pillow ]); | ||
in | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "mir"; | ||
version = "2.11.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "MirServer"; | ||
repo = "mir"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-103PJZEoSgtSbDGCanD2/XdpX6DXXx678GmghdZI7H4="; | ||
}; | ||
|
||
postPatch = '' | ||
# Fix error broken path found in pc file ("//") | ||
for f in $(find . -name '*.pc.in') ; do | ||
substituteInPlace $f \ | ||
--replace "/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_LIBDIR@" \ | ||
--replace "/@CMAKE_INSTALL_INCLUDEDIR@" "@CMAKE_INSTALL_INCLUDEDIR@" | ||
done | ||
|
||
# Fix paths for generating drm-formats | ||
substituteInPlace src/platform/graphics/CMakeLists.txt \ | ||
--replace "/usr/include/drm/drm_fourcc.h" "${libdrm.dev}/include/libdrm/drm_fourcc.h" \ | ||
--replace "/usr/include/libdrm/drm_fourcc.h" "${libdrm.dev}/include/libdrm/drm_fourcc.h" | ||
|
||
# Fix server-platform install path | ||
substituteInPlace src/platforms/CMakeLists.txt \ | ||
--replace "\''${CMAKE_INSTALL_PREFIX}/\''${CMAKE_INSTALL_LIBDIR}/mir/server-platform" "\''${CMAKE_INSTALL_LIBDIR}/mir/server-platform" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
doxygen | ||
onny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
libxslt | ||
pkg-config | ||
pythonEnv | ||
]; | ||
|
||
buildInputs = [ | ||
boost | ||
eglexternalplatform | ||
egl-wayland | ||
freetype | ||
glib | ||
glm | ||
glog | ||
libdrm | ||
libepoxy | ||
libevdev | ||
libglvnd | ||
libinput | ||
libselinux | ||
libsepol | ||
libuuid | ||
libxcb | ||
libxkbcommon | ||
libxmlxx | ||
libyamlcpp | ||
lttng-ust | ||
mesa | ||
nettle | ||
pcre2 | ||
udev | ||
wayland | ||
xorg.libX11 | ||
SuperSandro2000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
xorg.libXau | ||
xorg.libXcursor | ||
xorg.libXdmcp | ||
xorg.libXrender | ||
xorg.xorgproto | ||
]; | ||
|
||
buildFlags = [ "all" "doc" ]; | ||
onny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
cmakeFlags = [ | ||
"-DMIR_PLATFORM='gbm-kms;eglstream-kms;x11;wayland'" | ||
# Tests depend on package wlcs which is not yet packaged | ||
"-DMIR_ENABLE_TESTS=OFF" | ||
]; | ||
|
||
outputs = [ "out" "dev" "doc" ]; | ||
|
||
meta = with lib; { | ||
description = "Compositor and display server used by Canonical"; | ||
homepage = "https://mir-server.io"; | ||
license = licenses.gpl2Plus; | ||
maintainers = with maintainers; [ onny ]; | ||
platforms = platforms.linux; | ||
}; | ||
onny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While trying to build something that depends on Mir we noticed that the paths are still broken, just not broken enough for the pkg-config check to notice:
I think for our purposes, replacing all
${prefix}/@CMAKE_INSTALL_<dir>@
with@CMAKE_INSTALL_FULL_<dir>@
etc might be fine:The more proper fix being something like jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files being done upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we
@-
mark them?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I PR'd the same fix to their wlcs project recently (first with
FULL
, now with jtojnar's snippet), guess I could do the same for Mir & link it here forfetchpatch
ing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canonical/mir#2786, should be cherry-pickable onto 2.11.0.