Commit 14c908cd authored by David McFarland's avatar David McFarland
Browse files

tests.dotnet: add test for supported nugetDeps values

parent e6c700ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,4 +5,5 @@
  use-dotnet-from-env = lib.recurseIntoAttrs (callPackage ./use-dotnet-from-env { });
  structured-attrs = lib.recurseIntoAttrs (callPackage ./structured-attrs { });
  final-attrs = lib.recurseIntoAttrs (callPackage ./final-attrs { });
  nuget-deps = lib.recurseIntoAttrs (callPackage ./nuget-deps { });
}
+44 −0
Original line number Diff line number Diff line
# Tests that `nugetDeps` in buildDotnetModule can handle various types.

{
  lib,
  dotnet-sdk,
  buildPackages, # buildDotnetModule
  runCommand,
}:

let
  inherit (lib)
    mapAttrs
    ;

  inherit (buildPackages)
    emptyDirectory
    buildDotnetModule
    ;

in
mapAttrs
  (
    name: nugetDeps:
    buildDotnetModule {
      name = "nuget-deps-${name}";
      unpackPhase = ''
        runHook preUnpack

        mkdir test
        cd test
        dotnet new console -o .
        ls -l

        runHook postUnpack
      '';
      inherit nugetDeps;
    }
  )
  {
    "null" = null;
    "file" = ./nuget-deps.nix;
    "derivation" = emptyDirectory;
    "list" = [ emptyDirectory ];
  }
+6 −0
Original line number Diff line number Diff line
# This file was automatically generated by passthru.fetch-deps.
# Please dont edit it manually, your changes might get overwritten!

{ fetchNuGet }:
[
]