dotnet/build-dotnet-module: fix eval of fetch-deps

Without the change the eval fails as:

    $ nix build --no-link -f. csharp-ls.fetch-deps --show-trace
    error:
       … while evaluating a path segment
         at pkgs/build-support/dotnet/build-dotnet-module/default.nix:258:36:
          257|                   else
          258|                     ''$(mktemp -t "${finalAttrs.pname ? finalAttrs.finalPackage.name}-deps-XXXXXX.nix")'';
             |                                    ^
          259|                 nugetToNix = (nuget-to-nix.override { inherit dotnet-sdk; });

       error: cannot coerce a Boolean to a string: false

Switch from `?` operator (attribute presence predicate) to an `or`
("else" form).
This commit is contained in:
Sergei Trofimovich 2024-09-13 07:12:08 +01:00
parent b30526a67f
commit 35671aabff

View File

@ -255,7 +255,7 @@ let
if lib.isPath nugetDeps && !lib.isStorePath nugetDepsFile then
toString nugetDepsFile
else
''$(mktemp -t "${finalAttrs.pname ? finalAttrs.finalPackage.name}-deps-XXXXXX.nix")'';
''$(mktemp -t "${finalAttrs.pname or finalAttrs.finalPackage.name}-deps-XXXXXX.nix")'';
nugetToNix = (nuget-to-nix.override { inherit dotnet-sdk; });
};