dotnetenv: editorconfig fixes

gstqt5
zowoq 2020-09-21 08:30:58 +10:00
parent b8f130e2b4
commit 4482e5ec2c
3 changed files with 21 additions and 21 deletions

View File

@ -16,20 +16,20 @@ assert modifyPublicMain -> mainClassFile != null;
stdenv.mkDerivation {
inherit name src;
buildInputs = [ dotnetfx ];
buildInputs = [ dotnetfx ];
preConfigure = ''
cd ${baseDir}
'';
preBuild = ''
${stdenv.lib.optionalString modifyPublicMain ''
sed -i -e "s|static void Main|public static void Main|" ${mainClassFile}
''}
${preBuild}
'';
installPhase = ''
addDeps()
{
@ -39,44 +39,44 @@ stdenv.mkDerivation {
do
windowsPath=$(cygpath --windows $i)
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
addDeps $i
done
fi
}
for i in ${toString assemblyInputs}
do
windowsPath=$(cygpath --windows $i)
windowsPath=$(cygpath --windows $i)
echo "Using assembly path: $windowsPath"
if [ "$assemblySearchPaths" = "" ]
then
assemblySearchPaths="$windowsPath"
else
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
fi
addDeps $i
done
echo "Assembly search paths are: $assemblySearchPaths"
if [ "$assemblySearchPaths" != "" ]
then
echo "Using assembly search paths args: $assemblySearchPathsArg"
export AssemblySearchPaths=$assemblySearchPaths
fi
mkdir -p $out
MSBuild.exe ${toString slnFile} /nologo /t:${targets} /p:IntermediateOutputPath=$(cygpath --windows $out)\\ /p:OutputPath=$(cygpath --windows $out)\\ /verbosity:${verbosity} ${options}
# Because .NET assemblies store strings as UTF-16 internally, we cannot detect
# hashes. Therefore a text files containing the proper paths is created
# We can also use this file the propagate transitive dependencies.
mkdir -p $out/nix-support
for i in ${toString assemblyInputs}
do
echo $i >> $out/nix-support/dotnet-assemblies

View File

@ -10,7 +10,7 @@ let dotnetenv =
buildWrapper = import ./wrapper.nix {
inherit dotnetenv;
};
inherit (dotnetfx) assembly20Path wcfPath referenceAssembly30Path referenceAssembly35Path;
};
in

View File

@ -36,25 +36,25 @@ dotnetenv.buildSolution {
do
windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
addRuntimeDeps $i
done
fi
}
export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g')
# Generate assemblySearchPaths string array contents
for path in ${toString assemblyInputs}
do
assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", "
addRuntimeDeps $path
done
sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \
-e "s|@ASSEMBLYNAME@|${namespace}|" \
Wrapper/Wrapper.csproj.in > Wrapper/Wrapper.csproj
sed -e "s|@NAMESPACE@|${namespace}|g" \
-e "s|@MAINCLASSNAME@|${mainClassName}|g" \
-e "s|@EXEPATH@|$exePath|g" \