diff options
author | Ivan Trubach <mr.trubach@icloud.com> | 2024-05-22 03:12:30 +0300 |
---|---|---|
committer | Ivan Trubach <mr.trubach@icloud.com> | 2024-05-22 03:12:30 +0300 |
commit | cfd1bd614134e3705c380c217f6c34bb6621d051 (patch) | |
tree | 8f8f4cd3ae4ca4faaf650defdd71b9ba3d56b116 /pkgs/build-support | |
parent | 0e64e645c92333257fa9bc78cbe31675c715533b (diff) |
buildDotnetModule: remove unnecessary callPackage calls
This change removes no-op callPackage calls and reformats the file with nixpkgs-fmt.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix | 49 |
1 files changed, 28 insertions, 21 deletions
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 81becef9b30bd..44091604f5c2c 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/default.nix @@ -21,8 +21,8 @@ let libraryPath = lib.makeLibraryPath runtimeDeps; in { - dotnetConfigureHook = callPackage ({ }: - makeSetupHook { + dotnetConfigureHook = makeSetupHook + { name = "dotnet-configure-hook"; substitutions = { nugetSource = nuget-source; @@ -36,40 +36,46 @@ in ]; inherit runtimeId; }; - } ./dotnet-configure-hook.sh) { }; + } + ./dotnet-configure-hook.sh; - dotnetBuildHook = callPackage ({ }: - makeSetupHook { + dotnetBuildHook = makeSetupHook + { name = "dotnet-build-hook"; substitutions = { inherit buildType runtimeId; }; - } ./dotnet-build-hook.sh) { }; + } + ./dotnet-build-hook.sh; - dotnetCheckHook = callPackage ({ }: - makeSetupHook { + dotnetCheckHook = makeSetupHook + { name = "dotnet-check-hook"; 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"; substitutions = { inherit buildType runtimeId; }; - } ./dotnet-install-hook.sh) { }; + } + ./dotnet-install-hook.sh; - dotnetFixupHook = callPackage ({ }: - makeSetupHook { + dotnetFixupHook = makeSetupHook + { name = "dotnet-fixup-hook"; substitutions = { dotnetRuntime = dotnet-runtime; @@ -79,5 +85,6 @@ in dirname = "${coreutils}/bin/dirname"; realpath = "${coreutils}/bin/realpath"; }; - } ./dotnet-fixup-hook.sh) { }; + } + ./dotnet-fixup-hook.sh; } |