Update wr recipes using chef DSL

This commit is contained in:
Aoran Zeng 2025-08-10 12:31:05 +08:00
parent 82aafbca62
commit 425ae19d9d
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
11 changed files with 52 additions and 48 deletions

View File

@ -74,7 +74,7 @@ chef_forbid_user_define (Target_t *target)
void
chef_set_note (Target_t *target, const char *note_zh, const char *note_en)
{
if (!target || !note)
if (!target)
return;
char *msg = CHINESE ? xy_strdup(note_zh) : xy_strdup(note_en);

View File

@ -25,11 +25,10 @@ wr_anaconda_prelude ()
chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = false;
this.note = "无法自定义源, 因为这些链接将会在setsrc函数中补充完整";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_forbid_user_define(this);
def_upstream("https://repo.anaconda.com");
def_sources_begin()

View File

@ -22,11 +22,10 @@ wr_cocoapods_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = NULL;
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_allow_user_define(this);
def_upstream("https://github.com/CocoaPods/Specs.git");
def_sources_begin()

View File

@ -41,11 +41,10 @@ wr_dockerhub_prelude ()
chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = NULL;
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_allow_user_define(this);
def_upstream("https://hub.docker.com/");
def_sources_begin()

View File

@ -29,11 +29,13 @@ wr_emacs_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = false;
this.note = "Emacs用户往往只需要一次性换源只会极少次调用 chsrc我们只给用户提供文档";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_forbid_user_define(this);
chef_set_note (this, "Emacs用户往往只需要一次性换源只会极少次调用 chsrc我们只给用户提供文档",
"Emacs users typically only need to switch sources once and rarely call chsrc, so we only provide documentation to users");
def_upstream("https://elpa.gnu.org/");
def_sources_begin()

View File

@ -22,11 +22,13 @@ wr_flathub_prelude ()
chef_allow_get();
chef_allow_set();
chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = "对Flathub目标进行测速的文件非常小测速效果严重失真若你知道可供测速的URL欢迎参与贡献: chsrc issue";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_allow_user_define(this);
chef_set_note (this, "对Flathub目标进行测速的文件非常小测速效果严重失真若你知道可供测速的URL欢迎参与贡献: chsrc issue",
"The test file for Flathub is very small, causing inaccurate speed test results. If you know a URL suitable for speed testing, welcome to contribute: chsrc issue");
def_upstream("https://flathub.org/repo");
def_sources_begin()

View File

@ -22,11 +22,13 @@ wr_guix_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = false;
this.note = "目前只有一个源, guixcn 的源不知道是否可用";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_forbid_user_define(this);
chef_set_note (this, "目前只有一个源, guixcn 的源不知道是否可用",
"Currently only one source available, guixcn source availability unknown");
def_upstream("https://git.savannah.gnu.org/git/guix.git");
def_sources_begin()

View File

@ -24,11 +24,13 @@ wr_homebrew_prelude ()
chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = true;
this.can_user_define = false;
this.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_forbid_user_define(this);
chef_set_note (this, "该换源通过写入环境变量实现若多次换源请手动清理profile文件",
"This source switching is implemented by writing environment variables. If switching sources multiple times, please manually clean the profile file");
def_upstream("https://github.com/Homebrew/brew.git");
def_sources_begin()

View File

@ -22,11 +22,10 @@ wr_nix_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = false;
this.note = "不可自动换源因为链接将会在setsrc函数中补充完整";
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_forbid_user_define(this);
def_upstream("https://channels.nixos.org/");
def_sources_begin()

View File

@ -24,11 +24,10 @@ wr_tex_prelude ()
chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = NULL;
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_allow_user_define(this);
def_upstream("https://ctan.org/tex-archive/systems/texlive/tlnet");
def_sources_begin()

View File

@ -21,8 +21,9 @@ wr_winget_prelude ()
chef_allow_get();
chef_allow_set();
chef_allow_reset();
this.can_english = false;
this.can_user_define = true;
chef_forbid_english(this);
chef_allow_user_define(this);
def_upstream("https://github.com/microsoft/winget-cli/");
def_sources_begin()