NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.4k stars 12.9k forks source link

jbang: make jbang able to see itself #320698

Closed dsyer closed 6 days ago

dsyer commented 1 week ago

I understand why it has been restricted to a limited PATH, but it seems reasonable that jbang can execute itself. There are tools out there that assume as much (e.g. the Jupyter kernel jbang-catalog).

dsyer commented 1 week ago

Also, please follow the commit format in contributing.md

I scanned CONTRIBUTING.md for a specific format and didn't see anything (a lot of helpful stuff about how to manage github). Maybe you can help me find it.

jopejoe1 commented 1 week ago

Also, please follow the commit format in contributing.md

I scanned CONTRIBUTING.md for a specific format and didn't see anything (a lot of helpful stuff about how to manage github). Maybe you can help me find it.

You can find the commit conventions in the CONTRIBUTING.md see https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions

dsyer commented 1 week ago

You can find the commit conventions in the CONTRIBUTING.md see https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions

I saw that, thanks. Which part did I get wrong? It all looks OK to me, so I must be missing something still.

pluiedev commented 1 week ago

You can find the commit conventions in the CONTRIBUTING.md see master/CONTRIBUTING.md#commit-conventions

I saw that, thanks. Which part did I get wrong? It all looks OK to me, so I must be missing something still.

It should look something like jbang: add itself to its PATH. Commits always start with the package/module it affects, then a colon and a space, then a short description of what it does. The PR title should also be changed to be the same with the commit message

dsyer commented 1 week ago

OK. I did that (I can see the pattern in the commit logs, but not in the documentation yet, I have to say).

eclairevoyant commented 1 week ago

Thanks for updating.

not in the documentation yet

see https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions

Commit conventions

  • Make sure you read about the commit conventions common to Nixpkgs as a whole.

  • Format the commit messages in the following way:

    (pkg-name): (from -> to | init at version | refactor | etc)
    
    (Motivation for change. Link to release notes. Additional information.)

    Examples:

    • nginx: init at 2.0.1
    • firefox: 54.0.1 -> 55.0

    https://www.mozilla.org/en-US/firefox/55.0/releasenotes/

This looks fine to me now, but not sure of a good way to verify that this solves the original issue, as I don't use the software

dsyer commented 1 week ago

If you want to verify that it works just try to install the kernel I linked to (per the docs https://github.com/jupyter-java you have to jbang install-kernel@jupyter-java). It will fail without this change. Should be fine with it.