Unverified Commit a1965bd0 authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

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

parents c99ddc6a cc4e0f06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+47 −17
Original line number Diff line number Diff line
{ runTest }:

{
  default = runTest (
    { lib, ... }:

    {
      name = "Shoko";

@@ -17,3 +22,28 @@
        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 −0
Original line number Diff line number Diff line
[
  {
    "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 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
# 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;
  };
})
Loading