mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
tests.dotnet: add test for supported nugetDeps values
This commit is contained in:
parent
e6c700ed11
commit
14c908cdc9
@ -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
pkgs/test/dotnet/nuget-deps/default.nix
Normal file
44
pkgs/test/dotnet/nuget-deps/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
# 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
pkgs/test/dotnet/nuget-deps/nuget-deps.nix
Normal file
6
pkgs/test/dotnet/nuget-deps/nuget-deps.nix
Normal file
@ -0,0 +1,6 @@
|
||||
# This file was automatically generated by passthru.fetch-deps.
|
||||
# Please dont edit it manually, your changes might get overwritten!
|
||||
|
||||
{ fetchNuGet }:
|
||||
[
|
||||
]
|
Loading…
Reference in New Issue
Block a user