blob: 356602be327d03cc9b8072bc1f1a4da01e2b3386 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, flake-utils, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages = {
# Build the backend using 'nix build --extra-experimental-features nix-command --extra-experimental-features flakes .#server'
server = pkgs.buildDotnetModule rec {
pname = "VPNAuth.Server";
version = "1.0.0";
src = ./.;
projectFile = "VPNAuth.Server/VPNAuth.Server.csproj";
dotnet-sdk = pkgs.dotnetCorePackages.sdk_9_0;
dotnet-runtime = pkgs.dotnetCorePackages.dotnet_9.aspnetcore;
# To create or update the deps.nix file run the following steps from the project root:
# 1. Create a nix-shell using 'nix-shell -p nuget-to-nix dotnetCorePackages.sdk_9_0'
# 2. Run 'rm -rf out/' inside the nix-shell
# 3. Run 'dotnet restore VPNAuth.Server --packages out' inside the nix-shell
# 4. Run 'nuget-to-nix out > deps.nix' inside the nix-shell
nugetDeps = ./deps.nix;
};
};
});
}
|