2023-05-24 13:37:59 +00:00
|
|
|
{ lib, stdenv
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, dotnetCorePackages
|
|
|
|
, buildDotnetModule
|
|
|
|
, mono
|
|
|
|
, nodejs_18
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "slskd";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.18.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "slskd";
|
|
|
|
repo = "slskd";
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-hWK6nbXAZTjxukx9EzkJkyEFlqXUkjanmv4VfHZxW24=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A modern client-server application for the Soulseek file sharing network";
|
|
|
|
homepage = "https://github.com/slskd/slskd";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ ppom ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; };
|
|
|
|
|
|
|
|
wwwroot = buildNpmPackage' {
|
|
|
|
inherit meta version;
|
|
|
|
|
|
|
|
pname = "slskd-web";
|
|
|
|
src = "${src}/src/web";
|
|
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
npmDepsHash = "sha256-+2g3pCaGFbzQjKwhjmD6viuzVE5pRg+qSOXMrCtLQkI=";
|
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
|
|
|
|
'';
|
|
|
|
}
|