From: Leo Famulari <leo@famulari.name>
To: Roel Janssen <roel@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add mongodb.
Date: Fri, 18 Mar 2016 15:10:34 -0400 [thread overview]
Message-ID: <20160318191034.GD9682@jasmine> (raw)
In-Reply-To: <877fh1rvkn.fsf@gnu.org>
On Thu, Mar 17, 2016 at 04:08:24PM +0100, Roel Janssen wrote:
> Subject: [PATCH] gnu: Add mongodb.
Thanks for this patch!
> * gnu/packages/databases.scm (mongodb): New variable.
> * gnu/packages/patches/mongodb-add-version-file.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add patch file.
Okay.
[...]
> +(define-public mongodb
> + (package
> + (name "mongodb")
> + (version "3.3.3")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/mongodb/mongo/archive/r"
> + version ".tar.gz"))
Do you know if GitHub is the preferred or canonical source for mongodb
tarballs? Okay if so, but often the GitHub tarballs are auto-generated
snapshots, while the upstream project has specially prepared
distribution tarballs from their website.
I see a tarball here:
https://www.mongodb.org/downloads
Did you compare them? If not, will you do that and decide which is more
appropriate?
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32 "01v16j8xbry7m7apwlhiqhgx3zyyk2kadyk2sr9m6k20wnh5j24y"))
> + (patches (list (search-patch "mongodb-add-version-file.patch")))))
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("scons" ,scons)
> + ("python" ,python-2)
> + ("perl" ,perl)))
> + (arguments
> + `(#:tests? #f ; There is no 'check' target.
Wow, I would have expected a project like this to have a test suite.
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ; There is no configure phase
> + (add-after 'unpack 'scons-propagate-environment
> + (lambda _
> + ;; Modify the SConstruct file to arrange for
> + ;; environment variables to be propagated.
> + (substitute* "SConstruct"
> + (("^env = Environment\\(")
> + "env = Environment(ENV=os.environ, "))))
So, this saves the environment of the build process and propagates it to
run-time?
> + (replace 'build
> + (lambda _
> + (zero? (system* "scons" "mongod" "mongo" "mongos"))))
> + (replace 'install
> + (lambda _
> + (let ((bin (string-append (assoc-ref %outputs "out") "/bin")))
> + (install-file "mongod" bin)
> + (install-file "mongos" bin)
> + (install-file "mongo" bin)))))))
No libraries or documentation?
> + (home-page "https://www.mongodb.org/")
> + (synopsis "High performance and high availability document database")
> + (description "Mongo is a high-performance, high availability,
> +schema-free document-oriented database. A key goal of MongoDB is to bridge
> +the gap between key/value stores (which are fast and highly scalable) and
> +traditional RDBMS systems (which are deep in functionality).")
> + (license (list agpl3 asl2.0))))
> +
> (define-public postgresql
> (package
> (name "postgresql")
> diff --git a/gnu/packages/patches/mongodb-add-version-file.patch b/gnu/packages/patches/mongodb-add-version-file.patch
> new file mode 100644
> index 0000000..ffcb70e
> --- /dev/null
> +++ b/gnu/packages/patches/mongodb-add-version-file.patch
> @@ -0,0 +1,10 @@
> +This patch is used to replace the need for git. It's a work-around
> +for a problem described here: https://jira.mongodb.org/browse/SERVER-21317
> +
> +Patch by Roel Janssen <roel@gnu.org>
> +--- a/version.json 1970-01-01 01:00:00.000000000 +0100
> ++++ b/version.json 2016-03-16 15:10:23.933578071 +0100
> +@@ -0,0 +1,3 @@
> ++{
> ++ "version": "3.3.3-guix-"
> ++}
It's okay that this is different from the "version" field in the package
definition? Just checking...
> --
> 2.5.0
>
> Dear Guix,
>
> This is a patch to add MongoDB (server and client) tools. I used a
> three-line patch to fix the build process's reliance on Git and the
> .git/ directory.
>
> Kind regards,
> Roel Janssen
next prev parent reply other threads:[~2016-03-18 19:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 15:08 [PATCH] gnu: Add mongodb Roel Janssen
2016-03-18 19:10 ` Leo Famulari [this message]
2016-03-18 19:45 ` Thompson, David
2016-03-18 20:46 ` Ludovic Courtès
2016-03-19 9:19 ` Roel Janssen
2016-04-29 14:48 ` Ludovic Courtès
2016-04-30 0:06 ` Roel Janssen
2017-08-23 9:30 ` Christopher Baines
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160318191034.GD9682@jasmine \
--to=leo@famulari.name \
--cc=guix-devel@gnu.org \
--cc=roel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).