On Mon Oct 27, 2025 at 3:10 PM -03, Alexis Simon wrote:
>
>
> On 27/10/2025 18:09, Rutherther wrote:
>> What makes you feel that way?
>
> Well using the recommended
> guix import -i gnu/packages/rust-crates.scm crate --lockfile Cargo.lock 
> typst
>
> This changes the typst list of dependencies too much (meaning not only 
> new versions of already listed crates) and misses crates that lead to 
> errors during the build of typst.

Hi, I just tried a very quick test of the above command on my guix checkout, but
I cannot reproduce your issue.
For instance here's what I did:

1. Manually updated the typst package to 0.14.0, and forced rust-1.88 (because
its a requirement stated upstream):

```scheme
(define-public typst
  (package
    (name "typst")
    (version "0.14.0")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "typst-cli" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
          (base32 "0dzl7q637mhlkd026aknjk566hzkyr6ivg7qcwxivf1img24fvb3"))))
    (build-system cargo-build-system)
    (arguments
     (list
      #:rust rust-1.88
      ...
```

2. Then I ran the following to get the source, and extracted it to '/tmp', to
get the respective 'Cargo.lock':
$ tar -xvf $(guix shell -D guix -CPW -- ./pre-inst-env guix build typst 
--source)

3. I ran the import command as you described:
$ guix import --insert=/path/to/my/guix/checkout/gnu/packages/rust-crates.scm 
crate --lockfile=/tmp/typst-cli-0.14.0/Cargo.lock typst

4. Changed the newly added openssl bundled source to #f on 'rust-crates.scm':
```scheme
(define rust-openssl-src-300.4.1+3.4.0 #f)
```

5. Tried to build:
$ guix shell -D guix -CPW -- ./pre-inst-env guix build typst

Which resulted in:

successfully built /gnu/store/1la5sbid2jkr7cd0z7hks4v21h9gqhpp-typst-0.14.0.drv
/gnu/store/dirbzlwpp5aqjjvzxd79zjjasljlmlc4-typst-0.14.0

Much has to be done still, in order to be accepted on guix, but it at least
builds just fine.

So I'm not sure what you're doing wrong, but perhaps its a confusion as to what
'Cargo.lock' file to use on the importer, for which I say you might want to use
the one that comes from the guix package source.

Reply via email to