dotnetenv: editorconfig fixes
This commit is contained in:
parent
b8f130e2b4
commit
4482e5ec2c
@ -16,20 +16,20 @@ assert modifyPublicMain -> mainClassFile != null;
|
|||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
|
|
||||||
buildInputs = [ dotnetfx ];
|
buildInputs = [ dotnetfx ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd ${baseDir}
|
cd ${baseDir}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
${stdenv.lib.optionalString modifyPublicMain ''
|
${stdenv.lib.optionalString modifyPublicMain ''
|
||||||
sed -i -e "s|static void Main|public static void Main|" ${mainClassFile}
|
sed -i -e "s|static void Main|public static void Main|" ${mainClassFile}
|
||||||
''}
|
''}
|
||||||
${preBuild}
|
${preBuild}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
addDeps()
|
addDeps()
|
||||||
{
|
{
|
||||||
@ -39,44 +39,44 @@ stdenv.mkDerivation {
|
|||||||
do
|
do
|
||||||
windowsPath=$(cygpath --windows $i)
|
windowsPath=$(cygpath --windows $i)
|
||||||
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
|
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
|
||||||
|
|
||||||
addDeps $i
|
addDeps $i
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in ${toString assemblyInputs}
|
for i in ${toString assemblyInputs}
|
||||||
do
|
do
|
||||||
windowsPath=$(cygpath --windows $i)
|
windowsPath=$(cygpath --windows $i)
|
||||||
echo "Using assembly path: $windowsPath"
|
echo "Using assembly path: $windowsPath"
|
||||||
|
|
||||||
if [ "$assemblySearchPaths" = "" ]
|
if [ "$assemblySearchPaths" = "" ]
|
||||||
then
|
then
|
||||||
assemblySearchPaths="$windowsPath"
|
assemblySearchPaths="$windowsPath"
|
||||||
else
|
else
|
||||||
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
|
assemblySearchPaths="$assemblySearchPaths;$windowsPath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
addDeps $i
|
addDeps $i
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Assembly search paths are: $assemblySearchPaths"
|
echo "Assembly search paths are: $assemblySearchPaths"
|
||||||
|
|
||||||
if [ "$assemblySearchPaths" != "" ]
|
if [ "$assemblySearchPaths" != "" ]
|
||||||
then
|
then
|
||||||
echo "Using assembly search paths args: $assemblySearchPathsArg"
|
echo "Using assembly search paths args: $assemblySearchPathsArg"
|
||||||
export AssemblySearchPaths=$assemblySearchPaths
|
export AssemblySearchPaths=$assemblySearchPaths
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
MSBuild.exe ${toString slnFile} /nologo /t:${targets} /p:IntermediateOutputPath=$(cygpath --windows $out)\\ /p:OutputPath=$(cygpath --windows $out)\\ /verbosity:${verbosity} ${options}
|
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
|
# Because .NET assemblies store strings as UTF-16 internally, we cannot detect
|
||||||
# hashes. Therefore a text files containing the proper paths is created
|
# hashes. Therefore a text files containing the proper paths is created
|
||||||
# We can also use this file the propagate transitive dependencies.
|
# We can also use this file the propagate transitive dependencies.
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
|
||||||
for i in ${toString assemblyInputs}
|
for i in ${toString assemblyInputs}
|
||||||
do
|
do
|
||||||
echo $i >> $out/nix-support/dotnet-assemblies
|
echo $i >> $out/nix-support/dotnet-assemblies
|
||||||
|
@ -10,7 +10,7 @@ let dotnetenv =
|
|||||||
buildWrapper = import ./wrapper.nix {
|
buildWrapper = import ./wrapper.nix {
|
||||||
inherit dotnetenv;
|
inherit dotnetenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (dotnetfx) assembly20Path wcfPath referenceAssembly30Path referenceAssembly35Path;
|
inherit (dotnetfx) assembly20Path wcfPath referenceAssembly30Path referenceAssembly35Path;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -36,25 +36,25 @@ dotnetenv.buildSolution {
|
|||||||
do
|
do
|
||||||
windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
|
windowsPath=$(cygpath --windows $i | sed 's|\\|\\\\|g')
|
||||||
assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
|
assemblySearchArray="$assemblySearchArray @\"$windowsPath\""
|
||||||
|
|
||||||
addRuntimeDeps $i
|
addRuntimeDeps $i
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g')
|
export exePath=$(cygpath --windows $(find ${application} -name \*.exe) | sed 's|\\|\\\\|g')
|
||||||
|
|
||||||
# Generate assemblySearchPaths string array contents
|
# Generate assemblySearchPaths string array contents
|
||||||
for path in ${toString assemblyInputs}
|
for path in ${toString assemblyInputs}
|
||||||
do
|
do
|
||||||
assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", "
|
assemblySearchArray="$assemblySearchArray @\"$(cygpath --windows $path | sed 's|\\|\\\\|g')\", "
|
||||||
addRuntimeDeps $path
|
addRuntimeDeps $path
|
||||||
done
|
done
|
||||||
|
|
||||||
sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \
|
sed -e "s|@ROOTNAMESPACE@|${namespace}Wrapper|" \
|
||||||
-e "s|@ASSEMBLYNAME@|${namespace}|" \
|
-e "s|@ASSEMBLYNAME@|${namespace}|" \
|
||||||
Wrapper/Wrapper.csproj.in > Wrapper/Wrapper.csproj
|
Wrapper/Wrapper.csproj.in > Wrapper/Wrapper.csproj
|
||||||
|
|
||||||
sed -e "s|@NAMESPACE@|${namespace}|g" \
|
sed -e "s|@NAMESPACE@|${namespace}|g" \
|
||||||
-e "s|@MAINCLASSNAME@|${mainClassName}|g" \
|
-e "s|@MAINCLASSNAME@|${mainClassName}|g" \
|
||||||
-e "s|@EXEPATH@|$exePath|g" \
|
-e "s|@EXEPATH@|$exePath|g" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user