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

bundlerUpdateScript: gemset.nix should be formatted via nixfmt #368941

Open
amesgen opened this issue Dec 28, 2024 · 2 comments · May be fixed by #369120
Open

bundlerUpdateScript: gemset.nix should be formatted via nixfmt #368941

amesgen opened this issue Dec 28, 2024 · 2 comments · May be fixed by #369120
Labels
0.kind: bug Something is broken

Comments

@amesgen
Copy link
Member

amesgen commented Dec 28, 2024

Describe the bug

gemset.nix as created by bundlerUpdateScript is not formatted by nixfmt, which seems a bit inconvenient.

Steps To Reproduce

Run the update script for any package using bundlerUpdateScript, e.g.

nix-shell maintainers/scripts/update.nix --argstr package cbor-diag

and observe that the resulting gemset.nix is not formatted.

Expected behavior

It should be formatted.

I see at least the following two ways to do this:

  • Just do this in the update script here, i.e. like this:

    Diff
    diff --git a/pkgs/development/ruby-modules/bundler-update-script/default.nix b/pkgs/development/ruby-modules/bundler-update-script/default.nix
    index 037aeef4a0e7..2135e42a2279 100644
    --- a/pkgs/development/ruby-modules/bundler-update-script/default.nix
    +++ b/pkgs/development/ruby-modules/bundler-update-script/default.nix
    @@ -7,6 +7,7 @@
       coreutils,
       git,
       nix,
    +  nixfmt-rfc-style,
     }:
     
     attrPath:
    @@ -21,6 +22,7 @@ let
             coreutils
             git
             nix
    +        nixfmt-rfc-style
           ]
         }
         set -o errexit
    @@ -39,6 +41,7 @@ let
         export BUNDLE_FORCE_RUBY_PLATFORM=1
         bundler lock --update
         bundix
    +    nixfmt gemset.nix
       '';
     in
     [

    Happy to open a PR for this.

  • Add this functionality to bundix.

Notify maintainers

@manveru @zimbatm as bundix maintainers


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@amesgen amesgen added the 0.kind: bug Something is broken label Dec 28, 2024
@zimbatm
Copy link
Member

zimbatm commented Dec 29, 2024

Sounds good. Both are useful but feel free to send a PR for the update script as a start.

@amesgen amesgen linked a pull request Dec 29, 2024 that will close this issue
13 tasks
@amesgen
Copy link
Member Author

amesgen commented Dec 29, 2024

#369120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants