diff --git a/pkgs/by-name/ra/rav1e/package.nix b/pkgs/by-name/ra/rav1e/package.nix index d2e769568339..526c4b9b968c 100644 --- a/pkgs/by-name/ra/rav1e/package.nix +++ b/pkgs/by-name/ra/rav1e/package.nix @@ -1,16 +1,17 @@ -{ lib -, rust -, stdenv -, rustPlatform -, fetchCrate -, pkg-config -, cargo-c -, libgit2 -, nasm -, zlib -, libiconv -, darwin -, buildPackages +{ + lib, + rust, + stdenv, + rustPlatform, + fetchCrate, + pkg-config, + cargo-c, + libgit2, + nasm, + zlib, + libiconv, + darwin, + buildPackages, }: rustPlatform.buildRustPackage rec { @@ -26,15 +27,19 @@ rustPlatform.buildRustPackage rec { depsBuildBuild = [ pkg-config ]; - nativeBuildInputs = [ cargo-c libgit2 nasm ]; - - buildInputs = [ - zlib - ] ++ lib.optionals stdenv.isDarwin [ - libiconv - darwin.apple_sdk.frameworks.Security + nativeBuildInputs = [ + cargo-c + libgit2 + nasm ]; + buildInputs = + [ zlib ] + ++ lib.optionals stdenv.isDarwin [ + libiconv + darwin.apple_sdk.frameworks.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) '' @@ -43,7 +48,7 @@ rustPlatform.buildRustPackage rec { checkType = "debug"; - postBuild = '' + postBuild = '' ${rust.envVars.setEnv} cargo cbuild --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget} '';