From 0b700c72b77c2dda8ae62b03ad6a9962f4f2d5aa Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 12 Nov 2024 15:20:52 +0000 Subject: [PATCH 1/2] Revert "rav1e: use new Darwin SDK pattern" Too many rebuilds. This reverts commit c4a4f958cb5af702f61f88d0e762af1700c6a705. --- pkgs/by-name/ra/rav1e/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ra/rav1e/package.nix b/pkgs/by-name/ra/rav1e/package.nix index 523b8e1de6a0..34dda9e57e3e 100644 --- a/pkgs/by-name/ra/rav1e/package.nix +++ b/pkgs/by-name/ra/rav1e/package.nix @@ -5,6 +5,8 @@ rustPlatform, fetchCrate, cargo-c, + darwin, + libiconv, nasm, nix-update-script, testers, @@ -27,6 +29,11 @@ rustPlatform.buildRustPackage rec { nasm ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + libiconv + darwin.apple_sdk.frameworks.Security + ]; + postPatch = '' # remove feature that requires libgit2 and is only used to print a version string From 10002648a5f59927bb759e65135f2626f577976b Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 12 Nov 2024 15:21:01 +0000 Subject: [PATCH 2/2] Revert "rav1e: remove build-time dependency on libgit2" Too many rebuilds. This reverts commit 3c6420ad8281971978d743623e2cb73becabfc77. --- pkgs/by-name/ra/rav1e/package.nix | 36 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/ra/rav1e/package.nix b/pkgs/by-name/ra/rav1e/package.nix index 34dda9e57e3e..e8834ac131e4 100644 --- a/pkgs/by-name/ra/rav1e/package.nix +++ b/pkgs/by-name/ra/rav1e/package.nix @@ -4,12 +4,15 @@ stdenv, rustPlatform, fetchCrate, + pkg-config, cargo-c, darwin, + libgit2, libiconv, nasm, nix-update-script, testers, + zlib, rav1e, }: @@ -24,29 +27,28 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-VyQ6n2kIJ7OjK6Xlf0T0GNsBvgESRETzKZDZzAn8ZuY="; + depsBuildBuild = [ pkg-config ]; + nativeBuildInputs = [ cargo-c + libgit2 nasm ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - libiconv - darwin.apple_sdk.frameworks.Security - ]; + buildInputs = + [ zlib ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + libiconv + darwin.apple_sdk.frameworks.Security + ]; - postPatch = - '' - # remove feature that requires libgit2 and is only used to print a version string - substituteInPlace Cargo.toml --replace-fail '"git_version",' "" - '' - + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' - # Darwin uses `llvm-strip`, which results in link errors when using `-x` to strip the asm library - # and linking it with cctools ld64. - substituteInPlace build.rs --replace-fail '.arg("-x")' '.arg("-S")' - - # Thin LTO doesn’t appear to work with Rust 1.79. rav1e fail to build when building fern. - substituteInPlace Cargo.toml --replace-fail 'lto = "thin"' 'lto = "fat"' - ''; + # 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.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' + substituteInPlace build.rs --replace-fail '.arg("-x")' '.arg("-S")' + # Thin LTO doesn’t appear to work with Rust 1.79. rav1e fail to build when building fern. + substituteInPlace Cargo.toml --replace-fail 'lto = "thin"' 'lto = "fat"' + ''; checkType = "debug";