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