query
On this page

buildDotnetModule

pkgs.dotnetCorePackages.buildDotnetModule

Functor
Docs pulled from | This Revision | about 1 hour ago


Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.

Noogle detected

This is a Functor

Learn about functors

Implementation

The following is the current implementation of this function.

fnOrAttrs:
stdenvNoCC.mkDerivation (
  finalAttrs:
  let
    args = if lib.isFunction fnOrAttrs then fnOrAttrs (args' // finalAttrs) else fnOrAttrs;
    args' = transformArgs finalAttrs args;
    inherit (args')
      nugetDeps
      runtimeId
      meta
      dotnet-sdk
      ;
    args'' = removeAttrs args' [
      "nugetDeps"
      "runtimeId"
      "installPath"
      "executables"
      "projectFile"
      "projectReferences"
      "runtimeDeps"
      "disabledTests"
      "testProjectFile"
      "buildType"
      "selfContainedBuild"
      "useDotnet"
      "useAppHost"
      "dotnet-sdk"
    ];
  in
  if nugetDeps != null then
    addNuGetDeps {
      inherit nugetDeps;
      overrideFetchAttrs =
        old:
        lib.optionalAttrs ((args'.runtimeId or null) == null) rec {
          dotnetRuntimeIds = map (system: dotnetCorePackages.systemToDotnetRid system) meta.platforms;
          buildInputs =
            old.buildInputs
            ++ lib.concatLists (lib.attrValues (lib.getAttrs dotnetRuntimeIds dotnet-sdk.targetPackages));
        };
    } args'' finalAttrs
  else
    args''
)