crane icon indicating copy to clipboard operation
crane copied to clipboard

Not possible to override crane-utils or its dependencies

Open fracek opened this issue 1 year ago • 2 comments

Hello, I need to compile my project using an older nixpkgs (23.05). The issue I'm facing is that it tries to compile crane-utils using nix rustPlatform which uses Cargo 1.69 but the minimum required version to compile crane-utils is 1.70.

I haven't figured out how to override the rustPlatform used to build crane-utils. If I override crane-utils in an overlay it's not used by crane anyway.

I made a minimal repository to reproduce the issue here

fracek avatar Mar 17 '24 10:03 fracek

Hi @fracek thanks for the report! At this time we don't have a good way to override/overlay crane-utils: https://github.com/ipetkov/crane/blob/f1dabc4abaa6e1ef4ef92d046aced96d1e94dc14/lib/downloadCargoPackageFromGit.nix#L12

In the mean time you can get unblocked by either using crane-0.15.1 or using the 23.11 release branch. 23.05 is EOL and we dropped support for it in crane-0.16.0

ipetkov avatar Mar 19 '24 22:03 ipetkov

Thank you, unfortunately I have to target 23.05 to link against a version of GLIBC older than the one included in Ubuntu 22.04 LTS. But I also understand it's a niche use case so feel free to close the issue if it's not worth supporting!

fracek avatar Mar 21 '24 10:03 fracek

Overriding craneUtils will become possible once https://github.com/ipetkov/crane/pull/652 lands!

ipetkov avatar Jun 29 '24 18:06 ipetkov