rizin: wrapper fixes

1. Set cutterPlugins to cutter.plugins rather than rizin.plugins which
it was set to by mistake
2. Remove Rizin binaries from Cutter wrapper, because they aren't
actually used by Cutter and if the user needs those binaries they
should install Rizin separately

authored by chayleaf and committed by Anderson Torres 2fb2f399 8a30e105

+22 -24
+2 -2
pkgs/development/tools/analysis/rizin/cutter.nix
··· 47 }; 48 }; 49 withPlugins = filter: pkgs.callPackage ./wrapper.nix { 50 - unwrapped = cutter; 51 - inherit rizin; 52 plugins = filter plugins; 53 }; 54 };
··· 47 }; 48 }; 49 withPlugins = filter: pkgs.callPackage ./wrapper.nix { 50 + inherit rizin cutter; 51 + isCutter = true; 52 plugins = filter plugins; 53 }; 54 };
+1 -1
pkgs/development/tools/analysis/rizin/default.nix
··· 118 sigdb = pkgs.callPackage ./sigdb.nix { }; 119 }; 120 withPlugins = filter: pkgs.callPackage ./wrapper.nix { 121 - unwrapped = rizin; 122 plugins = filter plugins; 123 }; 124 };
··· 118 sigdb = pkgs.callPackage ./sigdb.nix { }; 119 }; 120 withPlugins = filter: pkgs.callPackage ./wrapper.nix { 121 + inherit rizin; 122 plugins = filter plugins; 123 }; 124 };
+18 -20
pkgs/development/tools/analysis/rizin/wrapper.nix
··· 1 { lib 2 , makeWrapper 3 , symlinkJoin 4 - , unwrapped 5 , plugins 6 - # NIX_RZ_PREFIX only changes where *Rizin* locates files (plugins, 7 - # themes, etc). But we must change it even for wrapping Cutter, because 8 - # Cutter plugins often have associated Rizin plugins. This means that 9 - # NIX_RZ_PREFIX must always contain Rizin files, even if we only wrap 10 - # Cutter - so for Cutter, include Rizin to symlinkJoin paths. 11 - , rizin ? null 12 }: 13 14 symlinkJoin { 15 name = "${unwrapped.pname}-with-plugins-${unwrapped.version}"; 16 17 - paths = [ unwrapped ] ++ lib.optional (rizin != null) rizin ++ plugins; 18 19 nativeBuildInputs = [ makeWrapper ]; 20 ··· 24 25 postBuild = '' 26 rm $out/bin/* 27 - wrapperArgs=(--set NIX_RZ_PREFIX $out) 28 - if [ -d $out/share/rizin/cutter ]; then 29 - wrapperArgs+=(--prefix XDG_DATA_DIRS : $out/share) 30 - fi 31 for binary in $(ls ${unwrapped}/bin); do 32 makeWrapper ${unwrapped}/bin/$binary $out/bin/$binary "''${wrapperArgs[@]}" 33 done 34 - ${lib.optionalString (rizin != null) '' 35 - for binary in $(ls ${rizin}/bin); do 36 - makeWrapper ${rizin}/bin/$binary $out/bin/$binary "''${wrapperArgs[@]}" 37 - done 38 - ''} 39 ''; 40 41 meta = unwrapped.meta // { 42 - # prefer wrapped over unwrapped, prefer cutter wrapper over rizin wrapper 43 - # (because cutter versions of plugins also contain rizin plugins) 44 - priority = (unwrapped.meta.priority or 0) - (if rizin != null then 2 else 1); 45 }; 46 }
··· 1 { lib 2 , makeWrapper 3 , symlinkJoin 4 , plugins 5 + , rizin 6 + , isCutter ? false 7 + , cutter 8 }: 9 10 + let 11 + unwrapped = if isCutter then cutter else rizin; 12 + in 13 symlinkJoin { 14 name = "${unwrapped.pname}-with-plugins-${unwrapped.version}"; 15 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 21 + # symlinkJoin paths. 22 + paths = [ unwrapped ] ++ lib.optional isCutter rizin ++ plugins; 23 24 nativeBuildInputs = [ makeWrapper ]; 25 ··· 29 30 postBuild = '' 31 rm $out/bin/* 32 + wrapperArgs=(--set NIX_RZ_PREFIX $out${ 33 + lib.optionalString isCutter " --prefix XDG_DATA_DIRS : $out/share" 34 + }) 35 for binary in $(ls ${unwrapped}/bin); do 36 makeWrapper ${unwrapped}/bin/$binary $out/bin/$binary "''${wrapperArgs[@]}" 37 done 38 ''; 39 40 meta = unwrapped.meta // { 41 + # prefer wrapped over unwrapped 42 + priority = (unwrapped.meta.priority or 0) - 1; 43 }; 44 }
+1 -1
pkgs/top-level/all-packages.nix
··· 19802 19803 cutter = libsForQt5.callPackage ../development/tools/analysis/rizin/cutter.nix { }; 19804 19805 - cutterPlugins = recurseIntoAttrs rizin.plugins; 19806 19807 ragel = ragelStable; 19808
··· 19802 19803 cutter = libsForQt5.callPackage ../development/tools/analysis/rizin/cutter.nix { }; 19804 19805 + cutterPlugins = recurseIntoAttrs cutter.plugins; 19806 19807 ragel = ragelStable; 19808