Hi Tanguy,

I tried this

(define-public python-3.13
  (package
    (inherit python-3.12)
    (version "3.13.2")
    (source
     (origin
       (inherit (package-source python-3.12))
       (sha256 (base32
       "0mpbb6hkzdphyin861ywqnxibh5i4gjl5vvxdyralz6ngk2vr16r"))
       (patches (search-patches
       "python-3-deterministic-build-info.patch"
                                "python-3.13-fix-tests.patch"
                                "python-3-hurd-configure.patch"))))))

and it does work as expected for me (well, as I expect it to work).

Unfortunately, no. First, it doesn’t inherit the `name`, so the package is not
found

It finds it just fine here.

Did you do

$ ./pre-inst-env guix build python-next

(note: ./pre-inst-env)?

I get a hash mismatch after guix tries to appropriate the 3.12.2 source
for building 3.13.2--as I would expect.

, then there is a problem with the hash, the inherited one being used?!

For me, the new hash is used (as the expected hash).

What is old though is uri--because Scheme is lexically scoped by
default (except for the toplevel and some special things).

What happens is the same as if you did this:

(let* ((name "python-next")
       (version "3.12.2")
       (uri (string-append name version))
       (version "3.13.2"))
  uri)

That is, you will get: python-next3.12.2 , and something like that is
what "origin" will still use as uri, even in python-3.13.

What you need to do in such a case is the equivalent of the following:

(let* ((name "python-next")
       (version "3.12.2")
       (uri (string-append name version))
       (version "3.13.2")
       (uri (string-append name version)))
  uri)

Reply via email to