xarcan: add mesa to buildInputs (#370901)
[NixPkgs.git] / pkgs / tools / misc / torrenttools / default.nix
blob27e7eae1bd45ff0aae8a4104e78679049688026c
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   bencode,
6   catch2,
7   cli11,
8   cmake,
9   ctre,
10   expected-lite,
11   fmt,
12   gsl-lite,
13   howard-hinnant-date,
14   yaml-cpp,
15   ninja,
16   nlohmann_json,
17   openssl,
18   re2,
19   sigslot,
22 stdenv.mkDerivation rec {
23   pname = "torrenttools";
24   version = "0.6.2";
26   srcs = [
27     (fetchFromGitHub rec {
28       owner = "fbdtemme";
29       repo = "torrenttools";
30       rev = "v${version}";
31       hash = "sha256-3rAxw4JM5ruOn0ccKnpdCnUWUPTQOUvRYz8OKU/FpJ8=";
32       name = repo;
33     })
34     (fetchFromGitHub rec {
35       owner = "fbdtemme";
36       repo = "cliprogress";
37       rev = "a887519e360e44c1ef88ea4ef7df652ea049c502";
38       hash = "sha256-nVvzez5GB57qSj2SLaxdYlkSX8rRM06H2NnLQGCDWMg=";
39       name = repo;
40     })
41     (fetchFromGitHub rec {
42       owner = "fbdtemme";
43       repo = "dottorrent";
44       rev = "38ac810d6bb3628fd3ce49150c9fb641bb5e78cd";
45       hash = "sha256-0H9h0Hud0Fd64lY0pxQ96coDOEDr5wh8v1sNT1lBxb0=";
46       name = repo;
47     })
48     (fetchFromGitHub rec {
49       owner = "fbdtemme";
50       repo = "termcontrol";
51       rev = "c53eec4efe0e163871d9eb54dc074c25cd01abf0";
52       hash = "sha256-0j78QtEkhlssVivPl709o5Pf36TzhOZ6VHaqDiH0L0I=";
53       name = repo;
54     })
55   ];
56   sourceRoot = "torrenttools";
58   patches = [
59     ./fmt-9.patch
60   ];
62   postUnpack = ''
63     cp -pr cliprogress torrenttools/external/cliprogress
64     cp -pr dottorrent torrenttools/external/dottorrent
65     cp -pr termcontrol torrenttools/external/termcontrol
66     chmod -R u+w -- "$sourceRoot"
67   '';
69   nativeBuildInputs = [
70     cmake
71     ninja
72   ];
74   buildInputs = [
75     bencode
76     catch2
77     cli11
78     ctre
79     expected-lite
80     fmt
81     gsl-lite
82     howard-hinnant-date
83     yaml-cpp
84     nlohmann_json
85     openssl
86     re2
87     sigslot
88   ];
90   cmakeFlags = [
91     "-DTORRENTTOOLS_BUILD_TESTS:BOOL=ON"
92     "-DTORRENTTOOLS_TBB:BOOL=OFF" # Our TBB doesn't expose a CMake module.
93   ];
95   doCheck = true;
97   meta = with lib; {
98     description = "CLI tool for creating, inspecting and modifying BitTorrent metafiles";
99     homepage = "https://github.com/fbdtemme/torrenttools";
100     license = licenses.mit;
101     maintainers = with maintainers; [ azahi ];
102     platforms = platforms.unix;
103     mainProgram = "torrenttools";
104   };