From b8b30dff6eb2a3a3945d86c74808e44e23b36d51 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 22 May 2023 18:02:36 +0000 Subject: [PATCH] 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 --- pkgs/development/libraries/x264/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index da343016f33..e5ca1fc58ed 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -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 ''