Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace everything with dream2nix #56

Merged
merged 83 commits into from
Mar 5, 2022
Merged

feat: replace everything with dream2nix #56

merged 83 commits into from
Mar 5, 2022

Conversation

yusdacra
Copy link
Owner

@yusdacra yusdacra commented Feb 4, 2022

This PR removes support for all "build platforms" and only uses dream2nix, essentially meaning nix-cargo-integration won't have to deal with maintaining a common interface for builders.

  • figure out how to let users switch between different builders / translators in dream2nix

Resolves #55
Resolves #49

@kkharji
Copy link

kkharji commented Feb 16, 2022

Interesting, I'm having some issues with trying to append to postInstall script using buildRustPackage. Tried crateOverrides but no luck. Let me switch here and test it out.

@kkharji
Copy link

kkharji commented Feb 16, 2022

I'm building a library and I got the following error:
trace: warning: couldn't find a package with a binary to use as mainPackage.

my flake.nix https://gist.github.com/tami5/8058546f8522466dfc97ab6ac72a40b5

also same issue with cargo command not found

@nix { "action": "setPhase", "phase": "buildPhase" }
building

running: cargo build --release
/nix/store/0qlq4s175mzlx9g0aqcdk95j92g1z7mf-stdenv-darwin/setup: line 1364: cargo: command not found

edit: oh it unpacking dummy-src not my src, maybe because of trace: warning: couldn't find a package with a binary to use as mainPackage. ?

edit: inspected dummy-src, has my cargo but empty files
edit: add library to nix metadata in cargo.tml; no effect

@yusdacra
Copy link
Owner Author

also same issue with cargo command not found

@nix { "action": "setPhase", "phase": "buildPhase" }
building

running: cargo build --release
/nix/store/0qlq4s175mzlx9g0aqcdk95j92g1z7mf-stdenv-darwin/setup: line 1364: cargo: command not found

Hmm, that's interesting. That should not happen, if you could give a minimal reproducible example it would be appreciated. The flake.nix looks fine though.

edit: oh it unpacking dummy-src not my src, maybe because of trace: warning: couldn't find a package with a binary to use as mainPackage. ?

edit: inspected dummy-src, has my cargo but empty files edit: add library to nix metadata in cargo.tml; no effect

That is crane's dependency only derivation, so that is expected. The warning is for when dream2nix can't find a binary package, it should probably be removed.

@yusdacra yusdacra force-pushed the dream2nix-only branch 2 times, most recently from b3a12da to dfb24e5 Compare February 16, 2022 18:41
@kkharji
Copy link

kkharji commented Feb 17, 2022

Hmm, that's interesting. That should not happen, if you could give a minimal reproducible example it would be appreciated. The flake.nix looks fine though.

Sure here you go https://github.com/tami5/Yabai.spoon/pull/1, still the same issue.

That is crane's dependency only derivation, so that is expected. The warning is for when dream2nix can't find a binary package, it should probably be removed.

Interesting so it wasn't taken in consideration.

@yusdacra
Copy link
Owner Author

yusdacra commented Feb 17, 2022

This is mostly ready now, the only things I want to do before merging are:

  • allow users to change the builder, which has to be implemented in dream2nix first
  • fix the dream2nix bug that causes an infinite recursion

@yusdacra yusdacra force-pushed the dream2nix-only branch 3 times, most recently from b9b491c to 81913e6 Compare February 20, 2022 12:08
@yusdacra yusdacra force-pushed the dream2nix-only branch 2 times, most recently from d4cd649 to eda17ad Compare February 27, 2022 16:13
@yusdacra yusdacra marked this pull request as ready for review February 28, 2022 10:49
@yusdacra
Copy link
Owner Author

Stuff left to fix:

  • figure out why buildRustPackage is not using the correct toolchain
  • figure out why crane cant build multiple-git and basic-git

@yusdacra yusdacra mentioned this pull request Mar 5, 2022
@yusdacra yusdacra merged commit d2c0b60 into master Mar 5, 2022
@yusdacra yusdacra deleted the dream2nix-only branch March 5, 2022 19:14
@yusdacra yusdacra restored the dream2nix-only branch March 5, 2022 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

naersk buildPlatform currently broken feat: deprecate current buildPlatforms in favor of dream2nix
2 participants