x264: fix cross compilation to x86_64

The PR that added this condition said[1]:

> Note that nasm is only needed for x86 targets.

This suggests to me that hostPlatform was always intended, and
using buildPlatform for x86_64 was a typo.  This change fixes cross
compilation from aarch64-linux to x86_64-linux.  I've also tested that
it doesn't break x86_64-linux -> aarch64-linux.

[1]: https://github.com/NixOS/nixpkgs/pull/76914
This commit is contained in:
Alyssa Ross 2023-05-22 18:02:36 +00:00
parent a4b25ea808
commit b8b30dff6e
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" ];
preConfigure = lib.optionalString (stdenv.buildPlatform.isx86_64 || stdenv.hostPlatform.isi686) ''
preConfigure = lib.optionalString stdenv.hostPlatform.isx86 ''
# `AS' is set to the binutils assembler, but we need nasm
unset AS
'' + lib.optionalString stdenv.hostPlatform.isAarch ''