summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/n-/n-m3u8dl-re/package.nix
blob: 1cc6c748aeeb69750e4755c00bf9bed23e3c7d32 (plain)
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
47
48
{
  lib,
  buildDotnetModule,
  fetchFromGitHub,
  dotnetCorePackages,
}:
buildDotnetModule (finalAttrs: {
  pname = "n-m3u8dl-re";
  version = "0.6.0-beta";
  src = fetchFromGitHub {
    owner = "nilaoda";
    repo = "N_m3u8DL-RE";
    tag = "v${finalAttrs.version}";
    sha256 = "sha256-YqLlrQ5D16J9i/smEUaAsKeEvk7L+NhCBBPO0l5Y5Qo=";
  };

  patches = [
    # error: PublishTrimmed is implied by native compilation and cannot be disabled
    ./publish-fix.patch
  ];

  # from openutau/default.nix
  # [...]/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(248,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [[...]/N_m3u8DL-RE.Common.csproj]
  # [...]/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(248,5): error MSB4018: System.IO.IOException: The process cannot access the file '[...]/N_m3u8DL-RE.Common.deps.json' because it is being used by another process. [[...]/N_m3u8DL-RE.Common.csproj]
  enableParallelBuilding = false;

  projectFile = "src/N_m3u8DL-RE.sln";
  nugetDeps = ./deps.json;

  executables = [ "N_m3u8DL-RE" ];

  dotnet-sdk = dotnetCorePackages.sdk_10_0;
  dotnet-runtime = dotnetCorePackages.runtime_10_0;

  postFixup = ''
    ln -s $out/bin/N_m3u8DL-RE $out/bin/n-m3u8dl-re
  '';

  meta = {
    changelog = "https://github.com/nilaoda/N_m3u8DL-RE/releases/tag/v${finalAttrs.version}";
    description = "Cross-Platform, modern and powerful stream downloader for MPD/M3U8/ISM";
    homepage = "https://github.com/nilaoda/N_m3u8DL-RE";
    license = lib.licenses.mit;
    mainProgram = "n-m3u8dl-re";
    maintainers = with lib.maintainers; [ phanirithvij ];
    platforms = lib.platforms.unix;
  };
})