diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index 7a3b71addc316e..3e2883eea21cac 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -686,6 +686,7 @@ When parsing a download URL, Homebrew auto-detects the resource type it points t ```ruby class Foo < Formula homepage "https://github.com/some/package" + description "Some package" url "https://github.com/some/package.git", tag: "v1.6.2", revision: "344cd2ee3463abab4c16ac0f9529a846314932a2" @@ -697,6 +698,7 @@ If not inferable, specify which of Homebrew’s built-in download strategies to ```ruby class Nginx < Formula homepage "https://nginx.org/" + description "Some package" url "https://nginx.org/download/nginx-1.23.2.tar.gz", using: :homebrew_curl sha256 "a80cc272d3d72aaee70aa8b517b4862a635c0256790434dbfc4d618a999b0b46" head "https://hg.nginx.org/nginx/", using: :hg @@ -731,6 +733,7 @@ end class Foo < Formula url "something", using: MyDownloadStrategy + description "Some package" end ``` diff --git a/docs/Node-for-Formula-Authors.md b/docs/Node-for-Formula-Authors.md index ee7943d9e94c28..7f1c4cd9ee6c96 100644 --- a/docs/Node-for-Formula-Authors.md +++ b/docs/Node-for-Formula-Authors.md @@ -94,7 +94,7 @@ class Foo < Formula desc "Description" homepage "..." url "https://registry.npmjs.org/foo/-/foo-1.4.2.tgz" - sha256 "..." + sha256 "abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1" depends_on "node" # uncomment if there is a native addon inside the dependency tree diff --git a/docs/Python-for-Formula-Authors.md b/docs/Python-for-Formula-Authors.md index ff4c9ea81bb8a9..213cbf0170b03c 100644 --- a/docs/Python-for-Formula-Authors.md +++ b/docs/Python-for-Formula-Authors.md @@ -57,7 +57,7 @@ class Foo < Formula desc "Bar" homepage "https://example.com" url "..." - sha256 "abc123" + sha256 "abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1" def install virtualenv_install_with_resources @@ -122,12 +122,18 @@ end You can also use the more verbose form and request that specific resources be installed: ```ruby -def install - venv = virtualenv_create(libexec) - %w[six parsedatetime].each do |r| - venv.pip_install resource(r) +class Foo < Formula + include Language::Python::Virtualenv + + url "..." + + def install + venv = virtualenv_create(libexec) + %w[six parsedatetime].each do |r| + venv.pip_install resource(r) + end + venv.pip_install_and_link buildpath end - venv.pip_install_and_link buildpath end ```