luarenamer: init at 5.10.1; shoko: add plugin test (#480095)

This commit is contained in:
Gergő Gutyina
2026-01-15 23:45:39 +00:00
committed by GitHub
8 changed files with 176 additions and 40 deletions
+1 -1
View File
@@ -1418,7 +1418,7 @@ in
sharkey = runTest ./web-apps/sharkey.nix;
shattered-pixel-dungeon = runTest ./shattered-pixel-dungeon.nix;
shiori = runTest ./shiori.nix;
shoko = runTest ./shoko.nix;
shoko = import ./shoko.nix { inherit runTest; };
signal-desktop = runTest ./signal-desktop.nix;
silverbullet = runTest ./silverbullet.nix;
simple = runTest ./simple.nix;
+44 -14
View File
@@ -1,19 +1,49 @@
{ lib, ... }:
{ runTest }:
{
name = "Shoko";
default = runTest (
{ lib, ... }:
nodes.machine = {
services.shoko.enable = true;
};
{
name = "Shoko";
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
nodes.machine = {
services.shoko.enable = true;
};
meta.maintainers = with lib.maintainers; [
diniamo
nanoyaki
];
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
meta.maintainers = with lib.maintainers; [
diniamo
nanoyaki
];
}
);
withPlugins = runTest (
{ pkgs, lib, ... }:
{
name = "Shoko with plugins";
nodes.machine = {
services.shoko = {
enable = true;
plugins = [ pkgs.luarenamer ];
};
};
testScript = ''
machine.wait_for_unit("shoko.service")
machine.wait_for_open_port(8111)
machine.succeed("curl --fail http://localhost:8111")
'';
meta.maintainers = with lib.maintainers; [ nanoyaki ];
}
);
}
+32
View File
@@ -0,0 +1,32 @@
[
{
"pname": "KeraLua",
"version": "1.4.5",
"hash": "sha256-O3ozcLw1IVc6ssc3SZfPIvp5s0+xLyLuTZw6qrjyEyE="
},
{
"pname": "Microsoft.Extensions.DependencyInjection",
"version": "8.0.0",
"hash": "sha256-+qIDR8hRzreCHNEDtUcPfVHQdurzWPo/mqviCH78+EQ="
},
{
"pname": "Microsoft.Extensions.DependencyInjection.Abstractions",
"version": "8.0.0",
"hash": "sha256-75KzEGWjbRELczJpCiJub+ltNUMMbz5A/1KQU+5dgP8="
},
{
"pname": "Microsoft.Extensions.Logging.Abstractions",
"version": "8.0.0",
"hash": "sha256-Jmddjeg8U5S+iBTwRlVAVLeIHxc4yrrNgqVMOB7EjM4="
},
{
"pname": "NLua",
"version": "1.7.5",
"hash": "sha256-1s8cc1RqKnfwafhxpBhOdkr8ZteNjt5fBN2sfLy4e5k="
},
{
"pname": "Shoko.Plugin.Abstractions",
"version": "5.2.0",
"hash": "sha256-tNLOeum4rc30OEWRiH1zTzLk5+1MfSEOfvkON1MU/SY="
}
]
+35
View File
@@ -0,0 +1,35 @@
diff --git a/LuaRenamer/LuaRenamer.csproj b/LuaRenamer/LuaRenamer.csproj
index c4f0508..b9e001c 100644
--- a/LuaRenamer/LuaRenamer.csproj
+++ b/LuaRenamer/LuaRenamer.csproj
@@ -33,30 +33,4 @@
</None>
</ItemGroup>
- <Target Name="GetGitAssemblyVersion" BeforeTargets="GetAssemblyVersion">
- <Exec Command="git describe --match &quot;v[0-9]*.[0-9]*.[0-9]*&quot; --tags --abbrev=7 --long --dirty --always" ConsoleToMsBuild="true">
- <Output TaskParameter="ConsoleOutput" PropertyName="GitInfo" />
- </Exec>
-
- <PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(GitInfo)', '\d+\.\d+\.\d+'))">
- <Version>$([System.Text.RegularExpressions.Regex]::Match('$(GitInfo)', '\d+\.\d+\.\d+'))</Version>
- <InformationalVersion>$(GitInfo)</InformationalVersion>
- </PropertyGroup>
- </Target>
-
- <Target Name="PackageForRelease" AfterTargets="Publish">
- <PropertyGroup>
- <ZipDir>$(PublishDir)ZipDir/</ZipDir>
- <ZipDestination>$(PublishDir)../$(ProjectName)_$([MSBuild]::ValueOrDefault("$(RuntimeIdentifier)","Portable"))_$(GitInfo).zip</ZipDestination>
- </PropertyGroup>
-
- <ItemGroup>
- <ZipOut Include="$(PublishDir)**/*" />
- </ItemGroup>
-
- <Copy SourceFiles="@(ZipOut)" DestinationFolder="$(ZipDir)$(ProjectName)/%(RecursiveDir)" />
- <ZipDirectory SourceDirectory="$(ZipDir)" DestinationFile="$(ZipDestination)" Overwrite="true" />
- <RemoveDir Directories="$(ZipDir)" />
- </Target>
-
</Project>
+49
View File
@@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2025-2026 Hana Kretzer <hanakretzer@nanoyaki.space>
#
# SPDX-License-Identifier: MIT
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnet-sdk_8,
dotnet-aspnetcore_8,
nix-update-script,
}:
buildDotnetModule (finalAttrs: {
pname = "luarenamer";
version = "5.10.1";
src = fetchFromGitHub {
owner = "Mik1ll";
repo = "LuaRenamer";
tag = "v${finalAttrs.version}";
hash = "sha256-ZN7o9q3APgc7vL+IRpk6Phd0Btpzyqdp53aoGp6sA8o=";
};
patches = [
./nozip.patch
];
dotnet-sdk = dotnet-sdk_8;
dotnet-runtime = dotnet-aspnetcore_8;
nugetDeps = ./deps.json;
projectFile = "LuaRenamer/LuaRenamer.csproj";
executables = [ ];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/Mik1ll/LuaRenamer";
changelog = "https://github.com/Mik1ll/LuaRenamer/releases/tag/${finalAttrs.src.tag}";
description = "Plugin for Shoko that allows users to rename their collection using Lua";
license = [
lib.licenses.gpl3
lib.licenses.lgpl3
];
maintainers = with lib.maintainers; [ nanoyaki ];
inherit (dotnet-sdk_8.meta) platforms;
};
})
+3 -3
View File
@@ -11,13 +11,13 @@
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "shoko-webui";
version = "2.2.0";
version = "2.4.1";
src = fetchFromGitHub {
owner = "ShokoAnime";
repo = "Shoko-WebUI";
tag = "v${finalAttrs.version}";
hash = "sha256-plXTAN3V0tcAe+uMs4XwYHO1UC9DCAxcMPVNKdFobcY=";
hash = "sha256-/frP6qI5xAmogb5a5AA83IJxgOhVUi6X0E4h3Qg5u6w=";
};
# Avoid requiring git as a build time dependency. It's used for version
@@ -28,7 +28,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 3;
hash = "sha256-4/Qbg+jUagPUiQPoc57drorbEkn1ShsPZynvct+HX7A=";
hash = "sha256-rTlem83dFptgvKUKUaHK8vi5B0FBehPFtkCUhOnUKd0=";
};
nativeBuildInputs = [
+9 -19
View File
@@ -46,13 +46,13 @@
},
{
"pname": "Magick.NET-Q8-AnyCPU",
"version": "13.6.0",
"hash": "sha256-LzHv4Acau5YKP3mnqHY3S9b4TL/xZAr+LqlJkzictPA="
"version": "14.9.1",
"hash": "sha256-4svX77hA0bfAo9Lbbks6RfAwB4DbUI8mwduMbmyaEfQ="
},
{
"pname": "Magick.NET.Core",
"version": "13.6.0",
"hash": "sha256-9y7fLtgmWc830XbH6Vfj61H9W/DGqBqv+tIrg1L9U2c="
"version": "14.9.1",
"hash": "sha256-FkFcEeK08Jrp9y1znQzy4uyW6sMU1bVi3s5e5em2of4="
},
{
"pname": "MessagePack",
@@ -299,6 +299,11 @@
"version": "1.1.1",
"hash": "sha256-fAcX4sxE0veWM1CZBtXR/Unky+6sE33yrV7ohrWGKig="
},
{
"pname": "Microsoft.Bcl.AsyncInterfaces",
"version": "8.0.0",
"hash": "sha256-9aWmiwMJKrKr9ohD1KSuol37y+jdDxPGJct3m2/Bknw="
},
{
"pname": "Microsoft.CodeAnalysis.Analyzers",
"version": "3.3.4",
@@ -1219,11 +1224,6 @@
"version": "1.4.2",
"hash": "sha256-/giVqikworG2XKqfN9uLyjUSXr35zBuZ2FX2r8X/WUY="
},
{
"pname": "Shoko.Plugin.Abstractions",
"version": "4.0.0-beta5",
"hash": "sha256-Tc3cOHkEFjaqWTdHvAscMUfOawH5fc93/u2ztXWGtSc="
},
{
"pname": "SQLitePCLRaw.bundle_e_sqlite3",
"version": "2.1.6",
@@ -1294,11 +1294,6 @@
"version": "4.5.0",
"hash": "sha256-THw2znu+KibfJRfD7cE3nRYHsm7Fyn5pjOOZVonFjvs="
},
{
"pname": "System.Buffers",
"version": "4.5.1",
"hash": "sha256-wws90sfi9M7kuCPWkv1CEYMJtCqx9QB/kj0ymlsNaxI="
},
{
"pname": "System.ClientModel",
"version": "1.0.0",
@@ -1624,11 +1619,6 @@
"version": "4.5.1",
"hash": "sha256-5g6C2vb0RCUiSBw/tlCUbmrIbCvT9zQ+w/45o3l6Ctg="
},
{
"pname": "System.Numerics.Vectors",
"version": "4.4.0",
"hash": "sha256-auXQK2flL/JpnB/rEcAcUm4vYMCYMEMiWOCAlIaqu2U="
},
{
"pname": "System.Numerics.Vectors",
"version": "4.5.0",
+3 -3
View File
@@ -12,13 +12,13 @@
buildDotnetModule (finalAttrs: {
pname = "shoko";
version = "5.1.0";
version = "5.2.1";
src = fetchFromGitHub {
owner = "ShokoAnime";
repo = "ShokoServer";
tag = "v${finalAttrs.version}";
hash = "sha256-ZO5S0zMwzr4giaO1bmQ4dLBIPrv6eZY7k9Os4GiO4C4=";
hash = "sha256-V8DwYLjxklKYmOnYNLp51GRJXgOXKnbgDD4DL4T4lVc=";
fetchSubmodules = true;
};
@@ -46,7 +46,7 @@ buildDotnetModule (finalAttrs: {
];
};
tests.shoko = nixosTests.shoko;
tests = { inherit (nixosTests) shoko; };
};
meta = {