mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Revert "rav1e: remove build-time dependency on libgit2" (#355456)
This commit is contained in:
commit
e6fa8c6399
@ -4,10 +4,15 @@
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchCrate,
|
||||
pkg-config,
|
||||
cargo-c,
|
||||
darwin,
|
||||
libgit2,
|
||||
libiconv,
|
||||
nasm,
|
||||
nix-update-script,
|
||||
testers,
|
||||
zlib,
|
||||
rav1e,
|
||||
}:
|
||||
|
||||
@ -22,21 +27,25 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-VyQ6n2kIJ7OjK6Xlf0T0GNsBvgESRETzKZDZzAn8ZuY=";
|
||||
|
||||
depsBuildBuild = [ pkg-config ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo-c
|
||||
libgit2
|
||||
nasm
|
||||
];
|
||||
|
||||
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) ''
|
||||
buildInputs =
|
||||
[ zlib ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
|
||||
# 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"'
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user