about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2021-10-25 10:21:49 +0200
committerGitHub <noreply@github.com>2021-10-25 10:21:49 +0200
commit8e18c70837aa01ade3718cd0fd35b649b3a2cf52 (patch)
tree75d7a5ad2651af90cd5d6d5b0fcc22f005a8aaf5 /pkgs/build-support
parente674a4637730906d080924819870ea76d9e96896 (diff)
parenta5e3a7e16c274d7bc2624758dffcf12d817b13be (diff)
Merge pull request #142218 from IvarWithoutBones/use/nbxporer-buildDotnetModule
{btcpayserver,nbxplorer}: use buildDotnetModule
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/build-dotnet-module/default.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/build-support/build-dotnet-module/default.nix b/pkgs/build-support/build-dotnet-module/default.nix
index 0161c101e5bf2..3701f254d0ca4 100644
--- a/pkgs/build-support/build-dotnet-module/default.nix
+++ b/pkgs/build-support/build-dotnet-module/default.nix
@@ -51,6 +51,8 @@ let
   });
 
   package = stdenv.mkDerivation (args // {
+    inherit buildType;
+
     nativeBuildInputs = args.nativeBuildInputs or [] ++ [ dotnet-sdk dotnetPackages.Nuget cacert makeWrapper ];
 
     # Stripping breaks the executable
@@ -71,7 +73,7 @@ let
       mkdir -p $HOME/.nuget/NuGet
       cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet
 
-      dotnet restore ${lib.escapeShellArg projectFile} \
+      dotnet restore "$projectFile" \
         ${lib.optionalString (!enableParallelBuilding) "--disable-parallel"} \
         -p:ContinuousIntegrationBuild=true \
         -p:Deterministic=true \
@@ -85,13 +87,13 @@ let
     buildPhase = args.buildPhase or ''
       runHook preBuild
 
-      dotnet build ${lib.escapeShellArg projectFile} \
+      dotnet build "$projectFile" \
         -maxcpucount:${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"} \
         -p:BuildInParallel=${if enableParallelBuilding then "true" else "false"} \
         -p:ContinuousIntegrationBuild=true \
         -p:Deterministic=true \
         -p:Version=${args.version} \
-        --configuration ${buildType} \
+        --configuration "$buildType" \
         --no-restore \
         "''${dotnetBuildFlags[@]}"  \
         "''${dotnetFlags[@]}"
@@ -102,17 +104,17 @@ let
     installPhase = args.installPhase or ''
       runHook preInstall
 
-      dotnet publish ${lib.escapeShellArg projectFile} \
+      dotnet publish "$projectFile" \
         -p:ContinuousIntegrationBuild=true \
         -p:Deterministic=true \
         --output $out/lib/${args.pname} \
-        --configuration ${buildType} \
+        --configuration "$buildType" \
         --no-build \
         --no-self-contained \
         "''${dotnetInstallFlags[@]}"  \
         "''${dotnetFlags[@]}"
     '' + (if executables != null then ''
-      for executable in ''${executables}; do
+      for executable in $executables; do
         execPath="$out/lib/${args.pname}/$executable"
 
         if [[ -f "$execPath" && -x "$execPath" ]]; then
@@ -120,7 +122,7 @@ let
             --set DOTNET_ROOT "${dotnet-runtime}" \
             --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
             "''${gappsWrapperArgs[@]}" \
-            ''${makeWrapperArgs}
+            "''${makeWrapperArgs[@]}"
         else
           echo "Specified binary \"$executable\" is either not an executable, or does not exist!"
           exit 1
@@ -133,7 +135,7 @@ let
             --set DOTNET_ROOT "${dotnet-runtime}" \
             --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
             "''${gappsWrapperArgs[@]}" \
-            ''${makeWrapperArgs}
+            "''${makeWrapperArgs[@]}"
         fi
       done
     '') + ''