summary refs log tree commit diff
path: root/pkgs/build-support/dotnet/build-dotnet-module/default.nix
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2022-06-21 15:37:15 +0200
committerzimbatm <zimbatm@zimbatm.com>2022-06-21 15:45:52 +0200
commitba2f31b6db0d71969bb1fcbeaed30925a935a5b0 (patch)
tree7bf1aaaf81819041f6ab22e15762af1d3f8106fa /pkgs/build-support/dotnet/build-dotnet-module/default.nix
parent0d68d7c857fe301d49cdcd56130e0beea4ecd5aa (diff)
downloadnixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar.gz
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar.bz2
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar.lz
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar.xz
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.tar.zst
nixpkgs-ba2f31b6db0d71969bb1fcbeaed30925a935a5b0.zip
buildDotnetModule: allow passing derivations to nugetDeps
Sometimes I want to pass a different implementation of `mkNugetDeps`.
For example in private repos, it can be handy to use `__noChroot = true`
and bypass the deps.nix generation altogether. Or some Nuget packages
ship with ELF binaries that need to be patched, and that's best done as
soon as possible.
Diffstat (limited to 'pkgs/build-support/dotnet/build-dotnet-module/default.nix')
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
index fa987237a75..96e7596ed62 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix
+++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
@@ -78,7 +78,9 @@ let
     then linkFarmFromDrvs "${name}-project-references" projectReferences
     else null;
 
-  _nugetDeps = mkNugetDeps { inherit name; nugetDeps = import nugetDeps; };
+  _nugetDeps = if lib.isDerivation nugetDeps
+    then nugetDeps
+    else mkNugetDeps { inherit name; nugetDeps = import nugetDeps; };
 
   nuget-source = mkNugetSource {
     name = "${name}-nuget-source";