Unverified Commit b22c35f0 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #227059 from ppom0/slskd-init

parents e12fdc26 018192cd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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 = {

package-lock.patch

0 → 100644
+13 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
{ 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
  '';
}
+339 −0

File added.

Preview size limit exceeded, changes collapsed.

+13 −0
Original line number Diff line number Diff line
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"
Loading