Ludovic Courtès <l...@gnu.org> writes: > Christopher Allan Webber <cweb...@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 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