all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is a graft warranted here?
@ 2024-06-14 23:27 Felix Lechner via
  2024-06-14 23:49 ` Tomas Volf
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Lechner via @ 2024-06-14 23:27 UTC (permalink / raw)
  To: help-guix

Hi,

Why does the package definition below provide a grafted version 1.08.1
instead of the source I requested, please?

Kind regards
Felix

* * *

(define-public nyacc/juix
  (let* ((commit "41691b062b598a92549821879766e0ee48b635da")
         (revision "0"))
    (package
      (inherit nyacc)
      (name "nyacc")
      (version "1.10-dev")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.nongnu.org/git/nyacc.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1fa88fix6avyazyiy4k70v9fzdkz1i0p99xnmxmq94j3wpc76y3j"))
                (modules '((guix build utils)))
                (snippet
                 '(substitute* "configure"
                    (("GUILE_GLOBAL_SITE=\\$prefix.*")
                     "GUILE_GLOBAL_SITE=\
$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))))))))


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

* Re: Is a graft warranted here?
  2024-06-14 23:27 Is a graft warranted here? Felix Lechner via
@ 2024-06-14 23:49 ` Tomas Volf
  2024-06-15  0:34   ` Felix Lechner via
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2024-06-14 23:49 UTC (permalink / raw)
  To: Felix Lechner; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 3038 bytes --]

Hello Felix,

On 2024-06-14 16:27:35 -0700, Felix Lechner via wrote:
> Hi,
>
> Why does the package definition below provide a grafted version 1.08.1
> instead of the source I requested, please?
>
> Kind regards
> Felix
>
> * * *
>
> (define-public nyacc/juix
>   (let* ((commit "41691b062b598a92549821879766e0ee48b635da")
>          (revision "0"))
>     (package
>       (inherit nyacc)
>       (name "nyacc")
>       (version "1.10-dev")
>       (source (origin
>                 (method git-fetch)
>                 (uri (git-reference
>                       (url "https://git.savannah.nongnu.org/git/nyacc.git")
>                       (commit commit)))
>                 (file-name (git-file-name name version))
>                 (sha256
>                  (base32
>                   "1fa88fix6avyazyiy4k70v9fzdkz1i0p99xnmxmq94j3wpc76y3j"))
>                 (modules '((guix build utils)))
>                 (snippet
>                  '(substitute* "configure"
>                     (("GUILE_GLOBAL_SITE=\\$prefix.*")
>                      "GUILE_GLOBAL_SITE=\
> $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))))))))
>

Maybe I misunderstood something, but for me it seems to provide what I assume
would be 1.10-dev:

    $ cat $(guix build -e '(begin (use-modules (guix git-download) (gnu packages mes) (guix) (gnu) (gnu packages)) (let* ((commit "41691b062b598a92549821879766e0ee48b635da")
             (revision "0"))
        (package
          (inherit nyacc)
          (name "nyacc")
          (version "1.10-dev")
          (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "https://git.savannah.nongnu.org/git/nyacc.git")
                          (commit commit)))
                    (file-name (git-file-name name version))
                    (sha256
                     (base32
                      "1fa88fix6avyazyiy4k70v9fzdkz1i0p99xnmxmq94j3wpc76y3j"))
                    (modules (quote ((guix build utils))))
                    (snippet
                     (quote (substitute* "configure"
                        (("GUILE_GLOBAL_SITE=\\$prefix.*")
                         "GUILE_GLOBAL_SITE=\
    $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n")))))))))')/share/guile/site/3.0/nyacc/version.scm | tail -n7 | head -n5
    (define-module (nyacc version)
      #:export (*nyacc-version*)
      #:version (1 09 4))

    (define *nyacc-version* "1.09.4")

When I do the same for nyacc I get different output:

    $ cat $(guix build nyacc)/share/guile/site/3.0/nyacc/version.scm | tail -n7 | head -n5
    (define-module (nyacc version)
      #:export (*nyacc-version*)
      #:version (1 08 1))

    (define *nyacc-version* "1.08.1")

This is on up-to-date Guix.  I am probably not seeing the problem (it is bit
late).  Could you write bit more about how to reproduce it and what to look for?

Thanks,
Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Is a graft warranted here?
  2024-06-14 23:49 ` Tomas Volf
@ 2024-06-15  0:34   ` Felix Lechner via
  2024-06-15  8:15     ` Tomas Volf
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Lechner via @ 2024-06-15  0:34 UTC (permalink / raw)
  To: Tomas Volf; +Cc: help-guix

Hi Tomas,

Thank you for writing!

On Sat, Jun 15 2024, Tomas Volf wrote:

> Could you write bit more about how to reproduce it and what to look
> for?

My issue may be with 'guix shell'.  Would you please run

   guix shell nyacc

one time in order to get version 1.08.1 into your store and into your
local profiles, and then run

   guix shell -f guix.scm

on the package definition I sent.  Sorry I forgot the module includes.
Here they are part of a larger file, but the ones below should work.

Kind regards
Felix

* * *

(use-modules
 (gnu packages autotools)
 (gnu packages guile)
 (gnu packages guile-xyz)
 (gnu packages linux)
 (gnu packages mes)
 (gnu packages pkg-config)
 (gnu packages texinfo)
 (gnu packages)
 (guix build-system gnu)
 (guix gexp)
 (guix git-download)
 ((guix licenses) #:prefix license:)
 (guix packages)
 (guix utils))


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

* Re: Is a graft warranted here?
  2024-06-15  0:34   ` Felix Lechner via
@ 2024-06-15  8:15     ` Tomas Volf
  0 siblings, 0 replies; 4+ messages in thread
From: Tomas Volf @ 2024-06-15  8:15 UTC (permalink / raw)
  To: Felix Lechner; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 3124 bytes --]

On 2024-06-14 17:34:29 -0700, Felix Lechner wrote:
> Hi Tomas,
>
> Thank you for writing!
>
> On Sat, Jun 15 2024, Tomas Volf wrote:
>
> > Could you write bit more about how to reproduce it and what to look
> > for?
>
> My issue may be with 'guix shell'.  Would you please run
>
>    guix shell nyacc
>
> one time in order to get version 1.08.1 into your store and into your
> local profiles, and then run
>
>    guix shell -f guix.scm
>
> on the package definition I sent.  Sorry I forgot the module includes.
> Here they are part of a larger file, but the ones below should work.

Here is the output (the commit is current master at the time of testing):

    $ guix time-machine -q --commit=43e102be746e5be11ddd9e1af9b65e3d8571d232 -- shell guile nyacc -- guile -c '(pk (@ (nyacc version) *nyacc-version*))'

    ;;; ("1.08.1")

    $ guix time-machine -q --commit=43e102be746e5be11ddd9e1af9b65e3d8571d232 -- shell guile -f /tmp/guix.scm -- guile -c '(pk (@ (nyacc version) *nyacc-version*))'
    The following derivation will be built:
      /gnu/store/50q9n6as12h1ln9nlmb6ra4qr82lncjy-profile.drv

    applying 2 grafts for nyacc-1.10-dev ...
    building CA certificate bundle...
    listing Emacs sub-directories...
    building fonts directory...
    building directory of Info manuals...
    building profile with 2 packages...

    ;;; ("1.09.4")

With the /tmp/guix.scm being:

    (use-modules
     (gnu packages autotools)
     (gnu packages guile)
     (gnu packages guile-xyz)
     (gnu packages linux)
     (gnu packages mes)
     (gnu packages pkg-config)
     (gnu packages texinfo)
     (gnu packages)
     (guix build-system gnu)
     (guix gexp)
     (guix git-download)
     ((guix licenses) #:prefix license:)
     (guix packages)
     (guix utils))

    (define-public nyacc/juix
      (let* ((commit "41691b062b598a92549821879766e0ee48b635da")
             (revision "0"))
        (package
          (inherit nyacc)
          (name "nyacc")
          (version "1.10-dev")
          (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "https://git.savannah.nongnu.org/git/nyacc.git")
                          (commit commit)))
                    (file-name (git-file-name name version))
                    (sha256
                     (base32
                      "1fa88fix6avyazyiy4k70v9fzdkz1i0p99xnmxmq94j3wpc76y3j"))
                    (modules '((guix build utils)))
                    (snippet
                     '(substitute* "configure"
                        (("GUILE_GLOBAL_SITE=\\$prefix.*")
                         "GUILE_GLOBAL_SITE=\
    $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))))))))

    nyacc/juix

Even when I actually put your code into mes.scm it seems to work fine:

    $ guix-dev-shell -- ./pre-inst-env guix shell guile nyacc -- guile -c '(pk (@ (nyacc version) *nyacc-version*))'
    [..]
    ;;; ("1.09.4")

Sorry I could not reproduce :/

Have a nice day,
Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-06-15  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 23:27 Is a graft warranted here? Felix Lechner via
2024-06-14 23:49 ` Tomas Volf
2024-06-15  0:34   ` Felix Lechner via
2024-06-15  8:15     ` Tomas Volf

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.