tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rust crate package help



Havard Eidnes transcribed 1.1K bytes:
> > https://github.com/dcuddeback/termios-rs/pull/22
> > stopped me while working on packaging nary.
> >
> > backporting this patch would require adjusting the
> > cargo checksums in the ../vendors/termios-0.3.1/
> > folder.
> >
> > Is there any support for defining pkgsrc crates
> > in pkgsrc packages? In other words, one soution
> > I can think about is packaging termios once + patching it
> > and then adjusting all checksums in packages which use it
> > according.
> > Or maybe I'm way off with this approach.
> 
> Without having looked at this in detail, I may have a couple of
> hints:
> 
> 1) The patch itself can probably use the normal pkgsrc patch
>    method.  However, as you've noticed, this will invalidate the
>    cargo checksum.
> 
>    The rust package itself also needs to patch checksummed
>    sources, so its Makefile contains in the post-extract target
>    some invocations of sed to change the cargo checksum files
>    (because patch apparently can't handle the long lines in
>    .cargo-checksum.json).
> 
> 2) Pkgsrc has some infrastructure for packages to depend on other
>    cargo crates.  An example can be found in devel/cbindgen/.

For 2 I think I wasn't clear in what I was looking for.
Instead of using cargo for everything, being able to use
pkgsrc defined packages for crates would be good. This used
to be how I approached crates somewhere else, but the more
I learn about recent cargo and more specifically the way it
is used in pkgsrc, the more the way it is done now seems to be okay.

There's still so much duplication going on, but splitting this up
was always annoying (recursive deps, etc).
 
> Best regards,
> 
> - Håvard


Home | Main Index | Thread Index | Old Index