1{ lib
2, stdenv
3, autoreconfHook
4, c-ares
5, cryptopp
6, curl
7, fetchFromGitHub
8 # build fails with latest ffmpeg, see https://github.com/meganz/MEGAcmd/issues/523.
9 # to be re-enabled when patch available
10 # , ffmpeg
11, freeimage
12, gcc-unwrapped
13, libmediainfo
14, libraw
15, libsodium
16, libuv
17, libzen
18, pcre-cpp
19, pkg-config
20, readline
21, sqlite
22}:
23
24stdenv.mkDerivation rec {
25 pname = "megacmd";
26 version = "1.6.3";
27
28 src = fetchFromGitHub {
29 owner = "meganz";
30 repo = "MEGAcmd";
31 rev = "${version}_Linux";
32 sha256 = "sha256-JnxfFbM+NyeUrEMok62zlsQIxjrUvLLg4tUTiKPDZFc=";
33 fetchSubmodules = true;
34 };
35
36 enableParallelBuilding = true;
37 nativeBuildInputs = [ autoreconfHook pkg-config ];
38
39 buildInputs = [
40 c-ares
41 cryptopp
42 curl
43 # ffmpeg
44 freeimage
45 gcc-unwrapped
46 libmediainfo
47 libraw
48 libsodium
49 libuv
50 libzen
51 pcre-cpp
52 readline
53 sqlite
54 ];
55
56 configureFlags = [
57 "--disable-curl-checks"
58 "--disable-examples"
59 "--with-cares"
60 "--with-cryptopp"
61 "--with-curl"
62 # "--with-ffmpeg"
63 "--with-freeimage"
64 "--with-libmediainfo"
65 "--with-libuv"
66 "--with-libzen"
67 "--with-pcre"
68 "--with-readline"
69 "--with-sodium"
70 "--with-termcap"
71 ];
72
73 meta = with lib; {
74 description = "MEGA Command Line Interactive and Scriptable Application";
75 homepage = "https://mega.io/cmd";
76 license = with licenses; [ bsd2 gpl3Only ];
77 platforms = [ "i686-linux" "x86_64-linux" ];
78 maintainers = with maintainers; [ lunik1 ];
79 };
80}