about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/to/torrentstream/package.nix
blob: 44a92c7d850a0d560d124c0c4a8ae7281aca07bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, fetchpatch
}:

buildDotnetModule rec {
  pname = "torrentstream";
  version = "1.0.1.6";

  src = fetchFromGitHub {
    owner = "trueromanus";
    repo = "TorrentStream";
    rev = version;
    hash = "sha256-41zlzrQ+YGY2wEvq4Su/lp6lOmGW4u0F37ub2a3z+7o=";
  };

  sourceRoot = "source/src";

  projectFile = "TorrentStream.sln";
  nugetDeps = ./deps.nix;
  dotnet-sdk = dotnetCorePackages.sdk_7_0;
  dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;
  executables = [ "TorrentStream" ];

  patches = [
    (fetchpatch {
       name = "allow-setting-listen-address.patch";
       url = "https://github.com/trueromanus/TorrentStream/compare/1.0.1.6..6900b6f33f2b4b94888a8a1355029a81767e66a4.patch";
       hash = "sha256-jOUs5SO2BnNnkz3wJ710Z4stVlhZ8nKqpmHr4BNlGs0=";
       stripLen = 1;
       excludes = [ "README.md" ];
     })
    ./0001-display-the-message-of-caught-exceptions.patch
  ];

  meta = {
    homepage = "https://github.com/trueromanus/TorrentStream";
    description = "Simple web server for streaming torrent files in video players";
    license = lib.licenses.bsd2;
    platforms = lib.platforms.all;
    mainProgram = "TorrentStream";
    maintainers = with lib.maintainers; [ _3JlOy-PYCCKUi ];
  };
}