diff --git a/flake.lock b/flake.lock
index 4583957..af48ee2 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1731797254,
- "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
+ "lastModified": 1758589230,
+ "narHash": "sha256-zMTCFGe8aVGTEr2RqUi/QzC1nOIQ0N1HRsbqB4f646k=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
+ "rev": "d1d883129b193f0b495d75c148c2c3a7d95789a0",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "nixos-24.05",
+ "ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
diff --git a/flake.nix b/flake.nix
index cbf3848..6eaf798 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,24 +2,64 @@
description = "Dev shell flake for servicepoint-tanks";
inputs = {
- nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
};
outputs =
{ self, nixpkgs }:
let
- lib = nixpkgs.lib;
- forAllSystems = lib.genAttrs lib.systems.flakeExposed;
+ supported-systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ ];
+ forAllSystems =
+ f:
+ nixpkgs.lib.genAttrs supported-systems (
+ system:
+ f rec {
+ pkgs = nixpkgs.legacyPackages.${system};
+ lib = nixpkgs.lib;
+ inherit system;
+ selfPkgs = self.packages.${system};
+ }
+ );
in
{
- devShells = forAllSystems (system: {
- default = import ./shell.nix {
- inherit nixpkgs;
- pkgs = nixpkgs.legacyPackages."${system}";
- lib = nixpkgs.lib;
- };
- });
+ devShells = forAllSystems (
+ {
+ pkgs,
+ lib,
+ selfPkgs,
+ ...
+ }:
+ {
+ frontend = pkgs.mkShell {
+ inputsFrom = [ selfPkgs.servicepoint-tanks-frontend ];
+ };
+ default = import ./shell.nix {
+ inherit pkgs lib;
+ };
+ }
+ );
- formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixfmt-rfc-style);
+ packages = forAllSystems (
+ { pkgs, lib, ... }:
+ {
+ servicepoint-tanks-frontend = pkgs.buildNpmPackage (finalAttrs: {
+ pname = "tank-frontend";
+ version = "0.0.0";
+
+ src = ./tank-frontend;
+
+ npmDepsHash = "sha256-HvwoSeKHBDkM/5OHDkgSOxfHx1gbnKif/3QfDb6r5mE=";
+
+ installPhase = ''
+ cp -rv dist/ $out
+ '';
+ });
+ }
+ );
+
+ formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree);
};
}
diff --git a/shell.nix b/shell.nix
index 868fe17..413986a 100644
--- a/shell.nix
+++ b/shell.nix
@@ -20,7 +20,7 @@ pkgs.mkShell {
pkg-config
xe
- lzma
+ xz
cargo-tarpaulin
gnumake
iconv
diff --git a/tank-frontend/vite.config.ts b/tank-frontend/vite.config.ts
index 01699f7..8083379 100644
--- a/tank-frontend/vite.config.ts
+++ b/tank-frontend/vite.config.ts
@@ -3,12 +3,10 @@ import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig(() => {
- const isContainer = process.env.CONTAINERMODE;
return {
plugins: [react()],
build: {
- outDir: isContainer ? undefined : '../tanks-backend/TanksServer/client',
emptyOutDir: true
}
};
diff --git a/tanks-backend/TanksServer/TanksServer.csproj b/tanks-backend/TanksServer/TanksServer.csproj
index 08109f7..480806b 100644
--- a/tanks-backend/TanksServer/TanksServer.csproj
+++ b/tanks-backend/TanksServer/TanksServer.csproj
@@ -16,6 +16,7 @@
Recommended
true
CA1805,CA1848
+ NU1903,NU1902