Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .nix/packages/breezy-gnome/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
self,
version,
lib,
stdenv,
glib,
}:
let
extensionUuid = "breezydesktop@xronlinux.com";
in
stdenv.mkDerivation (finalAttrs: {
pname = "gnome-shell-extension-breezy-desktop";
inherit version;

src = self;

nativeBuildInputs = [
glib # for glib-compile-schemas
];

dontConfigure = true;
dontBuild = true;

passthru = {
inherit extensionUuid;
};

installPhase = ''
runHook preInstall

extDir=$out/share/gnome-shell/extensions/${extensionUuid}
mkdir -p $extDir

# JavaScript source files
cd gnome/src
for f in *.js metadata.json; do
install -Dm644 "$f" "$extDir/$f"
done

# Fragment shader (resolve symlink)
cp -L Sombrero.frag "$extDir/Sombrero.frag"

# D-Bus interfaces
mkdir -p "$extDir/dbus-interfaces"
cp dbus-interfaces/*.xml "$extDir/dbus-interfaces/"

# Textures (resolve symlinks)
mkdir -p "$extDir/textures"
cp -L textures/* "$extDir/textures/"

# GSettings schema (resolve symlink and compile)
mkdir -p "$extDir/schemas"
cp -L schemas/*.xml "$extDir/schemas/"
glib-compile-schemas "$extDir/schemas"

runHook postInstall
'';

meta = {
description = "GNOME Shell extension for Breezy Desktop XR virtual display";
homepage = "https://github.com/wheaney/breezy-desktop";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
})
89 changes: 89 additions & 0 deletions .nix/packages/breezy-kde/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
self,
version,
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
kdePackages,
libepoxy,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "breezy-kwin";
inherit version;

src = self;

sourceRoot = ".";

unpackPhase = ''
cp -r $src $TMPDIR/breezy-desktop
chmod -R u+w $TMPDIR/breezy-desktop
cd $TMPDIR/breezy-desktop/kwin
'';

nativeBuildInputs = [
cmake
kdePackages.extra-cmake-modules
kdePackages.wrapQtAppsHook
pkg-config
];

buildInputs = with kdePackages; [
kconfig
kconfigwidgets
kcoreaddons
kglobalaccel
ki18n
kcmutils
kwindowsystem
kxmlgui
kwin
qtbase
qtdeclarative
qt3d
qtquick3d
libepoxy
];

postPatch = ''
# VERSION is read relative to kwin/src/../VERSION = kwin/VERSION
# and also from kwin/../VERSION for the top-level CMakeLists.txt
echo "${finalAttrs.version}" > ../VERSION
echo "${finalAttrs.version}" > VERSION

# Copy files expected by CMake install but located elsewhere in the mono-repo
cp ../ui/modules/PyXRLinuxDriverIPC/xrdriveripc.py src/xrdriveripc/xrdriveripc.py
cp ../ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg src/kcm/com.xronlinux.BreezyDesktop.svg

# Fix hardcoded /usr/include/kwin path
substituteInPlace cmake/info.cmake \
--replace-fail '/usr/include/kwin/effect/effect.h' \
'${kdePackages.kwin.dev}/include/kwin/effect/effect.h'

# Fix QtQuick3D QML module detection - bypass qmake query
substituteInPlace CMakeLists.txt \
--replace-fail 'execute_process(
COMMAND ''${QT6_QMAKE_EXECUTABLE} -query QT_INSTALL_QML
OUTPUT_VARIABLE QT6_QML_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)' 'set(QT6_QML_DIR "${kdePackages.qtquick3d}/lib/qt-6/qml")'

# Remove the hardcoded /usr/include reference
substituteInPlace src/CMakeLists.txt \
--replace-fail 'target_include_directories(breezy_desktop PRIVATE /usr/include/kwin)' \
'target_include_directories(breezy_desktop PRIVATE ${kdePackages.kwin.dev}/include/kwin)'
'';

cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];

meta = {
description = "KWin effect plugin for Breezy Desktop XR virtual display";
homepage = "https://github.com/wheaney/breezy-desktop";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
})
91 changes: 91 additions & 0 deletions .nix/packages/breezy-ui/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
self,
version,
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
gettext,
glib,
gtk4,
libadwaita,
desktop-file-utils,
gobject-introspection,
wrapGAppsHook4,
python3Packages,
python3,
gst_all_1,
appstream,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "breezy-desktop-ui";
inherit version;

# Use the ui/ subtree but need root for VERSION file
src = self;
sourceRoot = "ui";

# The source is a nix store path, not a directory name
unpackPhase = ''
cp -r $src $TMPDIR/breezy-desktop
chmod -R u+w $TMPDIR/breezy-desktop
cd $TMPDIR/breezy-desktop/ui
sourceRoot=$(pwd)
'';

nativeBuildInputs = [
meson
ninja
pkg-config
gettext
glib # glib-compile-schemas
gtk4 # gtk-update-icon-cache
desktop-file-utils
gobject-introspection
wrapGAppsHook4
appstream # appstreamcli for validation
];

buildInputs = [
gtk4
libadwaita
glib
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
(python3.withPackages (
ps: with ps; [
pygobject3
pydbus
]
))
];

# Patch the entry scripts to use Nix store paths instead of XDG_DATA_HOME
postPatch = ''
substituteInPlace src/breezydesktop.in \
--replace-fail "appdir = os.getenv('APPDIR', xdg_data_home)" \
"appdir = os.getenv('APPDIR', '$out/share')"
substituteInPlace src/virtualdisplay.in \
--replace-fail "appdir = os.getenv('APPDIR', xdg_data_home)" \
"appdir = os.getenv('APPDIR', '$out/share')" || true

# Upstream bug: virtualdisplayrow.py is missing from meson.build install list
substituteInPlace src/meson.build \
--replace-fail "'virtualdisplay.py'," "'virtualdisplay.py', 'virtualdisplayrow.py',"
'';

# Skip tests that need network or display
mesonFlags = [
];

# wrapGAppsHook4 handles GI_TYPELIB_PATH, GDK_PIXBUF, etc.

meta = {
description = "GTK4 settings UI for Breezy Desktop XR";
homepage = "https://github.com/wheaney/breezy-desktop";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
})
60 changes: 60 additions & 0 deletions .nix/packages/breezy-vulkan/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
self,
version,
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
glslang,
spirv-headers,
vulkan-headers,
vulkan-loader,
libx11,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "breezy-vulkan";
inherit version;

src = "${self}/vulkan/modules/vkBasalt";

nativeBuildInputs = [
meson
ninja
pkg-config
glslang
];

buildInputs = [
spirv-headers
vulkan-headers
vulkan-loader
libx11
];

postInstall =
let
sombreroSrc = "${self}/modules/sombrero";
vulkanSrc = "${self}/vulkan";
in
''
# Install sombrero shaders
mkdir -p $out/share/breezy-vulkan/shaders
cp ${sombreroSrc}/Sombrero.frag $out/share/breezy-vulkan/shaders/
cp ${sombreroSrc}/calibrating.png $out/share/breezy-vulkan/shaders/ || true

# Install breezy vulkan config
install -Dm644 ${vulkanSrc}/config/vkBasalt.conf $out/share/breezy-vulkan/vkBasalt.conf

# Install custom banner
cp ${vulkanSrc}/custom_banner.png $out/share/breezy-vulkan/ || true
'';

meta = {
description = "Vulkan post-processing layer for Breezy Desktop XR gaming";
homepage = "https://github.com/wheaney/breezy-desktop";
license = lib.licenses.gpl3Only;
platforms = [ "x86_64-linux" ];
};
})
Loading