diff options
Diffstat (limited to 'pkgs/build-support/dotnet')
6 files changed, 35 insertions, 36 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index 4548616c7d80e..e2ddee48cc006 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -84,8 +84,6 @@ , dotnet-sdk ? dotnetCorePackages.sdk_6_0 # The dotnet runtime to use. , dotnet-runtime ? dotnetCorePackages.runtime_6_0 - # The dotnet SDK to run tests against. This can differentiate from the SDK compiled against. -, dotnet-test-sdk ? dotnet-sdk , ... } @ args: @@ -96,7 +94,7 @@ let else dotnet-sdk.meta.platforms; inherit (callPackage ./hooks { - inherit dotnet-sdk dotnet-test-sdk disabledTests nuget-source dotnet-runtime runtimeDeps buildType; + inherit dotnet-sdk disabledTests nuget-source dotnet-runtime runtimeDeps buildType; runtimeId = if runtimeId != null then runtimeId diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix index 7012ff36a4a55..44091604f5c2c 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix @@ -8,7 +8,6 @@ , makeSetupHook , makeWrapper , dotnet-sdk -, dotnet-test-sdk , disabledTests , nuget-source , dotnet-runtime @@ -22,10 +21,9 @@ let libraryPath = lib.makeLibraryPath runtimeDeps; in { - dotnetConfigureHook = callPackage ({ }: - makeSetupHook { + dotnetConfigureHook = makeSetupHook + { name = "dotnet-configure-hook"; - propagatedBuildInputs = [ dotnet-sdk nuget-source ]; substitutions = { nugetSource = nuget-source; dynamicLinker = "${stdenv.cc}/nix-support/dynamic-linker"; @@ -38,45 +36,47 @@ in ]; inherit runtimeId; }; - } ./dotnet-configure-hook.sh) { }; + } + ./dotnet-configure-hook.sh; - dotnetBuildHook = callPackage ({ }: - makeSetupHook { + dotnetBuildHook = makeSetupHook + { name = "dotnet-build-hook"; - propagatedBuildInputs = [ dotnet-sdk ]; substitutions = { inherit buildType runtimeId; }; - } ./dotnet-build-hook.sh) { }; + } + ./dotnet-build-hook.sh; - dotnetCheckHook = callPackage ({ }: - makeSetupHook { + dotnetCheckHook = makeSetupHook + { name = "dotnet-check-hook"; - propagatedBuildInputs = [ dotnet-test-sdk ]; substitutions = { inherit buildType runtimeId libraryPath; - disabledTests = lib.optionalString (disabledTests != []) - (let - escapedNames = lib.lists.map (n: lib.replaceStrings [","] ["%2C"] n) disabledTests; - filters = lib.lists.map (n: "FullyQualifiedName!=${n}") escapedNames; - in - "${lib.concatStringsSep "&" filters}"); + disabledTests = lib.optionalString (disabledTests != [ ]) + ( + let + escapedNames = lib.lists.map (n: lib.replaceStrings [ "," ] [ "%2C" ] n) disabledTests; + filters = lib.lists.map (n: "FullyQualifiedName!=${n}") escapedNames; + in + "${lib.concatStringsSep "&" filters}" + ); }; - } ./dotnet-check-hook.sh) { }; + } + ./dotnet-check-hook.sh; - dotnetInstallHook = callPackage ({ }: - makeSetupHook { + dotnetInstallHook = makeSetupHook + { name = "dotnet-install-hook"; - propagatedBuildInputs = [ dotnet-sdk ]; substitutions = { inherit buildType runtimeId; }; - } ./dotnet-install-hook.sh) { }; + } + ./dotnet-install-hook.sh; - dotnetFixupHook = callPackage ({ }: - makeSetupHook { + dotnetFixupHook = makeSetupHook + { name = "dotnet-fixup-hook"; - propagatedBuildInputs = [ dotnet-runtime ]; substitutions = { dotnetRuntime = dotnet-runtime; runtimeDeps = libraryPath; @@ -85,5 +85,6 @@ in dirname = "${coreutils}/bin/dirname"; realpath = "${coreutils}/bin/realpath"; }; - } ./dotnet-fixup-hook.sh) { }; + } + ./dotnet-fixup-hook.sh; } diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh index 0acfeced9b169..798109291f92a 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh @@ -41,7 +41,7 @@ dotnetBuildHook() { runtimeIdFlags+=("--runtime @runtimeId@") fi - env dotnet build ${project-} \ + dotnet build ${project-} \ -maxcpucount:$maxCpuFlag \ -p:BuildInParallel=$parallelBuildFlag \ -p:ContinuousIntegrationBuild=true \ diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh index 507721ef98181..f19bf9f620feb 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh @@ -22,7 +22,7 @@ dotnetCheckHook() { runtimeIdFlags=("--runtime @runtimeId@") fi - env "LD_LIBRARY_PATH=@libraryPath@" \ + LD_LIBRARY_PATH="@libraryPath@" \ dotnet test "$project" \ -maxcpucount:$maxCpuFlag \ -p:ContinuousIntegrationBuild=true \ diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh index c046fc3c306b1..3eb0d4e1f2309 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh @@ -15,7 +15,7 @@ dotnetConfigureHook() { dotnetRestore() { local -r project="${1-}" - env dotnet restore ${project-} \ + dotnet restore ${project-} \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ --runtime "@runtimeId@" \ @@ -43,7 +43,7 @@ EOF find -name paket.dependencies -exec sed -i 's+source .*+source @nugetSource@/lib+g' {} \; find -name paket.lock -exec sed -i 's+remote:.*+remote: @nugetSource@/lib+g' {} \; - env dotnet tool restore --add-source "@nugetSource@/lib" + dotnet tool restore --add-source "@nugetSource@/lib" (( "${#projectFile[@]}" == 0 )) && dotnetRestore diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh index d832eac288096..ed754d8ffcad9 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh @@ -27,7 +27,7 @@ dotnetInstallHook() { runtimeIdFlags+=("--runtime @runtimeId@") fi - env dotnet publish ${project-} \ + dotnet publish ${project-} \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ --output "${installPath-$out/lib/$pname}" \ @@ -40,7 +40,7 @@ dotnetInstallHook() { dotnetPack() { local -r project="${1-}" - env dotnet pack ${project-} \ + dotnet pack ${project-} \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ --output "$out/share" \ |