Skip to content

Commit

Permalink
nix: update flake.nix
Browse files Browse the repository at this point in the history
Fix rpaths for built crescent so it can find libX* libraries

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Feb 29, 2024
1 parent f3419b8 commit cd1f010
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@
cargo = rust-toolchain;
rustc = rust-toolchain;
};
runtimeDependencies = (with pkgs; [ libGL vulkan-loader ]) ++
(with pkgs.xorg; [ libX11 libXdmcp libXrender libXcursor libXau libxcb libXfixes libXrandr libXext libXi ]);
in
with pkgs; {
packages = rec {
crescent = rustPlatform.buildRustPackage rec {
inherit runtimeDependencies;
pname = "crescent";
version = "0.1.0";
src = ./.;
buildInputs = [ libxkbcommon ];
buildInputs = [ libxkbcommon gccForLibs.lib ];
nativeBuildInputs = [ autoPatchelfHook ];
postUnpack = ''
echo $(pwd)
ls $sourceRoot/runa-wayland-protocols/spec
Expand All @@ -54,7 +58,7 @@
nativeBuildInputs = [ pkg-config cmake rust-toolchain ];
buildInputs = [ libxkbcommon ];
shellHook = ''
export LD_LIBRARY_PATH="${lib.makeLibraryPath [ libglvnd vulkan-loader ]}:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="${lib.makeLibraryPath runtimeDependencies}:$LD_LIBRARY_PATH"
'';
LIBCLANG_PATH = lib.makeLibraryPath [ llvmPackages_17.libclang.lib ];

Expand Down

0 comments on commit cd1f010

Please sign in to comment.