git.iko.soy/typeable/nixpkgs
on master help sign in
reworked patches

lincense free -> unfree enabled parallel build Signed-off-by: Michal Minář <mic.liamg@gmail.com>

commita2585fff238949c45d1f4bb4be0ffddb641b4eac authorMichal Minář <mic.liamg@gmail.com> dateTue 25 Jun 2019, 04:23 (7 years ago) parent6877159
3 files changed+45−11
pkgs/applications/misc/megasync/default.nix+11−11 pkgs/applications/misc/megasync/install-megasync.patch+21 pkgs/applications/misc/megasync/noinstall-distro-version.patch+13
pkgs/applications/misc/megasync/default.nix+11−11
@@ -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 };
pkgs/applications/misc/megasync/install-megasync.patchnew file+21
@@ -0,0 +1,21 @@
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
pkgs/applications/misc/megasync/noinstall-distro-version.patchnew file+13
@@ -0,0 +1,13 @@
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 \