Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / bililiverecorder / default.nix
blob5a1dcf4f2e7986e0d8d534b6e9112dabdb9b6455
1 { lib
2 , stdenv
3 , fetchzip
4 , makeWrapper
5 , dotnetCorePackages
6 }:
8 let
9   pname = "bililiverecorder";
11   dotnet = with dotnetCorePackages; combinePackages [
12     runtime_6_0
13     aspnetcore_6_0
14   ];
16   version = "2.12.0";
17   hash = "sha256-2usiJTGA2FcJ9HBs3RDiARfC2yv/UqBgmT+z5F5Y7w0=";
20 stdenv.mkDerivation {
21   inherit pname version;
23   src = fetchzip {
24     url = "https://github.com/BililiveRecorder/BililiveRecorder/releases/download/v${version}/BililiveRecorder-CLI-any.zip";
25     stripRoot = false;
26     inherit hash;
27   };
29   nativeBuildInputs = [ makeWrapper ];
31   installPhase = ''
32     runHook preInstall
34     mkdir -p $out/{bin,share/${pname}-${version}}
35     cp -r * $out/share/${pname}-${version}/.
37     makeWrapper "${dotnet}/bin/dotnet" $out/bin/BililiveRecorder \
38       --add-flags "$out/share/${pname}-${version}/BililiveRecorder.Cli.dll"
40     runHook postInstall
41   '';
43   meta = with lib; {
44     description = "Convenient free open source bilibili live recording tool";
45     homepage = "https://rec.danmuji.org/";
46     changelog = "https://github.com/BililiveRecorder/BililiveRecorder/releases/tag/${version}";
47     mainProgram = "BililiveRecorder";
48     license = licenses.gpl3Only;
49     maintainers = with maintainers; [ zaldnoay ];
50     platforms = platforms.unix;
51   };