Hi Benjamin, On November 11, 2025 12:25:54 AM GMT+01:00, benjamin wil <[email protected]> wrote: . > >As suggested by the documentation about common workflows for Rust packaging I >have used `guix import` to get a list of crate dependencies for both >`kak-tree-sitter` and `kak-tree-sitter-config`: > > cd $HOME/Dev/kak-tree-sitter > > guix import \ > --insert=$HOME/Dev/guix/gnu/packages/rust-crates.scm \ > crate --lockfile=./Cargo.lock kak-tree-sitter > > guix import \ > --insert=$HOME/Dev/guix/gnu/packages/rust-crates.scm \ > crate --lockfile=./Cargo.lock kak-tree-sitter-config >
Seems a bit unnecessary to import the same lock file twice, since the packages are 'coupled', personally I would use kak-tree-sitter only. >This appears to have worked as intended but did not provide a definition for >`kak-tree-sitter-config`, so I manually added a `rust-` prefixed entry to >`rust-sources.scm` and to `rust-crates.scm`. > >In addition to that, I have added package entries for both `kak-tree-sitter` >and `kak-tree-sitter-config` to the `text-editors.scm` package list for now: >Despite my having defined these packages, running `./pre-inst-env guix build >kak-tree-sitter` results in in an error, `no matching package named >'kak-tree-sitter-config'` despite there being both a `kak-tree-sitter-config` >and `rust-kak-tree-sitter-config` defined, as well as a real crate on >htths://crates.io. Here is the error and stack trace following: > > error: no matching package named `kak-tree-sitter-config` found This is expected as you didnt provide this package in any way. Just defining a package doesnt mean all other packages now see it and can use it during build. You need to add it to inputs of other packages so that it can be used. In cargo case, you would have to add #:install-source? #t argument to the config package to gets its source as well. But this is not how you package workspaces in the first place. >So, it seems likely that I am missing *something* and have probably defined >more things called `kak-tree-sitter-config` than I actually need to. But I'm >not sure what actions to take next. Would appreciate any hints you have to get >be started in the right direction. You are dealing with a workspace package. Guix already supports workspaces, but you cannot use the crate-uri, because it doesnt contain the whole workspace. You need the original git repo. Then adding #:cargo-install-paths could make sense, to install only the kak-tree-sitter and not the config package. Rutherther > >Thanks! >Benjamin >
