8 , verbosity ? "detailed"
9 , options ? "/p:Configuration=Debug;Platform=Win32"
15 , modifyPublicMain ? true
19 application = dotnetenv.buildSolution {
20 inherit name src baseDir slnFile targets verbosity;
21 inherit options assemblyInputs preBuild;
22 inherit modifyPublicMain mainClassFile;
25 dotnetenv.buildSolution {
26 name = "${name}-wrapper";
28 slnFile = "Wrapper.sln";
29 assemblyInputs = [ application ];
32 if [ -f $1/nix-support/dotnet-assemblies ]; then
33 for i in $(cat $1/nix-support/dotnet-assemblies); do
34 windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
35 assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
42 export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g')
44 # Generate assemblySearchPaths string array contents
45 for path in ${toString assemblyInputs}; do
46 assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", "
50 sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \
51 -e "s|@ASSEMBLYNAME@|${namespace}|" \
52 Wrapper/Wrapper.csproj.in > Wrapper/Wrapper.csproj
54 sed -e "s|@NAMESPACE@|${namespace}|g" \
55 -e "s|@MAINCLASSNAME@|${mainClassName}|g" \
56 -e "s|@EXEPATH@|$exePath|g" \
57 -e "s|@ASSEMBLYSEARCHPATH@|$assemblySearchArray|" \
58 Wrapper/Wrapper.cs.in > Wrapper/Wrapper.cs