2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
2023-05-24 13:37:59 +00:00
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dotnetCorePackages
|
|
|
|
, buildDotnetModule
|
|
|
|
, mono
|
|
|
|
, nodejs_18
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "slskd";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.19.5";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "slskd";
|
|
|
|
repo = "slskd";
|
|
|
|
rev = version;
|
2024-01-25 14:12:00 +00:00
|
|
|
sha256 = "sha256-Vm+nA3yKiCMpQ41GTQF6Iuat89QrUtstQdHmX/DyU9g=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Modern client-server application for the Soulseek file sharing network";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/slskd/slskd";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ppom melvyn2 ];
|
2023-05-24 13:37:59 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
wwwroot = buildNpmPackage {
|
2023-05-24 13:37:59 +00:00
|
|
|
inherit meta version;
|
|
|
|
|
|
|
|
pname = "slskd-web";
|
|
|
|
src = "${src}/src/web";
|
|
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
nodejs = nodejs_18;
|
2024-01-25 14:12:00 +00:00
|
|
|
npmDepsHash = "sha256-E1J4fYcY1N+UmN4Ch4Ss6ty+nYlmrv3ngvCJ8YCjPfI=";
|
2023-05-24 13:37:59 +00:00
|
|
|
installPhase = ''
|
|
|
|
cp -r build $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in buildDotnetModule {
|
|
|
|
inherit pname version src meta;
|
|
|
|
|
|
|
|
runtimeDeps = [ mono ];
|
|
|
|
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;
|
|
|
|
|
|
|
|
projectFile = "slskd.sln";
|
|
|
|
|
|
|
|
testProjectFile = "tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj";
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -r $out/lib/slskd/wwwroot
|
|
|
|
ln -s ${wwwroot} $out/lib/slskd/wwwroot
|
|
|
|
'';
|
|
|
|
}
|