From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: Replacing Bower with "guix environment" Date: Thu, 30 Apr 2015 13:17:24 -0400 Message-ID: <87d22l5ye3.fsf@fsf.org> References: <87tww2i6je.fsf@earlgrey.lan> <87d22m3stg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yns5Y-00057P-O2 for guix-devel@gnu.org; Thu, 30 Apr 2015 13:17:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yns5X-0002dn-Fa for guix-devel@gnu.org; Thu, 30 Apr 2015 13:17:28 -0400 In-Reply-To: <87d22m3stg.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Christopher Allan Webber Cc: guix-devel Ludovic Court=C3=A8s writes: > Christopher Allan Webber 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 =E2=80=98guix system vm=E2=80=99 returns a script that runs QEM= U 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! --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate