From 8749dbcdaa2c408080229bc1cac92cce7a0743df Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Mon, 8 Jun 2026 02:05:45 +0200 Subject: [PATCH] oculante: don't depend on cargoDeps internal directory naming --- ...sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch | 4 ++-- pkgs/by-name/oc/oculante/package.nix | 16 +++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/oc/oculante/libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch b/pkgs/by-name/oc/oculante/libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch index 744d0a05da55..01d78bed306f 100644 --- a/pkgs/by-name/oc/oculante/libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch +++ b/pkgs/by-name/oc/oculante/libaom-sys-0.17.2+libaom.3.11.0-cmake-nasm-fix.patch @@ -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). diff --git a/pkgs/by-name/oc/oculante/package.nix b/pkgs/by-name/oc/oculante/package.nix index c834df0ca4bd..f1c0f2df5c3f 100644 --- a/pkgs/by-name/oc/oculante/package.nix +++ b/pkgs/by-name/oc/oculante/package.nix @@ -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. - # - ./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. + # + 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