-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227059 from ppom0/slskd-init
- Loading branch information
Showing
6 changed files
with
434 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
''; | ||
} |
Oops, something went wrong.