-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NixOS/nixpkgs | mir: init at 2.10.0](NixOS/nixpkgs#207534)
- Loading branch information
Showing
10 changed files
with
253 additions
and
10 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
result | ||
*.log | ||
logs |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,13 @@ | ||
{ lib, pkgs, ... }: | ||
|
||
{ | ||
environment.systemPackages = with pkgs; [ | ||
# mir wayland compositor | ||
(pkgs.callPackage ../pkgs/mir { | ||
egl-wayland = pkgs.callPackage ./../pkgs/mir/egl-wayland.nix { | ||
eglexternalplatform = pkgs.callPackage ./../pkgs/mir/eglexternalplatform.nix { }; | ||
}; | ||
eglexternalplatform = pkgs.callPackage ./../pkgs/mir/eglexternalplatform.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 |
---|---|---|
|
@@ -333,7 +333,7 @@ stdenv.mkDerivation rec { | |
llvm | ||
clang | ||
clang-unwrapped | ||
]) ++ [ | ||
]) ++ [ | ||
gmp | ||
zlib | ||
ncurses | ||
|
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.10.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "MirServer"; | ||
repo = "mir"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-HPbToo7lhsHyx0w4oO2wp3zZ0xpr6SlEm2oE6Rm8b3E="; | ||
}; | ||
|
||
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 | ||
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 | ||
xorg.libXau | ||
xorg.libXcursor | ||
xorg.libXdmcp | ||
xorg.libXrender | ||
xorg.xorgproto | ||
]; | ||
|
||
buildFlags = [ "all" "doc" ]; | ||
|
||
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; | ||
}; | ||
} |
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,63 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, pkg-config | ||
, meson | ||
, ninja | ||
, wayland-scanner | ||
, libGL | ||
, libX11 | ||
, mesa | ||
, wayland | ||
, wayland-protocols | ||
, eglexternalplatform | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "egl-wayland"; | ||
version = "1.1.11"; | ||
|
||
outputs = [ "out" "dev" ]; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Nvidia"; | ||
repo = pname; | ||
rev = version; | ||
sha256 = "sha256-xb0d8spr4GoGZl/8C8BoPMPN7PAlzuQV11tEJbOQQ4U="; | ||
}; | ||
|
||
depsBuildBuild = [ | ||
pkg-config | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
meson | ||
ninja | ||
pkg-config | ||
wayland-scanner | ||
]; | ||
|
||
buildInputs = [ | ||
eglexternalplatform | ||
libGL | ||
libX11 | ||
mesa | ||
wayland | ||
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:" | ||
''; | ||
|
||
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 ]; | ||
}; | ||
} |
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 ]; | ||
}; | ||
} |