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)
- can't install in Ubuntu 24 HOT 2
- How do I switch volta download sources? HOT 2
- Could not read from file .yarn/__virtual__ HOT 3
- Support ARM64 on Linux installing via https://get.volta.sh HOT 3
- TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1723621905528 nodeLinker node-modules ces' HOT 5
- `volta install node` on Windows incorrectly shows a warning about Node being shadowed
- Helper CTA about install vs pin is confusing when not in a project
- Migration guide from nvm to volta HOT 1
- Volta doesn't pass certain arguments to the globally installed npm package HOT 3
- COMO CONCERTAR O VIDEO DOWLOADHELPER HOT 1
- winget installer does not include "Microsoft Visual C++ Redistributable" HOT 3
- Volta Docker image
- When installing node@8 on Apple M series chips, Volta generates an invalid URL path HOT 3
- ไบๆๅกๅจๆ ๆณ curl https://nodejs.org/dist/index.json HOT 4
- Trojan found via winget update HOT 6
- volta-shim v2.0.x crashes on macOS 14.6.1 HOT 2
- Windows: "'node' is not recognized as an internal or external command, operable program or batch file." in some postinstall scripts
- cannot find command node
- vlotaๆ้้ ็ฝฎๆไน่ฎพ็ฝฎ๏ผ็ฐๅจไธ่ฝฝnode็ๆฌไนๆฏๆพไธๅฐๅฐๅ
- Astro, Grafana seems to not be using Volta any longer
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.