From 4482e5ec2c205f7c1a17af58ccf44fd130bbe635 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Mon, 21 Sep 2020 08:30:58 +1000 Subject: [PATCH] dotnetenv: editorconfig fixes --- .../dotnetenv/build-solution.nix | 30 +++++++++---------- pkgs/build-support/dotnetenv/default.nix | 2 +- pkgs/build-support/dotnetenv/wrapper.nix | 10 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pkgs/build-support/dotnetenv/build-solution.nix b/pkgs/build-support/dotnetenv/build-solution.nix index 62370d361cd0..57af1fe9bd49 100644 --- a/pkgs/build-support/dotnetenv/build-solution.nix +++ b/pkgs/build-support/dotnetenv/build-solution.nix @@ -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 diff --git a/pkgs/build-support/dotnetenv/default.nix b/pkgs/build-support/dotnetenv/default.nix index 781a5ba8c0ee..c7145504eb7b 100644 --- a/pkgs/build-support/dotnetenv/default.nix +++ b/pkgs/build-support/dotnetenv/default.nix @@ -10,7 +10,7 @@ let dotnetenv = buildWrapper = import ./wrapper.nix { inherit dotnetenv; }; - + inherit (dotnetfx) assembly20Path wcfPath referenceAssembly30Path referenceAssembly35Path; }; in diff --git a/pkgs/build-support/dotnetenv/wrapper.nix b/pkgs/build-support/dotnetenv/wrapper.nix index 4b07fc27dcb0..423303c3084a 100644 --- a/pkgs/build-support/dotnetenv/wrapper.nix +++ b/pkgs/build-support/dotnetenv/wrapper.nix @@ -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" \