mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-05 18:01:56 +02:00
Co-authored-by: Hannah Lindrob <hannahlindrob@ourlook.com> Co-authored-by: Sapphire <imsapphire0@gmail.com>
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{
|
|
description = "SlimeVR Server & GUI";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
perSystem = { pkgs, ... }:
|
|
let
|
|
runtimeLibs = pkgs: (with pkgs; [
|
|
jdk17
|
|
|
|
alsa-lib at-spi2-atk at-spi2-core cairo cups dbus expat
|
|
gdk-pixbuf glib gtk3 libdrm libgbm libglvnd libnotify
|
|
libxkbcommon mesa nspr nss pango systemd vulkan-loader
|
|
wayland xorg.libX11 xorg.libXcomposite xorg.libXdamage
|
|
xorg.libXext xorg.libXfixes xorg.libXrandr xorg.libxcb
|
|
xorg.libxshmfence libusb1 udev libxcrypt-legacy
|
|
rpm fpm
|
|
|
|
wine
|
|
zlib squashfsTools fakeroot libarchive icu
|
|
nodejs_22 pnpm pkg-config python3 gcc gnumake binutils git
|
|
pkgs.nodePackages.node-gyp-build
|
|
]);
|
|
|
|
slimeShell = pkgs.buildFHSEnv {
|
|
name = "slimevr-env";
|
|
targetPkgs = runtimeLibs;
|
|
profile = ''
|
|
export JAVA_HOME=${pkgs.jdk17}
|
|
export PATH="${pkgs.jdk17}/bin:$PATH"
|
|
|
|
# Tell electron-builder to use system tools instead of downloading them
|
|
export USE_SYSTEM_FPM=true
|
|
export USE_SYSTEM_MKSQUASHFS=true
|
|
'';
|
|
runScript = "bash";
|
|
};
|
|
in
|
|
{
|
|
devShells.default = slimeShell.env;
|
|
};
|
|
};
|
|
}
|