@@ -64,22 +64,22 @@ stdenv.mkDerivation rec {
6464 wget
6565 ];
6666
67− patchPhase = ''
68− for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do
69− substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}"
70− done
71−
67+ patches = [
7268 # Distro and version targets attempt to use lsb_release which is broken
7369 # (see issue: https://github.com/NixOS/nixpkgs/issues/22729)
74− substituteInPlace src/MEGASync/platform/platform.pri \
75− --replace "INSTALLS += distro" "# INSTALLS += distro"
76−
70+ ./noinstall-distro-version.patch
7771 # megasync target is not part of the install rule thanks to a commented block
78− sed -i '/#\s*isEmpty(PREFIX)/,/#\s*INSTALLS\s*+=\s*target/s/^\s*#//' \
79− src/MEGASync/MEGASync.pro
72+ ./install-megasync.patch
73+ ];
74+
75+ postPatch = ''
76+ for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do
77+ substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}"
78+ done
8079 '';
8180
8281 dontUseQmakeConfigure = true;
82+ enableParallelBuilding = true;
8383
8484 preConfigure = ''
8585 cd src/MEGASync/mega
@@ -118,7 +118,7 @@ stdenv.mkDerivation rec {
118118 meta = with stdenv.lib; {
119119 description = "Easy automated syncing between your computers and your MEGA Cloud Drive";
120120 homepage = https://mega.nz/;
121− license = licenses.free;
121+ license = licenses.unfree;
122122 platforms = [ "i686-linux" "x86_64-linux" ];
123123 maintainers = [ maintainers.michojel ];
124124 };