1
1
Fork 0
mirror of https://github.com/the-nix-way/dev-templates synced 2024-04-19 12:04:03 +02:00

Add C# development environment

This commit is contained in:
Yuval Kogman 2023-05-25 22:23:06 +03:00
parent f381b8a291
commit e7a85b6881
5 changed files with 93 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Once your preferred template has been initialized, you can use the provided shel
| Language/framework/tool | Template |
| :----------------------- | :-----------------------------|
| [Clojure] | [`clojure`](./clojure/) |
| [C#][csharp] | [`csharp`](./csharp/) |
| [Cue] | [`cue`](./cue/) |
| [Dhall] | [`dhall`](./dhall/) |
| [Elixir] | [`elixir`](./elixir/) |
@ -65,6 +66,13 @@ The sections below list what each template includes. In all cases, you're free t
- [Boot] 2.8.3
- [Leiningen] 2.9.8
### [`csharp`](./csharp/)
- [dotnet] sdk 7
- [omnisharp-roslyn]
- [mono]
- [msbuild]
### [`cue`](./cue/)
- [Cue] 0.4.3
@ -241,6 +249,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[composer]: https://getcomposer.org/
[conftest]: https://www.conftest.dev
[cross]: https://github.com/cross-rs/cross
[csharp]: https://dotnet.microsoft.com/en-us/languages/csharp
[cue]: https://cuelang.org
[damon]: https://github.com/hashicorp/damon
[dhall]: https://dhall-lang.org
@ -256,6 +265,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[dhall-to-nix]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-nix
[dhall-toml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-toml
[dhall-yaml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-yaml
[dotnet]: https://dotnet.microsoft.com/en-us/
[dune]: https://dune.build
[elixir]: https://elixir-lang.org
[elm]: https://elm-lang.org
@ -279,6 +289,8 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[mach-nix]: https://github.com/DavHau/mach-nix
[maven]: https://maven.apache.org
[mix]: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
[mono]: https://www.mono-project.com/
[msbuild]: https://github.com/dotnet/msbuild
[nickel]: https://nickel-lang.org
[nim]: https://nim-lang.org
[nimble]: https://github.com/nim-lang/nimble
@ -297,6 +309,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[ocaml]: https://ocaml.org
[ocamlformat]: https://github.com/ocaml-ppx/ocamlformat
[odoc]: https://github.com/ocaml/odoc
[omnisharp-roslyn]: https://github.com/OmniSharp/omnisharp-roslyn
[opa]: https://openpolicyagent.org
[packer]: https://packer.io
[pip]: https://pypi.org/project/pip

1
csharp/.envrc Normal file
View File

@ -0,0 +1 @@
use flake .

43
csharp/flake.lock Normal file
View File

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1679163677,
"narHash": "sha256-VC0tc3EjJZFPXgucFQAYMIHce5nJWYR0kVCk4TVg6gg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c3912035d00ef755ab19394488b41feab95d2e40",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

31
csharp/flake.nix Normal file
View File

@ -0,0 +1,31 @@
{
description = "A Nix-flake-based C# development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
#dotnet-sdk_6
dotnet-sdk_7
#dotnet-sdk_8
omnisharp-roslyn
mono
msbuild
];
};
});
}

View File

@ -15,6 +15,11 @@
description = "Clojure development environment";
};
csharp = {
path = ./csharp;
description = "C# development environment";
};
cue = {
path = ./cue;
description = "Cue development environment";