summaryrefslogtreecommitdiff
path: root/pkgs/by-name/qb/qbittorrent-cli/package.nix
blob: a58a8bbe72820972a679a2819239eaeb537e21ed (about) (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  lib,
  buildDotnetModule,
  fetchFromGitHub,
  versionCheckHook,
  nix-update-script,
}:
let
  version = "1.8.24285.1";
in
buildDotnetModule {
  pname = "qbittorrent-cli";
  inherit version;

  src = fetchFromGitHub {
    owner = "fedarovich";
    repo = "qbittorrent-cli";
    tag = "v${version}";
    hash = "sha256-ZGK8nicaXlDIShACeF4QS0BOCZCN0T4JFtHuuFoXhBw=";
  };

  nugetDeps = ./deps.json;
  dotnetBuildFlags = [
    "-f"
    "net6"
  ];
  dotnetInstallFlags = [
    "-f"
    "net6"
  ];
  selfContainedBuild = true;

  projectFile = "src/QBittorrent.CommandLineInterface/QBittorrent.CommandLineInterface.csproj";
  executables = [ "qbt" ];

  nativeInstallCheckInputs = [
    versionCheckHook
  ];

  versionCheckProgram = "${placeholder "out"}/bin/qbt";
  versionCheckProgramArg = "--version";
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Command line interface for qBittorrent";
    homepage = "https://github.com/fedarovich/qbittorrent-cli";
    changelog = "https://github.com/fedarovich/qbittorrent-cli/releases/tag/v${version}";
    license = with lib.licenses; [
      mit
    ];
    platforms = lib.platforms.unix;
    badPlatforms = [
      # error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'
      "aarch64-darwin"
    ];
    maintainers = with lib.maintainers; [
      pta2002
    ];
    mainProgram = "qbt";
  };
}