various: don't depend on cargoDeps internal directory naming (#529334)
This commit is contained in:
@@ -47,7 +47,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
cargoHash = "sha256-JhsoIQZrU4GVcs/TCIug6y/84gODyEWl0Bl2jRNxL5Y=";
|
||||
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace $cargoDepsCopy/source-registry-0/libappindicator-sys-*/src/lib.rs \
|
||||
substituteInPlace $cargoDepsCopy/*/libappindicator-sys-*/src/lib.rs \
|
||||
--replace-fail libayatana-appindicator3.so.1 '${libayatana-appindicator}/lib/libayatana-appindicator3.so.1'
|
||||
'';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
cargoHash = "sha256-rE7SErOhl2fcmvLairq+mvdnbDIk1aPo3eYqwRx5kkA=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace $cargoDepsCopy/source-registry-0/sdl2-sys-0.37.0/SDL/CMakeLists.txt \
|
||||
substituteInPlace $cargoDepsCopy/*/sdl2-sys-0.37.0/SDL/CMakeLists.txt \
|
||||
--replace-fail "cmake_minimum_required(VERSION 3.0.0)" "cmake_minimum_required(VERSION 3.0.0...3.5)" \
|
||||
--replace-fail "cmake_minimum_required(VERSION 3.4)" "cmake_minimum_required(VERSION 3.4...3.5)"
|
||||
'';
|
||||
|
||||
@@ -92,7 +92,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
-exec sed -i -e '/cbindgen::Builder::new/{:l;/write_to_file/!{N;bl};d}' {} +
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace "$cargoDepsCopy"/source-registry-0/libappindicator-sys-*/src/lib.rs \
|
||||
substituteInPlace "$cargoDepsCopy"/*/libappindicator-sys-*/src/lib.rs \
|
||||
--replace-fail 'libayatana-appindicator3.so.1' '${libayatana-appindicator}/lib/libayatana-appindicator3.so.1'
|
||||
'';
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
# The libappindicator_sys crate loads these libraries at runtime
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace $cargoDepsCopy/source-registry-0/libappindicator-sys-*/src/lib.rs \
|
||||
substituteInPlace $cargoDepsCopy/*/libappindicator-sys-*/src/lib.rs \
|
||||
--replace-fail \
|
||||
"libayatana-appindicator3.so.1" \
|
||||
"${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- a/libaom-sys-0.17.2+libaom.3.11.0/vendor/build/cmake/aom_optimization.cmake
|
||||
+++ b/libaom-sys-0.17.2+libaom.3.11.0/vendor/build/cmake/aom_optimization.cmake
|
||||
--- a/vendor/build/cmake/aom_optimization.cmake
|
||||
+++ b/vendor/build/cmake/aom_optimization.cmake
|
||||
@@ -212,7 +212,7 @@ endfunction()
|
||||
# Currently checks only for presence of required object formats and support for
|
||||
# the -Ox argument (multipass optimization).
|
||||
|
||||
@@ -67,17 +67,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
"--skip=thumbnails::test_thumbs" # broken as of v0.9.2
|
||||
];
|
||||
|
||||
patches = [
|
||||
# The below patch is needed to fix this build, until the upstream dependency (libavif-rs) fixes the problem.
|
||||
# The explicit `patchFlags` can also be removed when this patch becomes obsolete.
|
||||
# <https://github.com/njaard/libavif-rs/issues/122>
|
||||
./libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch
|
||||
];
|
||||
|
||||
patchFlags = [
|
||||
"-p1"
|
||||
"--directory=../${finalAttrs.pname}-${finalAttrs.version}-vendor/source-registry-0"
|
||||
];
|
||||
# The below patch is needed to fix this build, until the upstream dependency (libavif-rs) fixes the problem.
|
||||
# <https://github.com/njaard/libavif-rs/issues/122>
|
||||
postPatch = ''
|
||||
patch -p1 -d "$cargoDepsCopy"/*/libaom-sys-0.17.2+libaom.3.11.0 -i ${./libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 $src/res/icons/icon.png $out/share/icons/hicolor/128x128/apps/oculante.png
|
||||
|
||||
Reference in New Issue
Block a user