wip backend package
This commit is contained in:
parent
5ae9b62df3
commit
11da297253
5 changed files with 216 additions and 66 deletions
60
flake.nix
60
flake.nix
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "Dev shell flake for servicepoint-tanks";
|
||||
description = "flake for servicepoint-tanks";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||
|
@ -13,13 +13,13 @@
|
|||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems =
|
||||
f:
|
||||
fn:
|
||||
nixpkgs.lib.genAttrs supported-systems (
|
||||
system:
|
||||
f rec {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = nixpkgs.lib;
|
||||
fn {
|
||||
inherit system;
|
||||
inherit (nixpkgs) lib;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
selfPkgs = self.packages.${system};
|
||||
}
|
||||
);
|
||||
|
@ -35,6 +35,10 @@
|
|||
let
|
||||
frontend-set = {
|
||||
inputsFrom = [ selfPkgs.servicepoint-tanks-frontend ];
|
||||
packages = with pkgs; [
|
||||
typescript
|
||||
nodejs
|
||||
];
|
||||
};
|
||||
backend-set = {
|
||||
inputsFrom = [ selfPkgs.servicepoint-tanks-backend ];
|
||||
|
@ -52,7 +56,12 @@
|
|||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
selfPkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
servicepoint-tanks-frontend = pkgs.buildNpmPackage (finalAttrs: {
|
||||
pname = "tank-frontend";
|
||||
|
@ -66,6 +75,36 @@
|
|||
'';
|
||||
});
|
||||
|
||||
servicepoint-binding-csharp = pkgs.buildDotnetModule {
|
||||
pname = "servicepoint-binding-csharp";
|
||||
version = "0.0.0";
|
||||
|
||||
src = ./tanks-backend/servicepoint-binding-csharp;
|
||||
projectFile = "ServicePoint/ServicePoint.csproj";
|
||||
nugetDeps = ./tanks-backend/deps.json;
|
||||
|
||||
packNupkg = true;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
xe
|
||||
xz
|
||||
gnumake
|
||||
iconv
|
||||
|
||||
(pkgs.symlinkJoin {
|
||||
name = "rust-toolchain";
|
||||
paths = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rustPlatform.rustcSrc
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
servicepoint-tanks-backend = pkgs.buildDotnetModule {
|
||||
pname = "servicepoint-tanks-backend";
|
||||
version = "0.0.0";
|
||||
|
@ -74,14 +113,15 @@
|
|||
dotnet-runtime = pkgs.dotnetCorePackages.runtime_8_0;
|
||||
|
||||
src = ./tanks-backend;
|
||||
projectFile = "TanksServer.sln";
|
||||
projectFile = "TanksServer/TanksServer.csproj";
|
||||
nugetDeps = ./tanks-backend/deps.json;
|
||||
|
||||
selfContainedBuild = true;
|
||||
|
||||
buildInputs = [ selfPkgs.servicepoint-binding-csharp ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
xe
|
||||
xz
|
||||
# todo needed?
|
||||
gnumake
|
||||
iconv
|
||||
];
|
||||
|
|
35
shell.nix
35
shell.nix
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
let
|
||||
rust-toolchain = pkgs.symlinkJoin {
|
||||
name = "rust-toolchain";
|
||||
paths = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rustPlatform.rustcSrc
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs.buildPackages; [
|
||||
rust-toolchain
|
||||
|
||||
pkg-config
|
||||
xe
|
||||
xz
|
||||
cargo-tarpaulin
|
||||
gnumake
|
||||
iconv
|
||||
|
||||
typescript
|
||||
nodejs
|
||||
|
||||
dotnet-sdk_8
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
}
|
|
@ -30,7 +30,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\servicepoint\crates\servicepoint_binding_uniffi\libraries\csharp\ServicePoint\ServicePoint.csproj" />
|
||||
<ProjectReference Include="..\servicepoint-binding-uniffi\SericePoint\ServicePoint.csproj" />
|
||||
<PackageReference Include="ServicePoint" Version="*" Condition=" '$(ContinuousIntegrationBuild)'=='true' "/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
"version": "17.8.0",
|
||||
"hash": "sha256-cv/wAXfTNS+RWEsHWNKqRDHC7LOQSSdFJ1a9cZuSfJw="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.DotNet.ILCompiler",
|
||||
"version": "8.0.20",
|
||||
"hash": "sha256-972D4TBkIWS1RY3rrB+znz7KuUGt/dDU16UWjZBJ9JU="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.Extensions.Configuration.Abstractions",
|
||||
"version": "8.0.0",
|
||||
|
@ -59,11 +54,6 @@
|
|||
"version": "8.0.0",
|
||||
"hash": "sha256-FU8qj3DR8bDdc1c+WeGZx/PCZeqqndweZM9epcpXjSo="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.NET.ILLink.Tasks",
|
||||
"version": "8.0.20",
|
||||
"hash": "sha256-nNI9Dc5fLi8VOBLN/tdpVtHVyaKYkwuga+Ew3NcBw6s="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.NET.Test.Sdk",
|
||||
"version": "17.8.0",
|
||||
|
@ -119,6 +109,91 @@
|
|||
"version": "6.5.0",
|
||||
"hash": "sha256-ElqfN4CcKxT3hP2qvxxObb4mnBlYG89IMxO0Sm5oZ2g="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Collections",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Diagnostics.Tools",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-8yLKFt2wQxkEf7fNfzB+cPUCjYn2qbqNgQ1+EeY2h/I="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Diagnostics.Tracing",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-dsmTLGvt8HqRkDWP8iKVXJCS+akAzENGXKPV18W2RgI="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Globalization",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Globalization.Calendars",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-AYh39tgXJVFu8aLi9Y/4rK8yWMaza4S4eaxjfcuEEL4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.IO",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Reflection",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Reflection.Extensions",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-Y2AnhOcJwJVYv7Rp6Jz6ma0fpITFqJW+8rsw106K2X8="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Reflection.Primitives",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Resources.ResourceManager",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Runtime",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Runtime.Handles",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Runtime.InteropServices",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Text.Encoding",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Text.Encoding.Extensions",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-6MYj0RmLh4EVqMtO/MRqBi0HOn5iG4x9JimgCCJ+EFM="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Threading.Tasks",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.any.System.Threading.Timer",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-BgHxXCIbicVZtpgMimSXixhFC3V+p5ODqeljDjO8hCs="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl",
|
||||
"version": "4.3.0",
|
||||
|
@ -134,11 +209,6 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.linux-x64.Microsoft.DotNet.ILCompiler",
|
||||
"version": "8.0.20",
|
||||
"hash": "sha256-cxVwgQnkp9Ynfv4Ly2EKEHGdzK3czRPi4JIYycFd2T4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.native.System",
|
||||
"version": "4.3.0",
|
||||
|
@ -204,6 +274,46 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.Microsoft.Win32.Primitives",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-LZb23lRXzr26tRS5aA0xyB08JxiblPDoA7HBvn6awXg="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Console",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-AHkdKShTRHttqfMjmi+lPpTuCrM5vd/WRy6Kbtie190="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Diagnostics.Debug",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.IO.FileSystem",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-Pf4mRl6YDK2x2KMh0WdyNgv0VUNdSKVDLlHqozecy5I="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Net.Primitives",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-pHJ+I6i16MV6m77uhTC6GPY6jWGReE3SSP3fVB59ti0="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Net.Sockets",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-IvgOeA2JuBjKl5yAVGjPYMPDzs9phb3KANs95H9v1w4="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Private.Uri",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs="
|
||||
},
|
||||
{
|
||||
"pname": "runtime.unix.System.Runtime.Extensions",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4="
|
||||
},
|
||||
{
|
||||
"pname": "SixLabors.ImageSharp",
|
||||
"version": "3.1.5",
|
||||
|
@ -314,6 +424,11 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-UoBB7WPDp2Bne/fwxKF0nE8grJ6FzTMXdT/jfsphj8Q="
|
||||
},
|
||||
{
|
||||
"pname": "System.Net.NameResolution",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-eGZwCBExWsnirWBHyp2sSSSXp6g7I6v53qNmwPgtJ5c="
|
||||
},
|
||||
{
|
||||
"pname": "System.Net.Primitives",
|
||||
"version": "4.3.0",
|
||||
|
@ -329,6 +444,11 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-gtmRkWP2Kwr3nHtDh0yYtce38z1wrGzb6fjm4v8wN6Q="
|
||||
},
|
||||
{
|
||||
"pname": "System.Private.Uri",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM="
|
||||
},
|
||||
{
|
||||
"pname": "System.Reflection",
|
||||
"version": "4.3.0",
|
||||
|
@ -404,6 +524,11 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc="
|
||||
},
|
||||
{
|
||||
"pname": "System.Security.Claims",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-Fua/rDwAqq4UByRVomAxMPmDBGd5eImRqHVQIeSxbks="
|
||||
},
|
||||
{
|
||||
"pname": "System.Security.Cryptography.Algorithms",
|
||||
"version": "4.3.0",
|
||||
|
@ -439,6 +564,16 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0="
|
||||
},
|
||||
{
|
||||
"pname": "System.Security.Principal",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-rjudVUHdo8pNJg2EVEn0XxxwNo5h2EaYo+QboPkXlYk="
|
||||
},
|
||||
{
|
||||
"pname": "System.Security.Principal.Windows",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-mbdLVUcEwe78p3ZnB6jYsizNEqxMaCAWI3tEQNhRQAE="
|
||||
},
|
||||
{
|
||||
"pname": "System.Text.Encoding",
|
||||
"version": "4.3.0",
|
||||
|
@ -474,6 +609,11 @@
|
|||
"version": "4.3.0",
|
||||
"hash": "sha256-X2hQ5j+fxcmnm88Le/kSavjiGOmkcumBGTZKBLvorPc="
|
||||
},
|
||||
{
|
||||
"pname": "System.Threading.ThreadPool",
|
||||
"version": "4.3.0",
|
||||
"hash": "sha256-wW0QdvssRoaOfQLazTGSnwYTurE4R8FxDx70pYkL+gg="
|
||||
},
|
||||
{
|
||||
"pname": "System.Threading.Timer",
|
||||
"version": "4.3.0",
|
||||
|
|
8
tanks-backend/gen-deps.sh
Normal file → Executable file
8
tanks-backend/gen-deps.sh
Normal file → Executable file
|
@ -1,6 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
|
||||
dotnet restore --packages out
|
||||
# first time
|
||||
# dotnet restore --packages out
|
||||
# nuget-to-json out > deps.json
|
||||
|
||||
nuget-to-json out > deps.json
|
||||
# update
|
||||
nix build ".?submodules=1#servicepoint-tanks-backend.fetch-deps"
|
||||
./result deps.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue