I use this to override the preFixup phase of searxng to replace the images:
(pkgs.searxng.overrideAttrs (finalAttrs: previousAttrs: {
preFixup =
previousAttrs.preFixup or ""
+ ''
cp ${self}/mods/searxng/searxng.png \
$out/share/static/themes/simple/img/searxng.png
cp ${self}/mods/searxng/searxng.svg \
$out/share/static/themes/simple/img/searxng.svg
'';
}))
It works great but every time I run sudo nixos-build switch
, the package rebuild itself.
I just want to replace 2 images in the final package. I tried using postInstall
but it also rebuild itself. How can I not trigger rebuild for that? Thanks!