Migrate from crane2nix to crane; make Haskell repl/ghcid work#12
Closed
srid wants to merge 2 commits into
Closed
Conversation
Contributor
|
If you think it necessitates hacky code, read and understand NixOS/nixpkgs#167947. Most of the time, when you think you want a subflake, you do not. |
Contributor
Author
|
You still have to write a compose function for lockless subflakes. |
Contributor
|
@srid I do not yet fully understand why you need to do this composition of subflakes. I am not understanding a lot of the changes, which is why it is likely that you will be maintaining this repo, and I will not be able to contribute to it. |
Contributor
Author
|
Closing in favour of #13 I appreciate your input here @MatthewCroughan for having me re-evaluate this approach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://ipetkov.dev/blog/introducing-crane/
In addition to simplifying the Nix code quite a bit, this prepares the ground for switching over to the
dream2nix-based https://github.com/yusdacra/nix-cargo-integration (which usescraneas the default backend).But why don't we do that right now? Because nix-cargo-integrations exposes a monolithic
makeOutputsthat gives us a Rust flake, but what we need really is the more fine-grained attributes of the crate derivation and dev shell - to make it work with our multiple-language flake. Ability to compose multiple Flakes doesn't exist and seems to necessitate hacky code (see NixOS/nix#4218), so I decided against doing this today. Perhaps we should consult with @yusdacra.Incidentally, this PR also
cabal repl(and thusghcid) not being able to find the Rust library (as @mlitchard experienced so far). It fixes it by usingLD_LIBRARY_PATHafter telling inCargo.ymlto build the dynamic library alongside the static library.