From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0kI8E1mClGUBewAAkFu2QA (envelope-from ) for ; Tue, 02 Jan 2024 22:38:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gN8pDVmClGUAyAAAe85BDQ (envelope-from ) for ; Tue, 02 Jan 2024 22:38:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704231513; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=x4tcGA/jTlpT9xuIKaRWaFGWHBNNGxFqoDBV/DAAESs=; b=ctsY5B16CkgG8lWi8EZen/0b72bPLt1jgj0l8gyTrFW7KFB5DaazSwrYqAkD9GkLtmQUxt KrkIRXMDtrAAN2onz5ovRsN4kySc4WrKJptrz8spxGfi63eAZjpY3iXX4pBetvEASmyI75 mqMPXoo2AyZsCQbn5Y7xlfcqA3NFEvbuZcFq3+FPfB9Bm7YB4TCTBX/7VXyeNLOQBKS47p v3o9Y2mdMk4ekjKaFIM5tou+JtpEuxOkNMBGbp6nIQEHJAY93rKTiLZ9oVqLicJPAK8NLN RLDuoUMmpQuyQQFl0ITa1EnH4m6ZJDbI1RM3IPBzu2abEqlrEbkjnGJkGy7PCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704231513; a=rsa-sha256; cv=none; b=PH3SDsqbZCMwvpjxhxtpFhQwvvYcjmMa47UODAcI9lJUY34DebzYssyenY4r5+fdjfvlvy QRYFwvO4Xd61Mq9NzeIsAL0GpJjk4pP+oD9kGPLYs9e8FwNtf5MIaNvZbGwvf+YmAoMjCE ZCsAHJVX/Ir8jaRpsJxorxB16VCJXVk8Jkq/YD9GC6A3qMxSrDsX6XQRl4Gcx3BMzHsOe/ SE4o3WiT7SNnMCrp7BJBMkg/gvr3gLuFUthi5bwQovTVyIwCe98puNu9DBjbeR6fDHeOjM tgOGWi1fXch3T5hNossQJ6WSQdtMLOpW7Hjc4TwQ0Z2JqMK8qlBAlRKXPEuFdQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C874D269E4 for ; Tue, 2 Jan 2024 22:38:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKmSa-0004bm-B5; Tue, 02 Jan 2024 16:38:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKmSY-0004b3-Es for help-guix@gnu.org; Tue, 02 Jan 2024 16:38:02 -0500 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKmSW-0006k3-Gn for help-guix@gnu.org; Tue, 02 Jan 2024 16:38:02 -0500 Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1rKmST-00FdAj-Pt for help-guix@gnu.org; Tue, 02 Jan 2024 22:37:57 +0100 Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rKmST-0008DW-9A; Tue, 02 Jan 2024 22:37:57 +0100 Received: by submission02.runbox with esmtpsa [Authenticated ID (641962)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rKmSS-006Jd9-DK; Tue, 02 Jan 2024 22:37:56 +0100 Date: Tue, 2 Jan 2024 21:37:54 +0000 From: Steve George To: help-guix@gnu.org Subject: Setting package name/version using package transformations Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: permerror client-ip=2a0c:5a00:149::25; envelope-from=steve@futurile.net; helo=mailtransmit04.runbox.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.88 X-Spam-Score: -5.88 X-Migadu-Queue-Id: C874D269E4 X-Migadu-Scanner: mx10.migadu.com X-TUID: e27W7sK9Ri+M Hi, I'm exploring creating 'package variants' through the 'package transformation' options to guix build [0] I can't figure out how to build a package variant and give it a different name The most common sort of 'package variant' I can imagine is where the user wants a different (later) version of the source than is available in Guix. An example is Calcurse where Guix's archive has 4.5.1 and upstream has 4.8.1. I can use the --with-source package transformation to build the later version from the upstream source location: $ guix shell --container --nesting --network --development calcurse --no-grafts nss-certs [env]$ guix build calcurse --with-source=https://calcurse.org/files/calcurse-4.8.1.tar.gz --no-substitutes --no-grafts This will create a calcurse package which I can install and it contains calcurse 4.8.1 $ guix package --list-installed calcurse 4.8.1 out /gnu/store/af4nwvbcd8rbix4vcvamblmbf3ns9wsz-calcurse-4.8.1 Maybe it's due to my previous Linux experiences, but the next thing I wanted to do was give the package a different name and/or different version number so I would know it was a local build. In Debian/Ubuntu I would have named the package -futurile and probably given it a different version number so I could control when it was upgraded. I cannot figure out how to do either of these using a package transformation, rather than defining my own package file etc. 1. Can a package be given a different name with a transformation? Manual says --with-source=package=source, I tried: # nope - unknown package calcurse-futurile guix build calcurse-futurile --with-source=calcurse=https://calcurse.org/files/calcurse-4.8.1.tar.gz --no-substitutes --no-grafts # kinda works guix build calcurse --with-source=calcurse-futurile=https://calcurse.org/files/calcurse-4.8.1.tar.gz --no-substitutes --no-grafts The second builds the 'calcurse' package, but it no longer uses the updated source (so I get v4.5.1). I can guess that this is because it has to be a valid package name from the archive and calcurse-futurile isn't one. 2. Can a package be given a different version number with a transformation? I can give a package a different version number, but the field is constrained. There's no way to use characters other than hypen and dot, so you can't use tilde or full colon for example. # this works guix build calcurse --with-source=calcurse@5.4.8.1=https://calcurse.org/files/calcurse-4.8.1.tar.gz --no-substitutes --no-grafts # not allowed colons or tilde in the field so no 'epoch' ala Debian # it breaks the if you have anything other than .xx.xxx guix build calcurse --with-source=calcurse@5:4.8.1 guix build calcurse --with-source=calcurse@4.8.1~futurile I eventually found a way to to change the package name, byt giving a name as part of the version: # this seems to change the package name? guix build calcurse --with-source=calcurse@futurile-0.1=https://calcurse.org/files/calcurse-4.8.1.tar.gz --no-substitutes --no-grafts guix package --list-installed calcurse-futurile 0.1 out /gnu/store/40bprd6gvwf94x42fxdlf739y55p7xip-calcurse-futurile-0.1 This seems to take the first part of the name after the @, up to a hyphen and make it part of the package name. I'm a bit confused about why this works. The manual says --with-source=package@version=source, but this seems to be package@custom_name-version=source - I guess I don't understand the formats of the --with-source field? Maybe I have a misunderstanding of the scope of usage for 'package transformations' in the cli - am I twisting it to do something that it shouldn't be? Thanks, Futurile [0] https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html