all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jaft <jaft.r@outlook.com>
To: "52238@debbugs.gnu.org" <52238@debbugs.gnu.org>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [bug#52238] [PATCH] gnu: Add MEGA SDK
Date: Fri, 17 Dec 2021 22:30:55 +0000 (UTC)	[thread overview]
Message-ID: <DM6PR19MB2460B452084109E9FD488E8999789@DM6PR19MB2460.namprd19.prod.outlook.com> (raw)
In-Reply-To: <a7ef0719459f095dfe41bb3d12a5d77530c195bd.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

> On Monday, December 6, 2021, 01:53:09 PM CST, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote: 
>
>
>
>
>
> Am Donnerstag, den 02.12.2021, 06:32 +0000 schrieb Jaft:
> > * gnu/packages/mega.scm (mega-sdk):Add MEGA SDK
> Should be "New variable."

Which part should be "New variable"? "* gnu/packages/mega.scm (mega-sdk): New variable"? Or the whole line? "* New variable"?

> > The SDK is a dependency of MEGAsync so I thought to make a new file
> > since there's multiple packages that are MEGA related and then I
> > discovered that the megacmd package exists; is it better for this to
> > be placed in sync.scm, next to megacmd?
> Sync is good.  If existing Mega packages use the SDK, try to unbundle
> them.

Makes sense; megatools doesn't seem to rely on it but megacmd pulls from git recursively since the SDK repo.'s setup as a module for it so I've adjusted that definition to make use of the SDK, now.

> > ---
> I don't know if I told you that yet, but comments ought to go below
> this line.

Mmm, I think you did but I must've misunderstood as I thought you were saying the opposite; noted and I'll do it the other way, going forward.

> > +    (package
> > +      (name "mega-sdk")
> > +      (version version)
> There's no reason to let-bind version if you're just going to assign it
> here anyway.

It hadn't been clear to me that the macro functions in that fashion; I've removed the use of let.

> > +      (arguments `(#:tests? #f))
> Never leave #:tests? #f uncommented.

Makes sense; that's been revised.

> > +      (home-page "https://mega.nz/sdk")
> > +      (synopsis "SDK for the MEGA service, offered by MEGA Limited")
> Sponsored by RAID: Shadow Legends.

I don't understand what this is communicating.

> Given the megacli command, what's the relation to existing MEGA
> packages, particularly megacmd?
>
> Cheers

Noted above (and addressed in the new patch).

It seems like I'll likely have to make further changes but I've attached what I have for the patch, thus far, just to keep track of what changes have been made.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mega-sdk.patch --]
[-- Type: text/x-patch, Size: 2814 bytes --]

* gnu/packages/sync.scm (mega-sdk): Add MEGA SDK
---
gnu/packages/sync.scm | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index ce815ed5c7..064e68c431 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -213,6 +213,46 @@ (define-public nextcloud-client
                    license:lgpl2.1+  ; qtokenizer
                    license:gpl2+))))
 
+(define-public mega-sdk
+  (package
+    (name "mega-sdk")
+    (version "3.9.10")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/meganz/sdk/")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256 (base32
+                       "08qw23rm4rrvlsbcixrncbi5x0qgqkpx74l5f1gq2rgll0ksx8ph"))
+              (modules '((guix build utils)))))
+    (build-system gnu-build-system)
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)))
+    (inputs `(("c-ares" ,c-ares)
+              ("crypto++" ,crypto++)
+              ("curl" ,curl)
+              ("freeimage" ,freeimage)
+              ("libsodium" ,libsodium)
+              ("openssl" ,openssl)
+              ("readline" ,readline)
+              ("sqlite" ,sqlite)
+              ("zlib" ,zlib)))
+    ;; XXX: Disabling tests because they depend on libgtest.la from googletest,
+    ;; which is not installed for unclear reasons.
+    (arguments `(#:tests? #f))
+    (home-page "https://mega.nz/sdk")
+    (synopsis "SDK for the MEGA service, offered by MEGA Limited")
+    (description "A low-level SDK for the MEGA service which powers the
+file-sharing site.  This package provides two executables:
+@itemize
+@item megacli: a command-line tool that allows usage of all SDK features
+@item megasimplesync: a command line tool that allows usage of the
+synchronization engine
+@end itemize")
+    (license license:bsd-2)))
+
 (define-public megacmd
   (package
     (name "megacmd")
@@ -222,8 +262,7 @@ (define-public megacmd
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/meganz/MEGAcmd")
-              (commit (string-append version "_Linux"))
-              (recursive? #t)))
+              (commit (string-append version "_Linux"))))
         (sha256
          (base32
           "004j8m3xs6slx03g2g6wzr97myl2v3zc09wxnfar5c62a625pd53"))
@@ -242,6 +281,7 @@ (define-public megacmd
        ("curl" ,curl)
        ("freeimage" ,freeimage)
        ("gtest" ,googletest)
+       ("mega-sdk" ,mega-sdk)
        ("openssl" ,openssl)
        ("pcre" ,pcre)
        ("readline" ,readline)

  reply	other threads:[~2021-12-17 22:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1136809883.7440498.1638426746315.ref@mail.yahoo.com>
2021-12-02  6:32 ` [bug#52238] [PATCH] gnu: Add MEGA SDK Jaft
2021-12-06 19:52   ` Liliana Marie Prikler
2021-12-17 22:30     ` Jaft [this message]
2021-12-17 23:22       ` Liliana Marie Prikler
2021-12-18  5:14         ` Jaft
2021-12-18  7:47           ` Liliana Marie Prikler
2021-12-20  1:58             ` Jaft
2021-12-20 20:08               ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR19MB2460B452084109E9FD488E8999789@DM6PR19MB2460.namprd19.prod.outlook.com \
    --to=jaft.r@outlook.com \
    --cc=52238@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.