nixpkgs/pkgs/servers/web-apps/slskd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
2023-04-19 13:32:37 +00:00
, buildNpmPackage
, fetchFromGitHub
, dotnetCorePackages
, buildDotnetModule
, mono
, nodejs_18
}:
let
pname = "slskd";
version = "0.21.1";
2023-04-19 13:32:37 +00:00
src = fetchFromGitHub {
owner = "slskd";
repo = "slskd";
rev = version;
sha256 = "sha256-ic631e4pyby6EibUkxIGc/uQnVuPY9RFZ9hWvw3u1zk=";
2023-04-19 13:32:37 +00:00
};
meta = with lib; {
description = "A modern client-server application for the Soulseek file sharing network";
homepage = "https://github.com/slskd/slskd";
2024-03-19 12:26:06 +00:00
license = licenses.agpl3Plus;
maintainers = with maintainers; [ ppom melvyn2 ];
2023-04-19 13:32:37 +00:00
platforms = platforms.linux;
};
wwwroot = buildNpmPackage {
2023-04-19 13:32:37 +00:00
inherit meta version;
pname = "slskd-web";
src = "${src}/src/web";
npmFlags = [ "--legacy-peer-deps" ];
nodejs = nodejs_18;
npmDepsHash = "sha256-06qQ1y870TrkXhkHYADjnWVhdyiLWEqdDt3qrJ1BBFo=";
2023-04-19 13:32:37 +00:00
installPhase = ''
cp -r build $out
'';
};
in buildDotnetModule {
inherit pname version src meta;
runtimeDeps = [ mono ];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
2023-04-19 13:32:37 +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
'';
}