by viraptor · 2y ago · 0 comments
If this is aimed for developers, going through all of that to provide an installable and clickable thing feels a bit unnecessary...
Alternatively, since you're already using nixpkgs, that contains some wrappers and examples for signing Darwin binaries. May be easier than doing it from scratch.
Because I don't want to install some tools on my PC just to build _your tool_. A packaged application is less complicated for the final user to use it.
In this, Windows and some Linux distribution have managed to create a good experience (MSI, AppImage, Flatpack)
And the Mac has equivalents such as the standard installer, DMG images etc.
Developers suffer what they must, while the user suffers what they will.
You’re conflating packaging with building. They’re different steps. You package for distribution after building.
Yes, yes, you can have a package manager build the tool and whatnot, but that’s not the case the article is discussing.
"""So, what can we do with all of this? We have a few options, but none of them are particularly appealing. ...
Download the file with curl. Unix command-line tools like curl and tar don’t add the quarantine bit to the files they create on macOS, so it’s pretty easy to run software downloaded with them.
Unfortunately, the repository where this tool is developed is private, so unauthenticated curl downloads won’t work. I’m seriously considering asking the CTO if we can make the repository public solely so we can use curl as a distribution mechanism. I could even write a platform-detecting shell script! """
The "curl ... | sh" technique could get pass through the authentication information for a subsequent curl call, but then authentication becomes a facade.
Have you thought about publishing the install.sh and final zip file through GitHub pages? Or Cloudflare pages? Then the repo stays private, but the built application can be accessed publicly, and behind a hard-to-guess url.
> in an internal, trusted environment, why not post a "curl ... | sh" command?
It's internal code, so we can't use a public (e.g.) GitHub URL, and developers running this tool may not yet have SSH keys or the VPN set up yet.
> point them at the master/main.zip of the repo
Basically the same issue -- developers would have to install a Rust toolchain and compile the code themselves.
> Alternatively, since you're already using nixpkgs, that contains some wrappers and examples for signing Darwin binaries.
It would! But this tool is what developers use to install and configure Nix in the first place, so it's not a great fit here. (Although we do have it packaged in Nix for users that already have Nix installed.)
Why? The current script installs Rust for them, so the downloaded repo snapshot can do the same thing. Whatever is distributed in the signed package can be in that zip file instead.