reworked patches

lincense free -> unfree
enabled parallel build

Signed-off-by: Michal Minář <mic.liamg@gmail.com>

+45 -11
+11 -11
pkgs/applications/misc/megasync/default.nix
··· 64 64 wget 65 65 ]; 66 66 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 = [ 72 68 # Distro and version targets attempt to use lsb_release which is broken 73 69 # (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 77 71 # 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 80 79 ''; 81 80 82 81 dontUseQmakeConfigure = true; 82 + enableParallelBuilding = true; 83 83 84 84 preConfigure = '' 85 85 cd src/MEGASync/mega ··· 118 118 meta = with stdenv.lib; { 119 119 description = "Easy automated syncing between your computers and your MEGA Cloud Drive"; 120 120 homepage = https://mega.nz/; 121 - license = licenses.free; 121 + license = licenses.unfree; 122 122 platforms = [ "i686-linux" "x86_64-linux" ]; 123 123 maintainers = [ maintainers.michojel ]; 124 124 };
+21
pkgs/applications/misc/megasync/install-megasync.patch
··· 1 + Index: source/src/MEGASync/MEGASync.pro 2 + =================================================================== 3 + --- source.orig/src/MEGASync/MEGASync.pro 4 + +++ source/src/MEGASync/MEGASync.pro 5 + @@ -28,11 +28,11 @@ unix:!macx { 6 + TARGET = megasync 7 + 8 + # Uncomment the following if "make install" doesn't copy megasync in /usr/bin directory 9 + -# isEmpty(PREFIX) { 10 + -# PREFIX = /usr 11 + -# } 12 + -# target.path = $$PREFIX/bin 13 + -# INSTALLS += target 14 + + isEmpty(PREFIX) { 15 + + PREFIX = /usr 16 + + } 17 + + target.path = $$PREFIX/bin 18 + + INSTALLS += target 19 + } 20 + else { 21 + TARGET = MEGAsync
+13
pkgs/applications/misc/megasync/noinstall-distro-version.patch
··· 1 + Index: source/src/MEGASync/platform/platform.pri 2 + =================================================================== 3 + --- source.orig/src/MEGASync/platform/platform.pri 4 + +++ source/src/MEGASync/platform/platform.pri 5 + @@ -37,7 +37,7 @@ unix:!macx { 6 + system(command -v lsb_release): version.commands = lsb_release -rs > $$version.target 7 + version.files = $$version.target 8 + 9 + - INSTALLS += distro version 10 + + # INSTALLS += distro version 11 + 12 + QT += dbus 13 + SOURCES += $$PWD/linux/LinuxPlatform.cpp \