···112112 if (nugetDeps != null) then
113113 if lib.isDerivation nugetDeps
114114 then nugetDeps
115115- else mkNugetDeps { inherit name; nugetDeps = import nugetDeps; }
115115+ else mkNugetDeps {
116116+ inherit name;
117117+ nugetDeps = import nugetDeps;
118118+ sourceFile = nugetDeps;
119119+ }
116120 else throw "Defining the `nugetDeps` attribute is required, as to lock the NuGet dependencies. This file can be generated by running the `passthru.fetch-deps` script.";
117121118122 # contains the actual package dependencies
···138142 name = "${name}-nuget-source";
139143 paths = [ dependenciesSource sdkSource ];
140144 };
145145+146146+ nugetDepsFile = _nugetDeps.sourceFile;
141147in
142148stdenvNoCC.mkDerivation (args // {
143149 nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [
···180186 # Note that toString is necessary here as it results in the path at
181187 # eval time (i.e. to the file in your local Nixpkgs checkout) rather
182188 # than the Nix store path of the path after it's been imported.
183183- if lib.isPath nugetDeps && !lib.hasPrefix "${builtins.storeDir}/" (toString nugetDeps)
184184- then toString nugetDeps
189189+ if lib.isPath nugetDepsFile && !lib.hasPrefix "${builtins.storeDir}/" (toString nugetDepsFile)
190190+ then toString nugetDepsFile
185191 else ''$(mktemp -t "${pname}-deps-XXXXXX.nix")'';
186192 in
187193 writeShellScript "fetch-${pname}-deps" ''