nix: simplify the vulkan-loader linking
This commit is contained in:
@@ -36,13 +36,9 @@
|
||||
# enables debug builds, if we want: https://github.com/NixOS/nixpkgs/issues/60919.
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
postFixup = let
|
||||
libPath = nixpkgs.lib.makeLibraryPath [ pkgs.vulkan-loader ];
|
||||
in ''
|
||||
preFixup = ''
|
||||
# strictly speaking not *all* binaries need this, but this is easy.
|
||||
# might be better to use `wrapProgram`, not sure.
|
||||
echo adding rpath "${libPath}"
|
||||
patchelf --add-rpath "${libPath}" $out/bin/*
|
||||
patchelf --add-needed ${pkgs.vulkan-loader}/lib/libvulkan.so.1 $out/bin/*
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user