Skip to content

add lix cask #207616

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add lix cask #207616

wants to merge 1 commit into from

Conversation

dwt
Copy link

@dwt dwt commented Apr 4, 2025

I have added a new cask for https://lix.systems/ - this is an implementation of the nix language which powers the nix package manager and the declarative NixOS and nix-darwin system description frameworks.

I have communication with the upstream team about the package via matrix, and have tried to document the outcomes here.

Currently the cask points to their initial upgrade script that can install lix for {x86_64,aarch64}(linux,darwin} - though I have not found yet how to add this metadata to the cask. Guidance very much appreciated.

Upstream does not have versioned download urls for the different platforms, which is why I have linked to the entry point script that auto chooses the right binary for now.

That script could be pinned with a sha265, as it shouldn't change often, i.e. far less often than new versions are released. However the brew style checker advised me to remove that check. So here I would also appreciate some guidance.

As soon as upstream provides versioned urls of the package, I would be happy to upgrade the package description to point to them, if that is something you desire.

Is there anything else I can provide to make this as smooth a merge as possible for you?

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

@dwt dwt changed the title lix add cask add lix cask Apr 4, 2025
@bevanjkay
Copy link
Member

Thanks for opening this @dwt - I am not fully aware of what is distributed by this package, so would be open to your thoughts.
But what is the possibility of building this from source? We require open-source, CLI-only packages to be first submitted to homebrew-core as a formula to be built by source, see below from our documentation.

https://docs.brew.sh/Acceptable-Casks#rejected-casks

App is both open-source and CLI-only (i.e. it only uses the binary artifact). In that case, and in the spirit of deduplication, submit it first to homebrew/core as a formula that builds from source. If it is rejected, you may then try again as a cask (link to the issue from your pull request so we can see the discussion and reasoning for rejection).

@dwt
Copy link
Author

dwt commented Apr 5, 2025

First what is distributed by this package: This is the installer for lix, which allows using the nix ecosystem of tools through commands like 'nix run nixpkgs#$packagename' to run the main tool from a package without having to install it (and the same for many other package repositories). The thing is, that it does not distribute the package manager itself, but the installer, which among other things comes with a really good uninstaller.

Building the lix installer from source is probably possible, as it's an open source mainly rust codebase, but I'm not sure if that gets us much, as this still would download the lix binaries and install them.

Building lix itself from source is certainly possible, but you really want the installer to setup an apfs sub volume for the nix store, install and deinstall all the daemons, ensure that Time Machine doesn't try to backup the nix store and much more.

Building everything from source... that would be much harder. I have built parts of the toolchain (lix) from source, but never the package and the installer and wired them up. That would likely require a serious time investment for research how that works.

Does that help you @bevanjkay?

@SMillerDev
Copy link
Member

I'm a bit hesitant to ship something that just runs a script because much more can go wrong in a script. Would it be possible to put this in a pkg file to ensure a bit more reliability?

@dwt
Copy link
Author

dwt commented Apr 5, 2025

@SMillerDev This is the official install script of the upstream project. What kind of problems would you expect from running this from homebrew instead of running this with curl $script_url | sh. To me one of the biggest upsides homebrew could bring to this would be to verify the script hash, as that is something I find dearly lacking in the upstream install instructions. However brew style didn't want me to have version :latest and sha265 $something at the same time.

@SMillerDev
Copy link
Member

What kind of problems would you expect from running this from homebrew instead of running this with curl $script_url | sh.

Script usage for installs isn't common in casks as far as I know, and therefore it might run into more issues then without the cask around it.

To me one of the biggest upsides homebrew could bring to this would be to verify the script hash, as that is something I find dearly lacking in the upstream install instructions.

Without pinned versions any hash would be quickly outdated. That's why we don't allow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants