From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: (hidden) wrapper+dependencies inconsistency=manifest fails? Date: Fri, 20 Sep 2019 18:18:01 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBLbq-0004lz-TO for guix-devel@gnu.org; Fri, 20 Sep 2019 12:18:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBLbp-0007CP-Ef for guix-devel@gnu.org; Fri, 20 Sep 2019 12:18:14 -0400 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:37498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBLbp-0007Bl-9R for guix-devel@gnu.org; Fri, 20 Sep 2019 12:18:13 -0400 Received: by mail-qk1-x72c.google.com with SMTP id u184so7887133qkd.4 for ; Fri, 20 Sep 2019 09:18:13 -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 Dear, An example is better than too much words. :-) This command lists the dependencies of the "guix" package. guix package --show=guix | recsel -p dependencies Then this command fails: guix package --show=autoconf-wrapper It is expected because the "wrapper" is not a "real" package and it is not exposed. Only the package "autoconf" is. Therefore, you cannot chain: guix package -i `guix package --show=guix | recsel -P dependencies` guix package: error: autoconf-wrapper: package not found for version 2.69 Moreover, the name in "native-inputs" is not consistent with the declared name. I mean: guix repl > ,use(guix) > ,use(gnu packages package-management) > (package-native-inputs guix) > (map car (package-native-inputs guix)) > (map package-name (map cadr (package-native-inputs guix))) Last, "specifications->manifest" is nice because one does not have to know where each dependencies is defined. To be concrete, it is easy: guix package --show=guix | recesel -p location gives the name of the file which is the name of the module. So a manifest is quickly written: --8<---------------cut here---------------start------------->8--- (use-modules (guix) (gnu packages package-management)) (specifications->manifest `(,@(map package-full-name (map cadr (package-native-inputs guix))))) --8<---------------cut here---------------end--------------->8--- Then, guix package -p guix-dev -m the-manifest.scm But this also fails: error: autoconf-wrapper: package not found for version 2.69 which is expected. I guess. Something in this flavour should be added: --8<---------------cut here---------------start------------->8--- (define* (specifications-native-inputs package #:optional (delimiter "@")) (define (package-name+delimiter package) (let ((name (car package)) (version (package-version (cadr package)))) (string-append name delimiter version))) (map package-name+delimiter (package-native-inputs package))) --8<---------------cut here---------------end--------------->8--- Then, the manifest becomes straightforward: --8<---------------cut here---------------start------------->8--- (use-modules (guix) (gnu packages package-management)) (specifications->manifest `(,@(specifications-native-inputs guix))) --8<---------------cut here---------------end--------------->8--- What do you think? Does it make sense? All the best, simon