unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Inherit from a package
@ 2023-06-27 11:22 Reza Housseini
  2023-06-28  2:13 ` Bruno Victal
  0 siblings, 1 reply; 2+ messages in thread
From: Reza Housseini @ 2023-06-27 11:22 UTC (permalink / raw)
  To: help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 597 bytes --]

Hello Guixers

I have a package with modified phases and use of the version identifier 
(#$version) in various steps of the build process. Unfortunately when I 
inherit from this package and change the source and version, the version 
used in the new package is the same as from the inherited package. Is 
this intended behavior or do I have to copy somehow the modified phases 
over to the inherited package?

Hope the problem is clear and somebody can point me to a solution.

Cheers,
Reza

P.S. Do I have to use substitute-keyword-arguments in the inherited 
package arguments?

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 15557 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inherit from a package
  2023-06-27 11:22 Inherit from a package Reza Housseini
@ 2023-06-28  2:13 ` Bruno Victal
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Victal @ 2023-06-28  2:13 UTC (permalink / raw)
  To: Reza Housseini; +Cc: help-guix

Hi Reza,

On 2023-06-27 12:22, Reza Housseini wrote:
> Hello Guixers
> 
> I have a package with modified phases and use of the version identifier (#$version) in various steps of the build process. Unfortunately when I inherit from this package and change the source and version, the version used in the new package is the same as from the inherited package. Is this intended behavior or do I have to copy somehow the modified phases over to the inherited package?

Indeed, this is a limitation of using (inherit) in packages.
You don't necessarily need to duplicate the phases you want to change,
personally I employed a procedure that returns a package object instead
and inherit from it, as can be seen at <https://issues.guix.gnu.org/63081#8>.

Perhaps you can draw some inspiration from that patch-series?

-- 
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-28  2:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 11:22 Inherit from a package Reza Housseini
2023-06-28  2:13 ` Bruno Victal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).