1 line
9.2 KiB
Plaintext
1 line
9.2 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p><strong>EDIT:</strong> Got it! Still need to make sure there won't be unexpected bugs but it seems to be working, thus far.</p> <p><a href="https://preview.redd.it/ciasskxxkz281.png?width=1366&format=png&auto=webp&s=b1c00b1488fc5ccfd768da8198a29635aafabae9">Image Description: a screenshot of my computer screen with the popup of Megasync displayed, downloading my files; the icon in the systray is not visible but would be between some text showing the temperature outside and an icon of my Wi-Fi's signal strength.</a></p> <p>​</p> <p><strong>ORIGINAL:</strong></p> <p>Or, in other words, I could use some help.</p> <p>I'm not terribly familiar with <code>make</code> and associated tools but I have this, so far:</p> <pre><code>(use-modules ((guix licenses) #:prefix license:) (guix utils) (guix packages) (guix git-download) (guix build-system gnu) (gnu packages qt) (gnu packages pkg-config) (gnu packages autotools) (gnu packages compression) (gnu packages wget) (gnu packages crypto) (gnu packages libevent) (gnu packages sqlite) (gnu packages cpp) (gnu packages video) (gnu packages image)) (let ([version "4.6.1.0"] [commit "8d77d99ee3816f115c93e9aabbf4bf17d2a749c2"] [revision "0"]) (package (name "megasync") (version (git-version version revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/meganz/MEGAsync/") (commit commit) (recursive? #t))) ; for SDK (file-name (git-file-name name version)) (sha256 (base32 "0v2fvji9hs7valya0wx5qjx01c7yjld6nnp6m9gpxfkr30h5s5wb")) (modules '((guix build utils))))) (build-system gnu-build-system) (inputs `(("qtbase" ,qtbase-5))) (native-inputs `(("pkg-config" ,pkg-config) ("libtool" ,libtool) ("unzip" ,unzip) ("autoconf" ,autoconf) ("wget" ,wget) ("automake" ,automake) ;; ("curl" ,curl) ("libsodium" ,libsodium) ("libuv" ,libuv) ("zlib" ,zlib) ("sqlite" ,sqlite) ("libzen" ,libzen) ("libmediainfo" ,libmediainfo) ("freeimage" ,freeimage))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'remove-externals (lambda* (#:key outputs #:allow-other-keys) (delete-file-recursively "build") (substitute* "src/configure" [("FLAG_DISABLE_ZLIB=\"\"") "FLAG_DISABLE_ZLIB=\"-z\""] [("FLAG_RAW -w -s -v -u -o ") "FLAG_RAW -w -s -o "] [(" -u \\\\") " \\"] [(" -v \\\\") " \\"] [("\\$FLAG_LIBMEDIA") "-i"]) (substitute* "src/MEGASync/mega/contrib/build_sdk.sh" [(" sqlite_pkg \\$build_dir \\$install_dir") ""] [("\\$disable_freeimage") "1"] [("\\./configure") (string-append (which "bash") " ./configure")]) (chdir "src"))) (add-after 'configure 'run-qmake (lambda* (#:key outputs #:allow-other-keys) (invoke "qmake" "MEGA.pro") (invoke "lrelease" "MEGASync/MEGASync.pro")))))) (home-page "https://mega.io/sync/") (synopsis "Synopsis") (description "Description.") (license license:bsd-3))) </code></pre> <p>The build has a lot of external libraries it tries to download so I tried adjusting the <code>configure</code> so they would skip getting build but still provide them as <code>input</code>s; I may need to handle that differently or there may be flags I could, instead, pass rather than editing the files directly but I was just trying to get something to build, for starters.</p> <p>If you try installing the file, you'll find that a second <code>configure</code> file causes things to fail; the issue is that <a href="https://configure.ac"><code>configure.ac</code></a> generates <code>compile</code>, <code>config.guess</code>, <code>config.sub</code>, <code>install-sh</code>, and <code>missing</code> and, I assume, the second <code>configure</code> script but it does so with <code>#!/bin/sh</code>, rather than with the <code>bash</code> that Guix is using.</p> <p>Since these scripts get generated by <a href="https://configure.ac"><code>configure.ac</code></a> – after the GNU build system has finished updating all locations of <code>#!/bin/sh</code> –, it also means that it's in the middle of the <code>configure</code> phase, as part of when <code>src/configure</code> is being run: so I don't know how to update it, any. I'd…imagine(?) there's a way to set what shebang is used for these generated scripts but, like I mentioned, I'm unfamiliar with the tooling and wasn't able to figure it out.</p> <p>Also – in case anyone knows or wants to help –, I'll put the log results here, in case there's anything that'd be helpful that I might miss in my unfamiliarity. It's just the configure portion as my computer is having trouble copying the whole thing and Reddit's code block seems to be having trouble with formatting:</p> <pre><code>starting phase `configure' source directory: "/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src" (relative from build: ".") build directory: "/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src" configure flags: ("CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash" "SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash" "--prefix=/gnu/store/w61fk4arlj3i1fpxm72pa0z00y9aaajb-megasync-4.6.1.0-0.8d77d99" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu") * Enabling Drive Notifications (libudev / wbemuuid). * Disabling external MediaInfo * Disabling external FreeImage * Disabling external libz. * Downloading software archives only. * Disabling OpenSSL * Storing local archive files in /tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/archivesSuccessfully downloaded MEGA SDK dependencies! * Storing local archive files in /tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/archives * Disabling external MediaInfo * Disabling external libz. * Using local files * Enabling Drive Notifications (libudev / wbemuuid). * Configure only * Disabling OpenSSL * Incremental build - skipping already built/downloaded dependencies * Installing into /tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty Configuring MEGA SDK autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /gnu/store/yk3zw1pqbs5wlf1lapf25986yjd0g736-autoconf-2.69/bin/autoconf --force autoreconf: running: /gnu/store/yk3zw1pqbs5wlf1lapf25986yjd0g736-autoconf-2.69/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:54: installing './compile' configure.ac:58: installing './config.guess' configure.ac:58: installing './config.sub' configure.ac:56: installing './install-sh' configure.ac:56: installing './missing' Makefile.am: installing './depcomp' bindings/python/include.am:2: installing './py-compile' Makefile.am:63: 'bindings/python/include.am' included from here parallel-tests: installing './test-driver' autoreconf: Leaving directory `.' running: ./configure --disable-shared --enable-static --disable-silent-rules --disable-curl-checks --disable-megaapi --with-cryptopp=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty --without-sodium --with-zlib=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty --with-sqlite=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty --with-cares=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty --with-curl=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty --without-freeimage --without-libuv --enable-drive-notifications --disable-posix-threads --disable-examples --prefix=/tmp/guix-build-megasync-4.6.1.0-0.8d77d99.drv-0/source/src/MEGASync/mega/bindings/qt/3rdparty ./contrib/build_sdk.sh: ./configure: /bin/sh: bad interpreter: No such file or directory ERROR! Please check log files. Exiting.. </code></pre> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/blah1998z"> /u/blah1998z </a> <br/> <span><a href="https://www.reddit.com/r/GUIX/comments/r5j58q/lets_get_megasync_into_guix/">[link]</a></span>   <span><a href="https://www.reddit.com/r/GUIX/comments/r5j58q/lets_get_megasync_into_guix/">[comments]</a></span> |