NUGET.ECLASS
Section: eclass-manpages (5)Updated: Sep 2023
Index Return to Main Contents
NAME
nuget.eclass - common functions and variables for handling .NET NuGetsDESCRIPTION
This eclass is designed to provide support for .NET NuGet's ".nupkg" files. It is used to handle NuGets installation and usage. "dotnet-pkg" and "dotnet-pkg-utils" inherit this eclass.This eclass does not export any phase functions, for that see the "dotnet-pkg" eclass.
SUPPORTED EAPIS
8FUNCTIONS
- _nuget_set_nuget_uris <nugets>
- Generates the URIs to put in SRC_URI to help fetch dependencies. Constructs a list of NuGets from its arguments. The value is set as "NUGET_URIS".
- nuget_link <nuget-path>
-
Link a specified NuGet package at "nuget-path" to the "NUGET_PACKAGES"
directory.
Example:
nuget_link "${DISTDIR}"/pkg.0.nupkg
This function is used inside "dotnet-pkg_src_unpack" from the "dotnet-pkg" eclass.
- nuget_link-system-nugets
-
Link all system NuGet packages to the "NUGET_PACKAGES" directory.
Example:
src_unpack() { nuget_link-system-nugets default }
This function is used inside "dotnet-pkg_src_unpack" from the "dotnet-pkg" eclass.
- nuget_donuget <nuget-path> ...
-
Install NuGet package(s) at "nuget-path" to the system nugets directory.
Example:
src_install() { nuget_donuget my-pkg.nupkg }
ECLASS VARIABLES
- NUGET_SYSTEM_NUGETS = /opt/dotnet-nugets
- Location of the system NuGet packages directory.
- NUGET_APIS (SET BEFORE INHERIT)
-
NuGet API URLs to use for precompiled NuGet package ".nupkg" downloads.
Set this variable pre-inherit.
Defaults to an array of one item: "https://api.nuget.org/v3-flatcontainer"
Example:
NUGET_APIS+=( "https://api.nuget.org/v3-flatcontainer" ) inherit nuget SRC_URI="https://example.com/example.tar.xz" SRC_URI+=" ${NUGET_URIS} "
- NUGET_PACKAGES (SET BEFORE INHERIT)
-
Path from where NuGets will be restored from.
This is a special variable that modifies the behavior of "dotnet".
Defaults to ${T}/nugets for use with "NUGETS" but may be set to a custom location to, for example, restore NuGets extracted from a prepared archive. Do not set this variable in conjunction with non-empty "NUGETS".
- NUGETS (SET BEFORE INHERIT)
-
String containing all NuGet packages that need to be downloaded.
Used by "_nuget_uris".
Example:
NUGETS=" ImGui.NET@1.87.2 Config.Net@4.19.0 " inherit dotnet-pkg ... SRC_URI+=" ${NUGET_URIS} "
- NUGET_URIS (GENERATED BY ECLASS)
- List of URIs to put in SRC_URI created from NUGETS variable.
AUTHORS
Anna Figueiredo Gomes <navi@vlhl.dev>Maciej Barć <xgqt@gentoo.org>
MAINTAINERS
Gentoo Dotnet project <dotnet@gentoo.org>REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
nuget.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/nuget.eclass
Index
- NAME
- DESCRIPTION
- SUPPORTED EAPIS
- FUNCTIONS
- ECLASS VARIABLES
- AUTHORS
- MAINTAINERS
- REPORTING BUGS
- FILES
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, September 22, 2023