@@ -224,7 +224,7 @@ let
224224 "''${dotnetInstallFlags[@]}" \
225225 "''${dotnetFlags[@]}"
226226 done
227− '' + (lib.optionalString packNupkg ''
227+ '' + lib.optionalString packNupkg ''
228228 for project in ''${projectFile[@]}; do
229229 dotnet pack "$project" \
230230 -p:ContinuousIntegrationBuild=true \
@@ -235,16 +235,24 @@ let
235235 "''${dotnetPackFlags[@]}" \
236236 "''${dotnetFlags[@]}"
237237 done
238− '') + (if executables != null then ''
239− for executable in $executables; do
238+ '' + ''
239+ runHook postInstall
240+ '';
241+
242+ preFixup = ''
243+ _wrapDotnetProgram() {
244+ makeWrapper "$1" "$out/bin/$(basename "$executable")" \
245+ --set DOTNET_ROOT "${dotnet-runtime}" \
246+ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
247+ "''${gappsWrapperArgs[@]}" \
248+ "''${makeWrapperArgs[@]}"
249+ }
250+ '' + (if executables != null then ''
251+ for executable in ''${executables[@]}; do
240252 execPath="$out/lib/${args.pname}/$executable"
241253
242254 if [[ -f "$execPath" && -x "$execPath" ]]; then
243− makeWrapper "$execPath" "$out/bin/$(basename "$executable")" \
244− --set DOTNET_ROOT "${dotnet-runtime}" \
245− --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
246− "''${gappsWrapperArgs[@]}" \
247− "''${makeWrapperArgs[@]}"
255+ _wrapDotnetProgram $execPath
248256 else
249257 echo "Specified binary \"$executable\" is either not an executable, or does not exist!"
250258 exit 1
@@ -253,16 +261,10 @@ let
253261 '' else ''
254262 for executable in $out/lib/${args.pname}/*; do
255263 if [[ -f "$executable" && -x "$executable" && "$executable" != *"dll"* ]]; then
256− makeWrapper "$executable" "$out/bin/$(basename "$executable")" \
257− --set DOTNET_ROOT "${dotnet-runtime}" \
258− --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
259− "''${gappsWrapperArgs[@]}" \
260− "''${makeWrapperArgs[@]}"
264+ _wrapDotnetProgram $executable
261265 fi
262266 done
263− '') + ''
264− runHook postInstall
265− '';
267+ '');
266268 });
267269in
268270 package