fix: nix devShell fixups #1397
No reviewers
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!1397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kraem/continuwuity:fix/nix_env_fixups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request fixes some issues found with the nix devShell:
cargo +nightly fmtwhere +fmt is rustup specific)cargo testI'm guessing @aviac wants to review these changes? :)
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
FWIW, i also have some devshell fixes in my PR
#1326/files
@benbot wrote in #1397 (comment):
i see. i'll comment on your new pr.
Hey @kraem (going to continue convo here since it seems like we're going to close my other PR in favor of this one), so i know we needed some of those packages in the
LD_LIBRARY_PATH. IIRC it was when I tried runningcargo testWhen i get off work later I'll double check which ones I needed.
oh!
i found a thing about crane!
https://crane.dev/local_development.html
we should be able to just grab the exact packages we use to build and put them in the devShell!
@benbot wrote in #1397 (comment):
good catch.
maybe we could just combine the
dev-toolchain(to get cargo fmt nightly) we're creating with fenix anddepswe're creating with crane.honestly i feel like the nix exprs to create the packages and dev env is unnecessarily complex and split up in to a bit too many places.
edit:
i just took a stab at this and i can't get conduwuit-all-features-deps to build, which we'd need to get everything we'd need using cranes
inputsFromand clean out the locally (for the devShell) definedrocksdbAllFeaturesall-features fould be using the feature full rather than literally all features because some features are mutually incompatible and some require weird flags like http3
@kraem wrote in #1397 (comment):
Why doesn't it build? What's the error?
For me, i still needed to set the library paths and include jemalloc
cfe555c47cf19c1fdc2fIs this OK to merge?
@Jade wrote in #1397 (comment):
i can try my previous attempt again using
inputsFromnow that #1422 is merged when i'm not afk@kraem wrote in #1397 (comment):
perfect -- ping us here or in the development matrix room when ready :)
@kraem Hey, how's it going, have you ran into any issues?
@ -25,2 +25,4 @@self'.packages.dev-toolchain];env.LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.llvmPackages.libclang.lib ];env.LD_LIBRARY_PATH = lib.makeLibraryPath [Could you try doing this here instead?
codeberg.org/Aviac/codeberg-cli@f9906e080d/nix/packages/berg.nix (L25-L26)I've had a conversation once with a nixpkgs maintainer about stuff like this and the rpath patching via RUSTFLAGS is less intrusive than settings LD_LIBRARY_PATH which might apply to more things than just in the environment than just the target package.
Maybe it doesn't work out in the end, then LD_LIBRARY_PATH should be fine I guess
@kraem Hey, I did some of this now in #1596, I put you as Co-Authored-By in the devshell commit, let me know if this isn't okay. Thanks!
sorry about the mia.
@Henry-Hiles yeah sure :)
This can now be closed, it's been added in #1596 :)