From 35671aabff6fcd9f6ea13741f51691b46712ab51 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 13 Sep 2024 07:12:08 +0100 Subject: [PATCH] dotnet/build-dotnet-module: fix eval of `fetch-deps` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- pkgs/build-support/dotnet/build-dotnet-module/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index 412747733bd6..25dd4f777c77 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -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; }); };