megasync: update, cleanup, move to by-name (#389764)
This commit is contained in:
+72
-60
@@ -1,49 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
c-ares,
|
||||
cmake,
|
||||
cryptopp,
|
||||
curl,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
# nativeBuildInputs
|
||||
cmake,
|
||||
libsForQt5,
|
||||
libtool,
|
||||
pkg-config,
|
||||
unzip,
|
||||
|
||||
# buildInputs
|
||||
c-ares,
|
||||
cryptopp,
|
||||
curl,
|
||||
ffmpeg,
|
||||
hicolor-icon-theme,
|
||||
icu,
|
||||
libmediainfo,
|
||||
libsodium,
|
||||
libtool,
|
||||
libuv,
|
||||
libxcb,
|
||||
libzen,
|
||||
mkDerivation,
|
||||
openssl,
|
||||
pkg-config,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtgraphicaleffects,
|
||||
qttools,
|
||||
qtquickcontrols,
|
||||
qtquickcontrols2,
|
||||
qtsvg,
|
||||
qtx11extras,
|
||||
readline,
|
||||
sqlite,
|
||||
unzip,
|
||||
wget,
|
||||
xorg,
|
||||
zlib,
|
||||
qt5,
|
||||
|
||||
nix-update-script,
|
||||
}:
|
||||
mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "megasync";
|
||||
version = "5.7.1.0";
|
||||
version = "5.8.0.2";
|
||||
|
||||
src = fetchFromGitHub rec {
|
||||
owner = "meganz";
|
||||
repo = "MEGAsync";
|
||||
rev = "v${version}_Linux";
|
||||
hash = "sha256-lbAI17CyHrppMnxQDV5g0IE+I7Y0DwU+h5MSFZclD2A=";
|
||||
tag = "v${finalAttrs.version}_Linux";
|
||||
hash = "sha256-/q7LD1/06+0MepDz3fVrlvGKh+rvNk6d1hm7Ng54Nmk=";
|
||||
fetchSubmodules = false; # DesignTokensImporter cannot be fetched, see #1010 in github:meganz/megasync
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
@@ -52,46 +49,13 @@ mkDerivation rec {
|
||||
git remote add origin $url
|
||||
git fetch origin
|
||||
git clean -fdx
|
||||
git checkout ${rev}
|
||||
git checkout ${tag}
|
||||
git submodule update --init src/MEGASync/mega
|
||||
|
||||
rm -rf .git
|
||||
''; # Why so complicated, I just want a single submodule
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
libtool
|
||||
pkg-config
|
||||
qttools
|
||||
unzip
|
||||
];
|
||||
buildInputs = [
|
||||
c-ares
|
||||
cryptopp
|
||||
curl
|
||||
ffmpeg
|
||||
hicolor-icon-theme
|
||||
icu
|
||||
libmediainfo
|
||||
libsodium
|
||||
libuv
|
||||
libxcb
|
||||
libzen
|
||||
openssl
|
||||
qtbase
|
||||
qtdeclarative
|
||||
qtgraphicaleffects
|
||||
qtquickcontrols
|
||||
qtquickcontrols2
|
||||
qtsvg
|
||||
qtx11extras
|
||||
readline
|
||||
sqlite
|
||||
wget
|
||||
zlib
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/020-megasync-sdk-fix-cmake-dependencies-detection.patch?h=megasync&id=ff59780039697591e7e3a966db058b23bee0451c";
|
||||
@@ -108,12 +72,49 @@ mkDerivation rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace cmake/modules/desktopapp_options.cmake --replace-fail "ENABLE_ISOLATED_GFX ON" "ENABLE_ISOLATED_GFX OFF"
|
||||
substituteInPlace cmake/modules/desktopapp_options.cmake \
|
||||
--replace-fail "ENABLE_ISOLATED_GFX ON" "ENABLE_ISOLATED_GFX OFF"
|
||||
|
||||
for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do
|
||||
substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}"
|
||||
substituteInPlace "$file" --replace-warn "/bin/bash" "${stdenv.shell}"
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
libsForQt5.qttools
|
||||
libsForQt5.wrapQtAppsHook
|
||||
libtool
|
||||
pkg-config
|
||||
unzip
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
c-ares
|
||||
cryptopp
|
||||
curl
|
||||
ffmpeg
|
||||
hicolor-icon-theme
|
||||
icu
|
||||
libmediainfo
|
||||
libsForQt5.qtbase
|
||||
libsForQt5.qtdeclarative
|
||||
libsForQt5.qtgraphicaleffects
|
||||
libsForQt5.qtquickcontrols
|
||||
libsForQt5.qtquickcontrols2
|
||||
libsForQt5.qtsvg
|
||||
libsForQt5.qtx11extras
|
||||
libsodium
|
||||
libuv
|
||||
libxcb
|
||||
libzen
|
||||
openssl
|
||||
readline
|
||||
sqlite
|
||||
wget
|
||||
zlib
|
||||
];
|
||||
|
||||
dontUseQmakeConfigure = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -127,14 +128,25 @@ mkDerivation rec {
|
||||
qtWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ xorg.xrdb ]})
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex=^v(.*)_Linux$"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Easy automated syncing between your computers and your MEGA Cloud Drive";
|
||||
homepage = "https://mega.nz/";
|
||||
license = licenses.unfree;
|
||||
downloadPage = "https://github.com/meganz/MEGAsync";
|
||||
changelog = "https://github.com/meganz/MEGAsync/releases/tag/v${finalAttrs.version}_Linux";
|
||||
license = lib.licenses.unfree;
|
||||
platforms = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
maintainers = [ ];
|
||||
mainProgram = "megasync";
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -2445,8 +2445,6 @@ with pkgs;
|
||||
|
||||
materialx = with python3Packages; toPythonApplication materialx;
|
||||
|
||||
megasync = libsForQt5.callPackage ../applications/misc/megasync { };
|
||||
|
||||
# while building documentation meson may want to run binaries for host
|
||||
# which needs an emulator
|
||||
# example of an error which this fixes
|
||||
|
||||
Reference in New Issue
Block a user