guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing Bower with "guix environment"


From: David Thompson
Subject: Re: Replacing Bower with "guix environment"
Date: Thu, 30 Apr 2015 13:17:24 -0400
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Ludovic Courtès <address@hidden> writes:

> Christopher Allan Webber <address@hidden> 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 'address@hidden)
>                       ...)))
>
> (This could/should be turned into a package object so that adding it as
> an input would drop it in $PATH.)
>
> 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))))
      ...)

> Alternately one could generate a script that directly runs some http
> server with the right parameters so that it finds CSS files, JS files,
> etc.

I could see that being convenient, but it doesn't help in this
particular case of displacing Bower.

Thanks for your thoughts!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



reply via email to

[Prev in Thread] Current Thread [Next in Thread]