2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-04-27 09:35:20 +00:00
|
|
|
, autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, c-ares
|
|
|
|
, cryptopp
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
# build fails with latest ffmpeg, see https://github.com/meganz/MEGAcmd/issues/523.
|
|
|
|
# to be re-enabled when patch available
|
|
|
|
# , ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
, gcc-unwrapped
|
2024-06-05 15:53:02 +00:00
|
|
|
, icu
|
2020-04-24 23:36:52 +00:00
|
|
|
, libmediainfo
|
|
|
|
, libraw
|
|
|
|
, libsodium
|
|
|
|
, libuv
|
|
|
|
, libzen
|
|
|
|
, pcre-cpp
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, readline
|
|
|
|
, sqlite
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "megacmd";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meganz";
|
|
|
|
repo = "MEGAcmd";
|
|
|
|
rev = "${version}_Linux";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-UlSqwM8GQKeG8/K0t5DbM034NQOeBg+ujNi/MMsVCuM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
c-ares
|
|
|
|
cryptopp
|
|
|
|
curl
|
2021-05-20 23:08:51 +00:00
|
|
|
# ffmpeg
|
2024-06-05 15:53:02 +00:00
|
|
|
icu
|
2020-04-24 23:36:52 +00:00
|
|
|
gcc-unwrapped
|
|
|
|
libmediainfo
|
|
|
|
libraw
|
|
|
|
libsodium
|
|
|
|
libuv
|
|
|
|
libzen
|
|
|
|
pcre-cpp
|
|
|
|
readline
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-curl-checks"
|
|
|
|
"--disable-examples"
|
|
|
|
"--with-cares"
|
|
|
|
"--with-cryptopp"
|
|
|
|
"--with-curl"
|
2021-05-20 23:08:51 +00:00
|
|
|
# "--with-ffmpeg"
|
2024-04-21 15:54:59 +00:00
|
|
|
"--without-freeimage" # disabled as freeimage is insecure
|
2024-06-05 15:53:02 +00:00
|
|
|
"--with-icu"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-libmediainfo"
|
|
|
|
"--with-libuv"
|
|
|
|
"--with-libzen"
|
|
|
|
"--with-pcre"
|
|
|
|
"--with-readline"
|
|
|
|
"--with-sodium"
|
|
|
|
"--with-termcap"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "MEGA Command Line Interactive and Scriptable Application";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://mega.io/cmd";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ bsd2 gpl3Only ];
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ lunik1 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|