From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: Re: How to get the package metadata as structured data? Date: Thu, 4 Aug 2016 22:49:37 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVPaO-0001NN-G1 for guix-devel@gnu.org; Thu, 04 Aug 2016 16:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVPaH-00058R-UX for guix-devel@gnu.org; Thu, 04 Aug 2016 16:49:46 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:34386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVPaG-00057J-NQ for guix-devel@gnu.org; Thu, 04 Aug 2016 16:49:41 -0400 Received: by mail-qk0-x22d.google.com with SMTP id p186so119379048qkd.1 for ; Thu, 04 Aug 2016 13:49:39 -0700 (PDT) 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" To: guix-devel Hi Philippe, Thank you for your interest in guix =) All package metadata can be accessed easily through scheme. There is no way to export this data currently, although it probably wouldn't be too hard to implement. The approach I was planning on taking is the following: Take a package, remove all build-phases except unpack, add a phase to run scancode and add the output json to the store. This way guix already takes care of fetching and unpacking the package and caching the result. Unless a build input changes, for example scancode (an input to the scancode phase) is updated, or a scanned package is updated, running a tool that I'll call `guix license` for now will work of the json file that was already generated. This means that improving the reporting or postprocessing the results doesn't require rescanning a dependency. Maybe someone else has other/better ;-) thoughts on this? Cheers David