Skip to content

Commit

Permalink
Merge pull request #227059 from ppom0/slskd-init
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored May 12, 2023
2 parents e12fdc2 + 018192c commit b22c35f
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 3 deletions.
6 changes: 3 additions & 3 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12656,9 +12656,9 @@
githubId = 17690377;
};
ppom = {
name = "Paco Pompeani";
email = "paco@ecomail.io";
github = "aopom";
name = "ppom";
email = "ppom@ecomail.fr";
github = "ppom0";
githubId = 38916722;
};
pradeepchhetri = {
Expand Down
13 changes: 13 additions & 0 deletions package-lock.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/package-lock.json b/package-lock.json
index 5a84fbe7..562051c7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12425,7 +12425,7 @@
"node_modules/pkg-up/node_modules/path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
"dev": true,
"engines": {
"node": ">=4"
64 changes: 64 additions & 0 deletions pkgs/servers/web-apps/slskd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{ lib, stdenv
, buildNpmPackage
, fetchFromGitHub
, fetchurl
, unzip
, dotnetCorePackages
, buildDotnetModule
, mono
, nodejs_18
}:
let
pname = "slskd";
version = "0.17.5";

src = fetchFromGitHub {
owner = "slskd";
repo = "slskd";
rev = version;
sha256 = "sha256-iIM29ZI3M9etbw4yzin+4f4cGHIt5qjIl7uzsTUCBc4=";
};

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";
patches = [ ./package-lock.patch ];
npmFlags = [ "--legacy-peer-deps" ];
npmDepsHash = "sha256-vURi36ebdJQofhBlElIH5m6T1b8tsVGAzXCiDYUcSww=";
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
'';
}
Loading

0 comments on commit b22c35f

Please sign in to comment.