Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gsoc Contributions NPM (VS master at moment of deadline) #1

Open
wants to merge 9 commits into
base: base-gsoc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ MODULES = \
guix/build-system/glib-or-gtk.scm \
guix/build-system/gnu.scm \
guix/build-system/haskell.scm \
guix/build-system/node.scm \
guix/build-system/perl.scm \
guix/build-system/python.scm \
guix/build-system/waf.scm \
Expand All @@ -88,6 +89,7 @@ MODULES = \
guix/build/glib-or-gtk-build-system.scm \
guix/build/gnu-build-system.scm \
guix/build/gnu-dist.scm \
guix/build/node-build-system.scm \
guix/build/perl-build-system.scm \
guix/build/python-build-system.scm \
guix/build/r-build-system.scm \
Expand Down Expand Up @@ -151,6 +153,8 @@ if HAVE_GUILE_JSON
MODULES += \
guix/import/github.scm \
guix/import/json.scm \
guix/import/npm.scm \
guix/scripts/import/npm.scm \
guix/import/pypi.scm \
guix/scripts/import/pypi.scm \
guix/import/cpan.scm \
Expand Down Expand Up @@ -266,6 +270,7 @@ if HAVE_GUILE_JSON
SCM_TESTS += \
tests/pypi.scm \
tests/cpan.scm \
tests/npm.scm \
tests/gem.scm

endif
Expand Down
41 changes: 41 additions & 0 deletions doc/guix.texi
Original file line number Diff line number Diff line change
Expand Up @@ -3074,6 +3074,17 @@ Which Haskell compiler is used can be specified with the @code{#:haskell}
parameter which defaults to @code{ghc}.
@end defvr

@defvr {Scheme Variable} node-build-system
This variable is exported by @code{(guix build-system node)}. It
implements the build procedure used by @uref{http://nodejs.org,
Node.js}, which implements an approximation of the @code{npm install}
command, followed by an @code{npm test} command.

Which Node.js package is used to interpret the @code{npm} commands can
be specified with the @code{#:node} parameter which defaults to
@code{node}.
@end defvr

@defvr {Scheme Variable} emacs-build-system
This variable is exported by @code{(guix build-system emacs)}. It
implements an installation procedure similar to the packaging system
Expand Down Expand Up @@ -4865,6 +4876,36 @@ package name by an at-sign and a version number as in the following example:
guix import hackage mtl@@2.1.3.1
@end example

@item npm
@cindex npm
Import metadata from @uref{https://www.npmjs.com/, npm}@footnote{This
functionality requires Guile-JSON to be installed.
@xref{Requirements}.}. Information is taken from the JSON-formatted
description available at @code{npmjs.com} and includes most relevant
information, including runtime dependencies. There are some caveats,
however. The metadata doesn't distinguish between synopses and
descriptions, so the same string is used for both fields. Additionally,
the details of non-npm dependencies required to build native extensions
is unavailable and left as an exercise to the packager. Finally, the
importer only looks at the latest released versions of packages. In
some cases, one or several older versions have to be packaged with
manual intervention.

The command below imports metadata for the @code{minimist} npm package:

@example
guix import npm minimist
@end example

The importer implements an experimental recursive subsystem, allowing
for a significant of npm packages to be imported. The command below
imports metadata for the @code{optimist} npm package, as well as its
dependencies.

@example
guix import npm -r optimist
@end example

@item elpa
@cindex elpa
Import metadata from an Emacs Lisp Package Archive (ELPA) package
Expand Down
1 change: 1 addition & 0 deletions gnu/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/ci.scm \
%D%/packages/cmake.scm \
%D%/packages/code.scm \
%D%/packages/coffee-script.scm \
%D%/packages/commencement.scm \
%D%/packages/compression.scm \
%D%/packages/conkeror.scm \
Expand Down
Loading