simple hello world
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
result
|
||||||
|
*/bin
|
||||||
|
*/obj
|
||||||
2
console/Program.cs
Normal file
2
console/Program.cs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
Console.WriteLine("Hello, World!");
|
||||||
10
console/console.csproj
Normal file
10
console/console.csproj
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
34
dotnet-nix-testing.sln
Normal file
34
dotnet-nix-testing.sln
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.0.31903.59
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "console", "console\console.csproj", "{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{DA7E69E4-09C2-45F5-9D98-D477D3B5B6FD}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
34
flake.nix
34
flake.nix
@@ -23,13 +23,40 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}: rec {
|
||||||
# Per-system attributes can be defined here. The self' and inputs'
|
# Per-system attributes can be defined here. The self' and inputs'
|
||||||
# module parameters provide easy access to attributes of the same
|
# module parameters provide easy access to attributes of the same
|
||||||
# system.
|
# system.
|
||||||
|
|
||||||
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
packages.default = packages.console;
|
||||||
packages.default = pkgs.hello;
|
|
||||||
|
packages.console = with pkgs;
|
||||||
|
buildDotnetModule {
|
||||||
|
pname = "dotnet-nix-testing";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
projectFile = "dotnet-nix-testing.sln";
|
||||||
|
# nugetDeps = ./deps.json; # see "Generating and updating NuGet dependencies" section for details
|
||||||
|
|
||||||
|
# buildInputs = [
|
||||||
|
# referencedProject
|
||||||
|
# ]; # `referencedProject` must contain `nupkg` in the folder structure.
|
||||||
|
|
||||||
|
dotnet-sdk = dotnetCorePackages.sdk_9_0;
|
||||||
|
dotnet-runtime = dotnetCorePackages.runtime_9_0;
|
||||||
|
|
||||||
|
executables = ["console"]; # This wraps "$out/lib/$pname/foo" to `$out/bin/foo`.
|
||||||
|
# executables = []; # Don't install any executables.
|
||||||
|
|
||||||
|
# packNupkg = true; # This packs the project as "foo-0.1.nupkg" at `$out/share`.
|
||||||
|
|
||||||
|
# runtimeDeps = [ffmpeg]; # This will wrap ffmpeg's library path into `LD_LIBRARY_PATH`.
|
||||||
|
|
||||||
|
meta.mainProgram = "console";
|
||||||
|
};
|
||||||
|
|
||||||
devShells.default = with pkgs;
|
devShells.default = with pkgs;
|
||||||
mkShell
|
mkShell
|
||||||
{
|
{
|
||||||
@@ -38,7 +65,6 @@
|
|||||||
(
|
(
|
||||||
with dotnetCorePackages;
|
with dotnetCorePackages;
|
||||||
combinePackages [
|
combinePackages [
|
||||||
sdk_8_0
|
|
||||||
sdk_9_0
|
sdk_9_0
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user