From cc428055f1b9d668d4ec907708a712106b8f8977 Mon Sep 17 00:00:00 2001 From: Chance Date: Tue, 25 Mar 2025 16:00:12 -0400 Subject: [PATCH] include runtime dependencies in default package --- default.nix | 21 +++++++++++++++++++-- flake.nix | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index f1f7962..0f91f93 100644 --- a/default.nix +++ b/default.nix @@ -5,7 +5,12 @@ bash, makeWrapper, dav1d, + vulkan-loader, + libGL, + wayland, pkg-config, + libxkbcommon, + pkgs, }: let version = (builtins.fromTOML (builtins.readFile ./engine/Cargo.toml)).package.version; src = nix-gitignore.gitignoreSource [] ./.; @@ -18,14 +23,26 @@ in makeWrapper pkg-config ]; - buildInputs = [ + buildInputs = with pkgs; [ + wayland + vulkan-loader + libxkbcommon + libGL + libxkbcommon + xorg.libXcursor + xorg.libXrandr + xorg.libXi + xorg.libX11 + xorg.libxcb bash dav1d ]; doCheck = false; + LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}"; + fixupPhase = '' - wrapProgram $out/bin/${pname} --set PATH ${bash}/bin:\$PATH + wrapProgram $out/bin/${pname} --set PATH ${bash}/bin:\$PATH --set LD_LIBRARY_PATH ${pkgs.lib.makeLibraryPath buildInputs} ''; meta = { diff --git a/flake.nix b/flake.nix index f73a801..fca13cb 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ }; buildInputs = with pkgs; [ vulkan-loader + libGL wayland libxkbcommon xorg.libXcursor