update flake, add frontend package

This commit is contained in:
Vinzenz Schroeter 2025-09-26 00:14:47 +02:00
parent ded0293b13
commit 0d82e4444a
5 changed files with 57 additions and 18 deletions

View file

@ -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);
};
}