diff --git a/flake.nix b/flake.nix index 0c5baf7..774bef9 100644 --- a/flake.nix +++ b/flake.nix @@ -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/* ''; }; };