Comments (8)
I've created a simple formula that might be a good starting point. It's available here.
The formula does not build from source but uses the tar. I wanted to make sure the installation was as close to using curl https://get.volta.sh | bash
. The only thing the Formula doesn't do currently is running volta setup
. Whenever I try to run volta setup
during the installation process, I get an error saying that volta couldn't find any of the profiles to edit. I'm looking into it, but I have very little experience with homebrew formula
Update: I've opened a pull-request to homebrew/homebrew-core
from volta.
I feel like I got the formula to a decent place and we can start talking about it.
Spoiler: I'm new to Rust/Cargo and how the build system works don't yell at me for doing silly things π¬
Name
There is already a cask package called "notion", see here. I'd say we can name ours notion-cli
, or we can keep it as notion
(since cask packages and regular ones have different registries).
I personally would go with notion-cli
, but I'd love your thoughts @dherman.
Homebrew formula
The formula itself (snippet below) gets generated automatically by running:
brew create https://dl.dropboxusercontent.com/s/rawxzfb4fsruu14/notion-cli-0.1.0.tgz
Properties and methods like desc
, homepage
, depends_on
, install
and test
were added by me. File name has to contain 0.1.0
so we don't specify it in the formula itself via version
property.
I hacked together a notion-cli
archive just to get started, it contains:
$ tree -L 1 homebrew
homebrew
βββ Cargo.lock
βββ Cargo.toml
βββ build.sh
βββ crates
βββ install.sh
βββ install.sh.in
βββ src
Once the folder is downloaded, we run cargo build
and then build
and install
scripts. From then on, notion
should be available and good to go.
Also, I believe we can remove the code from install.sh.in
which adds notion
binary to the PATH
and replace it with bin.install
in the recipe.
class NotionCli < Formula
desc "The hassle-free node.js manager"
homepage "https://github.com/notion-cli/notion"
url "https://dl.dropboxusercontent.com/s/rawxzfb4fsruu14/notion-cli-0.1.0.tgz"
sha256 "90f96b6c7e33593acb0dfb6917461e9dbc095f4c71bf6ea06a75b06638f4aa18"
depends_on "rust" => :build
def install
system "cargo", "build", "--release"
system "./build.sh",
"./target/release/notion",
"./target/release/node",
"./target/release/launchbin",
"./target/release/launchscript"
system "./install.sh"
end
test do
assert_equal "The hassle-free node.js manager", (system "notion -V")
end
end
Audit
Homebrew documentation suggest we run brew audit
command on a newly generated formula to make sure we adhere to their standards.
Audit showed that we are not notable enough yet:
$ brew audit --new-formula notion-cli
notion-cli:
* GitHub repository not notable enough (<20 forks, <20 watchers and <50 stars)
Error: 1 problem in 1 formula
I'm not sure what to do about the above yet, let's discuss.
from volta.
It looks like this was completed some time ago thanks to @filipekiss!
from volta.
Has anyone circled back to this? It'd be cool to get this in now since it appears that the repo is notable enough now.
from volta.
@dherman now that this project has been renamed to volta
, any plans on adding a homebrew formula?
from volta.
@dherman is there anything the project needs to help make this happen?
from volta.
While working on the formula for Homebrew I've encountered an issue and I'm not sure if I should file this as a separate bug, but the installation script from brew
is not able to run volta setup
:
error: Could not locate user profile.
Tried $PROFILE (), ~/.bashrc, ~/.bash_profile, ~/.zshrc, ~/.profile, and ~/.config/fish/config.fish
Please create one of these and try again; or you can edit your profile manually to add '/Users/filipekiss/.volta/bin' to your PATH
Running volta setup
as soon as the installation is finished works as intended.
I think this has something to do with Homebrew's superenv so I'm not sure if it's worthing pursuing this.
from volta.
Anyone who has access to a macOS Catalina can try to help me debug the formula? I'm getting an error when building to Catalina during the CI step for the pull-request and I'm not able to figure out how to deal with it since I don't have access to Catalinaβ¦
from volta.
Related Issues (20)
- Investigate managing shared workspace dependencies in one place
- Switch to actions-rust-lang/setup-rust-toolchain
- Volta does not use all certificates in the system CA certificate store, making corporate use difficult HOT 13
- Volta throws error on every command HOT 3
- Support package.json5 HOT 4
- curl -L https://dymensionxyz.github.io/roller/install.sh | bash
- How to find the directory of global npm packages HOT 3
- volta pin node giving v20.10.0 when v20.11.0 is released HOT 1
- Volta Shim Error in Windows Terminal - "Command 'node' not found" HOT 1
- Internal Error: EPERM: operation not permitted, open '...\.yarn\cache\.gitignore' HOT 2
- Can I change corepack's platform runtime version after Node.js installation?
- Issue with getting volta to work HOT 4
- `volta run` affects only 1st command in case of chained commands (e.g. when using `&&` operator) HOT 1
- Docs: explicitly mention that omitting `npm` version means using version bundled with Node? (PR#957) HOT 1
- Statement on how to install packages on machines without internet connection?
- How to persist yarn version to `classic` HOT 2
- [Important feature] Implement single command install with nix / home-manager. Add nix flake
- Uninstalling specific versions of node and package manager should be supported
- `volta list all` not work if one directory(eg. `pnpm`) not exists HOT 2
- Volta update error: Could not create directory D:\Volta but not DοΌ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volta.