diff options
author | Zhaofeng Li <hello@zhaofeng.li> | 2021-05-30 15:29:16 -0700 |
---|---|---|
committer | Zhaofeng Li <hello@zhaofeng.li> | 2021-05-30 17:42:16 -0700 |
commit | 944e7fb9c25f2097f4655a78f70b346b92be22ea (patch) | |
tree | 47049214d15325e68fb9a4bda3dac0ead1e48bf5 /pkgs/tools/video | |
parent | 49399d64e4c96a4655cde45054a365f7436cb2cf (diff) |
rav1e: Fix cross-compiling
Diffstat (limited to 'pkgs/tools/video')
-rw-r--r-- | pkgs/tools/video/rav1e/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/tools/video/rav1e/default.nix b/pkgs/tools/video/rav1e/default.nix index 17c1b39a92c79..53e139cde3bbd 100644 --- a/pkgs/tools/video/rav1e/default.nix +++ b/pkgs/tools/video/rav1e/default.nix @@ -1,6 +1,8 @@ -{ stdenv, rustPlatform, fetchurl, fetchFromGitHub, lib, nasm, cargo-c, libiconv }: +{ stdenv, rustPlatform, rust, fetchurl, fetchFromGitHub, lib, nasm, cargo-c, libiconv }: -rustPlatform.buildRustPackage rec { +let + rustTargetPlatformSpec = rust.toRustTargetSpec stdenv.hostPlatform; +in rustPlatform.buildRustPackage rec { pname = "rav1e"; version = "0.4.1"; @@ -31,11 +33,11 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; postBuild = '' - cargo cbuild --release --frozen --prefix=${placeholder "out"} + cargo cbuild --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec} ''; postInstall = '' - cargo cinstall --release --frozen --prefix=${placeholder "out"} + cargo cinstall --release --frozen --prefix=${placeholder "out"} --target ${rustTargetPlatformSpec} ''; meta = with lib; { |