2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildNpmPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
dotnetCorePackages,
|
|
|
|
buildDotnetModule,
|
|
|
|
mono,
|
|
|
|
nodejs_18,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "slskd";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.21.3";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "slskd";
|
|
|
|
repo = "slskd";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-qAS8uiXAG0JTOCW/bIVYhv6McUSBihAHFjJu3b5Ttoc=";
|
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;
|
2024-09-19 14:19:46 +00:00
|
|
|
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-07-27 06:49:29 +00:00
|
|
|
npmDepsHash = "sha256-06qQ1y870TrkXhkHYADjnWVhdyiLWEqdDt3qrJ1BBFo=";
|
2023-05-24 13:37:59 +00:00
|
|
|
installPhase = ''
|
|
|
|
cp -r build $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
in
|
|
|
|
buildDotnetModule {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
runtimeDeps = [ mono ];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|