mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
dotnet: add setup hook to set required env vars
This commit is contained in:
parent
550ff4cdac
commit
8ef298b84f
@ -4,9 +4,11 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
assert builtins.elem type [ "aspnetcore" "runtime" "sdk"];
|
assert builtins.elem type [ "aspnetcore" "runtime" "sdk"];
|
||||||
|
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, writeText
|
||||||
, libunwind
|
, libunwind
|
||||||
, openssl
|
, openssl
|
||||||
, icu
|
, icu
|
||||||
@ -87,6 +89,13 @@ in stdenv.mkDerivation rec {
|
|||||||
$out/bin/dotnet --info
|
$out/bin/dotnet --info
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
setupHook = writeText "dotnet-setup-hook" ''
|
||||||
|
export HOME=$(mktemp -d) # Dotnet expects a writable home directory for its configuration files
|
||||||
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 # Dont try to expand NuGetFallbackFolder to disk
|
||||||
|
export DOTNET_NOLOGO=1 # Disables the welcome message
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://dotnet.github.io/";
|
homepage = "https://dotnet.github.io/";
|
||||||
description = builtins.getAttr type descriptions;
|
description = builtins.getAttr type descriptions;
|
||||||
|
Loading…
Reference in New Issue
Block a user