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

Adds option for user provided path to sbt binary for bleep import command. #382

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

KristianAN
Copy link
Contributor

The current bleep import command can and will not work on systems such as NixOs and Guix, so in my effort of making bleep play nice with my system I propose to add this option that lets the user provide the path to the launcher binary.

This way NixOs/Guix users are then able to provide their own sbt instances with the correct utils in scope to actually run the bleep import.

I have given this a spin and it works great!

The only caveat is that for e.g. nix flakes you need to somewhat know what you are doing and add an overlay to sbt to provide the correct tools.

 sbt = pkgs.sbt.overrideAttrs (oldAttrs: {
    nativeBuildInputs = oldAttrs.nativeBuildInputs or [] ++ [ pkgs.makeWrapper ];
    postFixup = ''
      wrapProgram $out/bin/sbt --prefix PATH : "${pkgs.coreutils}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin"
    '';
  });

If this PR (or a derivative) is merged I'll update my bleep-flake repo with the above snippet.
https://github.com/KristianAN/bleep-flake/pull/3/files

@KristianAN
Copy link
Contributor Author

@oyvindberg If this is merged I'll publish bleep to nixpkgs as it seems like all the main features work (only completions that aren't supported yet). Once published I can update the docs here and remove the reference to my bleep.nix flake and instead maybe add a few lines of how to use with nix and how to get the sbt import working.

@oyvindberg oyvindberg merged commit 8ca5c55 into oyvindberg:master Jun 7, 2024
6 checks passed
@oyvindberg
Copy link
Owner

Perfect, thanks. I'm offline all this weekend, but aiming for a release early next week 👍

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.

None yet

2 participants