This commit is contained in:
Robin Appelman 2025-05-26 21:15:53 +02:00
commit 4c876ae69c
6 changed files with 83 additions and 82 deletions

View file

@ -1,10 +1,9 @@
{ rustPlatform {
, openssl rustPlatform,
, pkg-config openssl,
, lib pkg-config,
, lib,
}: }: let
let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile; inherit (builtins) fromTOML readFile;
src = sourceByRegex ./. ["Cargo.*" "((types|archiver|)/?(src)?)(/.*)?" "README.md"]; src = sourceByRegex ./. ["Cargo.*" "((types|archiver|)/?(src)?)(/.*)?" "README.md"];

View file

@ -61,7 +61,8 @@ Historical team membership data
Match data. Match data.
Due to limitations of the data available on ugc, the asia region is currently not included. Due to limitations of the data available on ugc, the asia region is currently
not included.
#### Sample #### Sample

View file

@ -10,24 +10,26 @@
inputs.flakelight.follows = "flakelight"; inputs.flakelight.follows = "flakelight";
}; };
}; };
outputs = { mill-scale, ... }: mill-scale ./. { outputs = {mill-scale, ...}:
mill-scale ./. {
extraFilesRegex = [".*\.html"]; extraFilesRegex = [".*\.html"];
withOverlays = [(import ./overlay.nix)]; withOverlays = [(import ./overlay.nix)];
packages = { packages = {
ugc-api-server = pkgs: pkgs.ugc-api-server; ugc-api-server = pkgs: pkgs.ugc-api-server;
ugc-api-archiver = pkgs: pkgs.ugc-api-archiver; ugc-api-archiver = pkgs: pkgs.ugc-api-archiver;
}; };
tools = pkgs: with pkgs; [ tools = pkgs:
with pkgs; [
bacon bacon
cargo-insta cargo-insta
sqlx-cli sqlx-cli
]; ];
nixosModules = {outputs, ...}: { nixosModules = {outputs, ...}: {
default = default = {
{ pkgs pkgs,
, config config,
, lib lib,
, ... ...
}: { }: {
imports = [./module.nix]; imports = [./module.nix];
config = lib.mkIf config.services.ugc-api-server.enable { config = lib.mkIf config.services.ugc-api-server.enable {

View file

@ -1,12 +1,12 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
...
}: }:
with lib; let with lib; let
cfg = config.services.ugc-api-server; cfg = config.services.ugc-api-server;
in in {
{
options.services.ugc-api-server = { options.services.ugc-api-server = {
enable = mkEnableOption "ugc api server"; enable = mkEnableOption "ugc api server";

View file

@ -1,10 +1,9 @@
{ rustPlatform {
, openssl rustPlatform,
, pkg-config openssl,
, lib pkg-config,
, lib,
}: }: let
let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile; inherit (builtins) fromTOML readFile;
src = sourceByRegex ./. ["Cargo.*" "((types|api-server|)/?(src)?)(/.*)?" "README.md"]; src = sourceByRegex ./. ["Cargo.*" "((types|api-server|)/?(src)?)(/.*)?" "README.md"];