From: Christopher Allan Webber <cwebber@dustycloud.org>
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Replacing Bower with "guix environment"
Date: Thu, 30 Apr 2015 23:14:47 -0500 [thread overview]
Message-ID: <87618cly1x.fsf@earlgrey.lan> (raw)
In-Reply-To: <87d22l5ye3.fsf@fsf.org>
David Thompson writes:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Christopher Allan Webber <cwebber@dustycloud.org> skribis:
>>
>>> - The "hip new way" of doing things is to use Bower. Bower is a
>>> package manager, but it's made specifically for static assets served
>>> to the user, such as css files, fonts, javascript like jquery, etc.
>>> Bower also puts these in an extlib/ or whatever, but it puts them in
>>> that place *for* you.
>>
>> Interesting.
>>
>> (Thinking out lout.)
>>
>> Just like ‘guix system vm’ returns a script that runs QEMU with the
>> right arguments, one could imagine generating a script that copies
>> dependencies in the right place maybe?
>>
>> (define (make-installer assets)
>> (gexp->script "copy-assets"
>> #~(begin
>> (for-each copy-file '#$@assets)
>> ...)))
>>
>> (This could/should be turned into a package object so that adding it as
>> an input would drop it in $PATH.)
The idea has me really excited. But how do I make this happen, so that
copy-assets appears in $PATH? I am trying to do something with
"guix environment" that does this, but I'm pretty confused as to how it
could be done.
How would you turn a gexp into a package object? Would it just be a lot
of package object stuff stubbed out?
>> The developer would have to explicitly run that script to have the files
>> copied under extlib/.
>
> That is a really neat use of gexps, and I guess running the script
> manually would be akin to running 'bower install', so that should work.
>
> I envision the package recipe below, is this approximately what you were
> describing?
>
> (package
> (name "mediagoblin")
> (version "0.8.0")
> ...
> (inputs
> `(("python" ,python)
> ("assets" ,(web-assets jquery
> videojs
> bootstrap))))
> ...)
Does web-assets generate that package object I assume?
I tried looking for examples of other package definitions that include
derivations from gexps, and couldn't find anything clear...
It also isn't clear to me: is it okay for (inputs) to include things
that aren't packages?
I'd really like to explore this, though!
next prev parent reply other threads:[~2015-05-01 4:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 3:12 Replacing Bower with "guix environment" Christopher Allan Webber
2015-04-27 11:42 ` David Thompson
2015-04-27 13:15 ` Christopher Allan Webber
2015-04-27 14:11 ` David Thompson
2015-04-30 8:48 ` Ludovic Courtès
2015-04-30 16:40 ` Christopher Allan Webber
2015-04-30 17:17 ` David Thompson
2015-05-01 4:14 ` Christopher Allan Webber [this message]
2015-05-01 14:37 ` Ludovic Courtès
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=87618cly1x.fsf@earlgrey.lan \
--to=cwebber@dustycloud.org \
--cc=dthompson2@worcester.edu \
--cc=guix-devel@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).