11 unwrapped = if isCutter then cutter else rizin;
14 name = "${unwrapped.pname}-with-plugins-${unwrapped.version}";
16 # NIX_RZ_PREFIX only changes where *Rizin* locates files (plugins,
17 # themes, etc). But we must change it even for wrapping Cutter, because
18 # Cutter plugins often have associated Rizin plugins. This means that
19 # $out (which NIX_RZ_PREFIX will be set to) must always contain Rizin
20 # files, even if we only wrap Cutter - so for Cutter, include Rizin to
22 paths = [ unwrapped ] ++ lib.optional isCutter rizin ++ plugins;
24 nativeBuildInputs = [ makeWrapper ];
32 wrapperArgs=(--set NIX_RZ_PREFIX $out${
33 lib.optionalString isCutter " --prefix XDG_DATA_DIRS : $out/share"
35 for binary in $(ls ${unwrapped}/bin); do
36 makeWrapper ${unwrapped}/bin/$binary $out/bin/$binary "''${wrapperArgs[@]}"
40 meta = unwrapped.meta // {
41 # prefer wrapped over unwrapped
42 priority = (unwrapped.meta.priority or 0) - 1;