From 212c28ec39dd19ceb51cb7a3a9606567364f6c14 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 24 Jan 2023 15:20:04 +0000 Subject: [PATCH] rav1e: use libgit2 from Nixpkgs This is a native build input because it's used at build time by the "built" crate, which tries to embed git info and build timestamps into the binary (ugh). This fixes cross-compilation from x86_64 to aarch64, because git2's build.rs tries to use -m64, which is x86_64-only. --- pkgs/tools/video/rav1e/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/video/rav1e/default.nix b/pkgs/tools/video/rav1e/default.nix index f75c38111a57..32d9cc9d3d7d 100644 --- a/pkgs/tools/video/rav1e/default.nix +++ b/pkgs/tools/video/rav1e/default.nix @@ -3,8 +3,11 @@ , stdenv , rustPlatform , fetchCrate -, nasm +, pkg-config , cargo-c +, libgit2 +, nasm +, zlib , libiconv , Security }: @@ -24,7 +27,9 @@ in rustPlatform.buildRustPackage rec { auditable = true; # TODO: remove when this is the default - nativeBuildInputs = [ nasm cargo-c ]; + depsBuildBuild = [ pkg-config ]; + + nativeBuildInputs = [ cargo-c libgit2 nasm zlib ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv