mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
Merge pull request #218849 from Atemu/buildDotnetModule-put-dep-file-path-in-fetch-script
buildDotnetModule: point fetch-deps at module's deps file by default
This commit is contained in:
commit
d390c28a89
@ -168,6 +168,15 @@ stdenvNoCC.mkDerivation (args // {
|
||||
if runtimeId != null
|
||||
then [ runtimeId ]
|
||||
else map (system: dotnetCorePackages.systemToDotnetRid system) platforms;
|
||||
defaultDepsFile =
|
||||
# Wire in the nugetDeps file such that running the script with no args
|
||||
# runs it agains the correct deps file by default.
|
||||
# Note that toString is necessary here as it results in the path at
|
||||
# eval time (i.e. to the file in your local Nixpkgs checkout) rather
|
||||
# than the Nix store path of the path after it's been imported.
|
||||
if lib.isPath nugetDeps && !lib.hasPrefix "/nix/store/" (toString nugetDeps)
|
||||
then toString nugetDeps
|
||||
else ''$(mktemp -t "${pname}-deps-XXXXXX.nix")'';
|
||||
in
|
||||
writeShellScript "fetch-${pname}-deps" ''
|
||||
set -euo pipefail
|
||||
@ -238,7 +247,8 @@ stdenvNoCC.mkDerivation (args // {
|
||||
export DOTNET_NOLOGO=1
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
depsFile=$(realpath "''${1:-$(mktemp -t "${pname}-deps-XXXXXX.nix")}")
|
||||
depsFile=$(realpath "''${1:-${defaultDepsFile}}")
|
||||
echo Will write lockfile to "$depsFile"
|
||||
mkdir -p "$tmp/nuget_pkgs"
|
||||
|
||||
storeSrc="${srcOnly args}"
|
||||
|
Loading…
Reference in New Issue
Block a user