WIP: Integration branch with darwin and deck support

- Added darwin and jovian inputs
- Added platform-specific package configurations
- Added darwinConfigurations and deck nixosConfiguration
- Copied darwin and deck specific files
- Fixed darwin version compatibility

Some configurations still need debugging
This commit is contained in:
Anish Lakhwara
2025-09-12 14:26:38 -07:00
parent 01c65f54af
commit 2ca6feff4d
43 changed files with 2114 additions and 164 deletions
+54
View File
@@ -0,0 +1,54 @@
# Imported from https://github.com/wheaney/breezy-desktop/pull/113/files
# Use flake or nixpkgs once upstreamed
{
self,
lib,
stdenv,
glib,
...
}: stdenv.mkDerivation {
pname = "breezy-gnome";
version = "unstable";
src = lib.cleanSource "${self}/gnome/src/.";
buildInputs = [
glib
];
passthru = {
extensionUuid = "breezydesktop@xronlinux.com";
};
buildPhase = ''
mkdir -p build/schemas
glib-compile-schemas --targetdir="build/schemas" $src/schemas/
cp $src/*.js build/
cp $src/*.frag build/
mkdir -p build/schemas/
cp $src/schemas/*.xml build/schemas/
mkdir -p build/dbus-interfaces/
cp $src/dbus-interfaces/*.xml build/dbus-interfaces/
mkdir -p build/textures/
cp -rL $src/textures/* build/textures/
cp $src/metadata.json build/
'';
installPhase = ''
extra_source=()
for file in "$DEST_DIR"/*; do
extra_source+=("--extra-source=$file")
done
gnome-extensions pack --force "$${extra_source[@]}" "build" -o "$out"
'';
doInstallCheck = false;
# The default release is a script which will do an impure download
# just ensure that the application can run without network
meta = with lib; {
homepage = "https://github.com/wheaney/breezy-desktop";
maintainers = with maintainers; [shymega];
platforms = platforms.linux;
};
}
+114
View File
@@ -0,0 +1,114 @@
# Imported from https://github.com/wheaney/XRLinuxDriver/pull/80/files
# Use flake or nixpkgs once upstreamed
{
self,
lib,
pkgs,
stdenv,
fetchFromGitLab,
libusb1,
curl,
openssl,
libevdev,
json_c,
hidapi,
wayland,
cmake,
pkg-config,
python3,
libffi,
autoPatchelfHook,
...
}: let
pythonEnv = python3.withPackages (ps: [ps.pyyaml]);
buildInputs = [
curl
hidapi
json_c
libevdev
libffi
libusb1
openssl
stdenv.cc.cc.lib
wayland
];
arch =
if pkgs.system == "aarch64-linux"
then "aarch64"
else if pkgs.system == "x86_64-linux"
then "x86_64"
else throw "Unsupported system ${pkgs.system}";
in
stdenv.mkDerivation rec {
pname = "xrlinuxdriver";
version = "0.12.0.1";
srcs = [
(fetchFromGitLab rec {
domain = "gitlab.com";
owner = "TheJackiMonster";
repo = "nrealAirLinuxDriver";
rev = "3225fcc575e19a8407d5019903567cff1c3ed1a8";
hash = "sha256-NRbcANt/CqREQZoYIYtTGVbvkZ7uo2Tm90s6prlsrQE=";
fetchSubmodules = true;
name = "${repo}-src";
})
(lib.cleanSourceWith {
src = self;
name = "${pname}-src";
})
];
sourceRoot = "${(builtins.elemAt srcs 1).name}";
postUnpack = let
nrealAirLinuxDriver = (builtins.elemAt srcs 0).name;
in ''
mkdir -p $sourceRoot/modules/xrealInterfaceLibrary
cp -R ${nrealAirLinuxDriver}/* $sourceRoot/modules/xrealInterfaceLibrary
chmod -R u+w $sourceRoot
'';
nativeBuildInputs = [
cmake
pkg-config
pythonEnv
autoPatchelfHook
];
inherit buildInputs;
cmakeFlags = [
"-DCMAKE_SKIP_RPATH=ON"
];
cmakeBuildDir = "build";
cmakeBuildType = "RelWithDebInfo";
installPhase = ''
mkdir -p $out/bin $out/lib/systemd/user $out/lib/udev/rules.d $out/lib/${arch}
cp xrDriver ../bin/xr_driver_cli ../bin/xr_driver_verify $out/bin
cp ../udev/* $out/lib/udev/rules.d/
cp ../lib/${arch}/* $out/lib/${arch}/
cp ../systemd/xr-driver.service $out/lib/systemd/user/xr-driver.service
cp ${hidapi}/lib/libhidapi-hidraw.so.0 $out/lib/
substituteInPlace \
$out/lib/systemd/user/xr-driver.service \
--replace-fail "ExecStart={bin_dir}/xrDriver" "ExecStart=$out/bin/xrDriver" \
--replace-fail "{ld_library_path}" "$out/lib/${arch}"
'';
preBuild = ''
addAutoPatchelfSearchPath $out/usr/lib/${arch}
'';
doInstallCheck = false;
# The default release is a script which will do an impure download
# just ensure that the application can run without network
meta = with lib; {
homepage = "https://github.com/wheaney/XRLinuxDriver";
license = licenses.mit;
description = "Linux service for interacting with XR devices.";
mainProgram = "xrDriver";
maintainers = with maintainers; [shymega];
platforms = platforms.linux;
};
}