fix: running default Nix package doesnt provide runtime libraries
This commit is contained in:
parent
424efd9c98
commit
4f423f4300
2 changed files with 9 additions and 5 deletions
|
@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
|||
pkg-config
|
||||
] ++ lib.optionals stdenv.targetPlatform.isDarwin [
|
||||
targetPackages.darwin.apple_sdk.frameworks.CoreServices
|
||||
];
|
||||
];
|
||||
|
||||
buildInputs = with targetPackages; [
|
||||
dav1d
|
||||
|
@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec {
|
|||
xorg.libXi
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
bash
|
||||
bash
|
||||
] ++ lib.optionals stdenv.targetPlatform.isDarwin [
|
||||
makeWrapper
|
||||
darwin.apple_sdk.frameworks.Cocoa
|
||||
|
@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec {
|
|||
darwin.apple_sdk.frameworks.QuartzCore
|
||||
];
|
||||
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER =
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER =
|
||||
lib.optionalString stdenv.targetPlatform.isWindows "${stdenv.cc.targetPrefix}gcc";
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.targetPlatform.isDarwin "-framework CoreFoundation";
|
||||
|
@ -59,6 +59,9 @@ rustPlatform.buildRustPackage rec {
|
|||
wrapProgram $out/bin/${pname} \
|
||||
--prefix PATH : ${lib.makeBinPath [ bash ]} \
|
||||
--set LD_LIBRARY_PATH ${lib.makeLibraryPath buildInputs}
|
||||
'' + lib.optionalString stdenv.targetPlatform.isWindows ''
|
||||
mkdir -p $out/bin
|
||||
cp ${targetPackages.vulkan-loader}/bin/vulkan-1.dll $out/bin/
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue