Split guix out

This commit is contained in:
Aoran Zeng 2024-08-16 04:20:48 +08:00
parent e77e42fb6c
commit a92b30c57b
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 42 additions and 31 deletions

View File

@ -166,16 +166,6 @@ wr_flathub_sources[] = {
/**
* @time 2023-09-11
* @note
*/
wr_guix_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"}
},
/**
@ -214,6 +204,5 @@ def_sources_n(pl_clojure);
def_sources_n(pl_dotnet);
def_sources_n(wr_flathub);
def_sources_n(wr_guix);
def_sources_n(wr_tex);
def_sources_n(wr_anaconda);

View File

@ -181,25 +181,7 @@ wr_tex_setsrc (char *option)
#include "recipe/ware/Homebrew.c"
#include "recipe/ware/CocoaPods.c"
#include "recipe/ware/Nix.c"
/**
* : https://mirrors.sjtug.sjtu.edu.cn/docs/guix
*/
void
wr_guix_setsrc (char *option)
{
SourceInfo source;
chsrc_yield_source (wr_guix);
chsrc_confirm_source (&source);
char *file = xy_strjoin (3, "(list (channel\n"
" (inherit (car %default-channels))\n"
" (url \"", source.url, "\")))");
chsrc_note2 ("为防止扰乱配置文件,请您手动写入以下内容到 ~/.config/guix/channels.scm 文件中");
puts (file);
chsrc_say_lastly (&source, ChsrcTypeManual);
}
#include "recipe/ware/Guix.c"

View File

@ -93,7 +93,6 @@ static const char
def_target_noget (wr_flathub);
def_target_noget (wr_guix);
def_target_noget (wr_anaconda);
def_target(wr_tex);

41
src/recipe/ware/Guix.c Normal file
View File

@ -0,0 +1,41 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-11>
* Last Modified : <2024-08-15>
* ------------------------------------------------------------*/
/**
* @time 2023-09-11
* @note
*/
static SourceInfo
wr_guix_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"}
};
def_sources_n(wr_guix);
/**
* : https://mirrors.sjtug.sjtu.edu.cn/docs/guix
*/
void
wr_guix_setsrc (char *option)
{
SourceInfo source;
chsrc_yield_source (wr_guix);
chsrc_confirm_source (&source);
char *file = xy_strjoin (3, "(list (channel\n"
" (inherit (car %default-channels))\n"
" (url \"", source.url, "\")))");
chsrc_note2 ("为防止扰乱配置文件,请您手动写入以下内容到 ~/.config/guix/channels.scm 文件中");
puts (file);
chsrc_say_lastly (&source, ChsrcTypeManual);
}
def_target_noget (wr_guix);