summary refs log tree commit diff
path: root/pkgs/applications/misc/megasync
diff options
context:
space:
mode:
authorElXreno <40758597+ElXreno@users.noreply.github.com>2019-02-09 01:46:43 +0300
committerMatthew Bauer <mjbauer95@gmail.com>2019-02-08 17:46:43 -0500
commit7a1d22c6008a73fd57a7178904b84cff8b61f93f (patch)
tree74bdc3227b29a61c8f77d0f26aa5a9d08b8c6723 /pkgs/applications/misc/megasync
parente9c92029a9814f2b68c2f7014b59edf2eea0f1d7 (diff)
downloadnixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar.gz
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar.bz2
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar.lz
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar.xz
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.tar.zst
nixpkgs-7a1d22c6008a73fd57a7178904b84cff8b61f93f.zip
megasync: init at 3.7.1.0 (#53126)
* megasync: init at 3.7.1.0

* Removed inkscape from dependencies
Diffstat (limited to 'pkgs/applications/misc/megasync')
-rw-r--r--pkgs/applications/misc/megasync/default.nix129
1 files changed, 129 insertions, 0 deletions
diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix
new file mode 100644
index 00000000000..c0162ae729f
--- /dev/null
+++ b/pkgs/applications/misc/megasync/default.nix
@@ -0,0 +1,129 @@
+{ stdenv
+, autoconf
+, automake
+, bash
+, bashInteractive
+, c-ares
+, cryptopp
+, curl
+, doxygen
+, freeimage
+, fetchFromGitHub
+, hicolor-icon-theme
+, libmediainfo
+, libraw
+, libsodium
+, libtool
+, libuv
+, libzen
+, lsb-release
+, makeDesktopItem
+, pkgconfig
+, qt5
+, readline
+, sqlite
+, swig
+, unzip
+, wget }:
+
+stdenv.mkDerivation rec {
+  name = "megasync-${version}";
+  version = "3.7.1.0";
+
+  src = fetchFromGitHub {
+    owner = "meganz";
+    repo = "MEGAsync";
+    rev = "v${version}_Linux";
+    sha256 = "1spw2xc3m02rxljdv8z3zm8a3yyrk4a355q81zgh84jwkfds9qjy";
+    fetchSubmodules = true;
+  };
+  
+  desktopItem = makeDesktopItem {
+    name = "megasync";
+    exec = "megasync";
+    icon = "megasync";
+    comment = meta.description;
+    desktopName = "MEGASync";
+    genericName = "File Synchronizer";
+    categories = "Network;FileTransfer;";
+    startupNotify = "false";
+  };
+
+  nativeBuildInputs = [ 
+    doxygen
+    libsodium
+    lsb-release
+    qt5.qmake
+    qt5.qttools
+    swig
+  ];
+  buildInputs = [ 
+    autoconf
+    automake
+    bash
+    c-ares
+    cryptopp
+    curl
+    freeimage
+    hicolor-icon-theme
+    libmediainfo
+    libraw
+    libtool
+    libuv
+    libzen
+    pkgconfig
+    qt5.qtbase
+    qt5.qtsvg
+    sqlite
+    unzip
+    wget 
+  ];
+  
+  patchPhase = ''
+    for file in $(find src/ -type f \( -iname configure -o -iname \*.sh  \) ); do
+      substituteInPlace "$file" \
+        --replace "/bin/bash" "${bashInteractive}/bin/bash"
+    done
+  '';
+  
+  configurePhase = ''
+    cd src/MEGASync/mega
+    ./autogen.sh
+    ./configure \
+        --disable-examples \
+        --disable-java \
+        --disable-php \
+        --disable-python \
+        --enable-chat \
+        --with-cares \
+        --with-cryptopp \
+        --with-curl \
+        --with-sodium \
+        --with-sqlite \
+        --with-zlib \
+        --without-freeimage \
+        --without-termcap \
+        --without-ffmpeg
+    cd ../..
+  '';
+  
+  buildPhase = ''
+    qmake CONFIG+="release" MEGA.pro
+    lrelease MEGASync/MEGASync.pro
+    make -j $NIX_BUILD_CORES
+  '';
+  
+  installPhase = ''
+    mkdir -p $out/share/icons
+    install -Dm 755 MEGASync/megasync $out/bin/megasync
+    cp -r ${desktopItem}/share/applications $out/share
+    cp MEGASync/gui/images/uptodate.svg $out/share/icons/megasync.svg
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Easy automated syncing between your computers and your MEGA Cloud Drive";
+    homepage    = https://mega.nz/;
+    license     = licenses.free;
+    platforms   = [ "i686-linux" "x86_64-linux" ];
+  };
+}