|
1 | | -{ lib |
2 | | -, stdenv |
3 | | -, fetchzip |
4 | | -, makeWrapper |
5 | | -, dotnetCorePackages |
| 1 | +{ |
| 2 | + lib, |
| 3 | + stdenv, |
| 4 | + fetchzip, |
| 5 | + makeWrapper, |
| 6 | + dotnetCorePackages, |
6 | 7 | }: |
7 | 8 |
|
8 | 9 | let |
9 | | - pname = "bililiverecorder"; |
10 | | - |
11 | | - dotnet = with dotnetCorePackages; combinePackages [ |
12 | | - runtime_6_0-bin |
13 | | - aspnetcore_6_0-bin |
14 | | - ]; |
15 | | - |
16 | | - version = "2.13.0"; |
17 | | - hash = "sha256-4OQ2gut/eLk4CXRN5E3Z8XobXsT3bSmtmJEcHzHcz/0="; |
18 | | - |
| 10 | + dotnet = |
| 11 | + with dotnetCorePackages; |
| 12 | + combinePackages [ |
| 13 | + runtime_8_0-bin |
| 14 | + aspnetcore_8_0-bin |
| 15 | + ]; |
19 | 16 | in |
20 | | -stdenv.mkDerivation { |
21 | | - inherit pname version; |
| 17 | +stdenv.mkDerivation rec { |
| 18 | + pname = "bililiverecorder"; |
| 19 | + version = "2.15.1"; |
22 | 20 |
|
23 | 21 | src = fetchzip { |
24 | 22 | url = "https://github.com/BililiveRecorder/BililiveRecorder/releases/download/v${version}/BililiveRecorder-CLI-any.zip"; |
| 23 | + hash = "sha256-ugzFiuLe+Al3aRvEM3D4kqnaFrFR4Pr95UlEg0VGvvU="; |
25 | 24 | stripRoot = false; |
26 | | - inherit hash; |
27 | 25 | }; |
28 | 26 |
|
29 | 27 | nativeBuildInputs = [ makeWrapper ]; |
30 | 28 |
|
31 | 29 | installPhase = '' |
32 | 30 | runHook preInstall |
33 | 31 |
|
34 | | - mkdir -p $out/{bin,share/${pname}-${version}} |
35 | | - cp -r * $out/share/${pname}-${version}/. |
36 | | -
|
37 | | - makeWrapper "${dotnet}/bin/dotnet" $out/bin/BililiveRecorder \ |
38 | | - --add-flags "$out/share/${pname}-${version}/BililiveRecorder.Cli.dll" |
| 32 | + mkdir -p $out/{bin,lib} |
| 33 | + cp -r . $out/lib/bililiverecorder |
| 34 | + makeWrapper ${dotnet}/bin/dotnet $out/bin/BililiveRecorder \ |
| 35 | + --add-flags $out/lib/bililiverecorder/BililiveRecorder.Cli.dll |
39 | 36 |
|
40 | 37 | runHook postInstall |
41 | 38 | ''; |
42 | 39 |
|
43 | | - meta = with lib; { |
| 40 | + meta = { |
44 | 41 | description = "Convenient free open source bilibili live recording tool"; |
45 | 42 | homepage = "https://rec.danmuji.org/"; |
46 | 43 | changelog = "https://github.com/BililiveRecorder/BililiveRecorder/releases/tag/${version}"; |
47 | 44 | mainProgram = "BililiveRecorder"; |
48 | | - license = licenses.gpl3Only; |
49 | | - maintainers = with maintainers; [ zaldnoay ]; |
50 | | - platforms = platforms.unix; |
| 45 | + license = lib.licenses.gpl3Only; |
| 46 | + maintainers = with lib.maintainers; [ zaldnoay ]; |
| 47 | + platforms = lib.platforms.unix; |
51 | 48 | }; |
52 | 49 | } |
0 commit comments