From 5b33bf3bd83d5a110e0132ec7878344dd3e61c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 26 Sep 2025 01:45:51 -0400 Subject: [PATCH 1/3] veloren: cleanup --- pkgs/by-name/ve/veloren/package.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/ve/veloren/package.nix b/pkgs/by-name/ve/veloren/package.nix index cd68a5dc95cc..4b7044b74948 100644 --- a/pkgs/by-name/ve/veloren/package.nix +++ b/pkgs/by-name/ve/veloren/package.nix @@ -7,8 +7,12 @@ alsa-lib, udev, shaderc, - xorg, + libxcb, libxkbcommon, + libX11, + libXi, + libXcursor, + libXrandr, }: let @@ -51,7 +55,7 @@ rustPlatform.buildRustPackage { buildInputs = [ alsa-lib udev - xorg.libxcb + libxcb libxkbcommon ]; @@ -81,10 +85,10 @@ rustPlatform.buildRustPackage { # Add required but not explicitly requested libraries patchelf --add-rpath '${ lib.makeLibraryPath [ - xorg.libX11 - xorg.libXi - xorg.libXcursor - xorg.libXrandr + libX11 + libXi + libXcursor + libXrandr vulkan-loader ] }' "$out/bin/veloren-voxygen" @@ -99,13 +103,13 @@ rustPlatform.buildRustPackage { mkdir -p "$out/share/veloren"; cp -ar assets "$out/share/veloren/" ''; - meta = with lib; { + meta = { description = "Open world, open source voxel RPG"; homepage = "https://www.veloren.net"; - license = licenses.gpl3; + license = lib.licenses.gpl3Only; mainProgram = "veloren-voxygen"; - platforms = platforms.linux; - maintainers = with maintainers; [ + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ rnhmjoj tomodachi94 ]; From 34f9310ce5c89082137c316d891fa06752b2ccf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 26 Sep 2025 01:47:00 -0400 Subject: [PATCH 2/3] veloren: use autoPatchelfHook --- pkgs/by-name/ve/veloren/package.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ve/veloren/package.nix b/pkgs/by-name/ve/veloren/package.nix index 4b7044b74948..33dfbb07240f 100644 --- a/pkgs/by-name/ve/veloren/package.nix +++ b/pkgs/by-name/ve/veloren/package.nix @@ -9,10 +9,12 @@ shaderc, libxcb, libxkbcommon, + autoPatchelfHook, libX11, libXi, libXcursor, libXrandr, + stdenv, }: let @@ -51,12 +53,18 @@ rustPlatform.buildRustPackage { EOF ''; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + autoPatchelfHook + pkg-config + ]; + buildInputs = [ alsa-lib udev libxcb libxkbcommon + shaderc + stdenv.cc.cc # libgcc_s.so.1 ]; buildNoDefaultFeatures = true; @@ -81,18 +89,17 @@ rustPlatform.buildRustPackage { # Some tests require internet access doCheck = false; - postFixup = '' - # Add required but not explicitly requested libraries - patchelf --add-rpath '${ - lib.makeLibraryPath [ + appendRunpaths = [ + (lib.makeLibraryPath + [ libX11 libXi libXcursor libXrandr vulkan-loader ] - }' "$out/bin/veloren-voxygen" - ''; + ) + ]; postInstall = '' # Icons From 0b34dae479caf7f988f0770662cfd8d05e99b1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 26 Sep 2025 01:51:38 -0400 Subject: [PATCH 3/3] veloren: add wayland dependency --- pkgs/by-name/ve/veloren/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ve/veloren/package.nix b/pkgs/by-name/ve/veloren/package.nix index 33dfbb07240f..074f0d772e97 100644 --- a/pkgs/by-name/ve/veloren/package.nix +++ b/pkgs/by-name/ve/veloren/package.nix @@ -14,6 +14,7 @@ libXi, libXcursor, libXrandr, + wayland, stdenv, }: @@ -90,7 +91,7 @@ rustPlatform.buildRustPackage { doCheck = false; appendRunpaths = [ - (lib.makeLibraryPath + (lib.makeLibraryPath ( [ libX11 libXi @@ -98,7 +99,10 @@ rustPlatform.buildRustPackage { libXrandr vulkan-loader ] - ) + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform wayland) [ + wayland + ] + )) ]; postInstall = ''