rav1e: fix build with updated Darwin stdenv

The updated Darwin stdenv uses `llvm-strip`, but that causes issues for
rav1e when using NASM and linking it with the cctools ld64. Stripping
the debug information instead of everything fixes the problem.
This commit is contained in:
Randy Eckenrode 2023-05-22 00:29:35 -04:00
parent 5611fa71ab
commit 98939130b9
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9

View file

@ -55,6 +55,12 @@ in rustPlatform.buildRustPackage rec {
Security
];
# Darwin uses `llvm-strip`, which results in link errors when using `-x` to strip the asm library
# and linking it with cctools ld64.
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
substituteInPlace build.rs --replace 'cmd.arg("-x")' 'cmd.arg("-S")'
'';
checkType = "debug";
postBuild = ''