mirrorrequest icon indicating copy to clipboard operation
mirrorrequest copied to clipboard

nixpkgs.git

Open Freed-Wu opened this issue 1 year ago • 6 comments
trafficstars

先决条件 (Prerequisites)

项目介绍 (Project introduction)

Nixpkgs is a collection of over 60,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

上游地址与镜像方法 (Upstream & mirroring method)

https://github.com/NixOS/nixpkgs.git

镜像大小 (Mirror size)

No response

备注 (Note)

Related issues:

  • https://github.com/tuna/issues/issues/1265

Freed-Wu avatar Mar 03 '24 12:03 Freed-Wu

能否介绍一下这个仓库对终端用户有什么用途?

iBug avatar Mar 03 '24 12:03 iBug

when user package new software to NixOS, they need git clone this package then git commit, gh pr create. If a mirror is available, it can speed up git clone.

Freed-Wu avatar Mar 03 '24 12:03 Freed-Wu

从我个人的理解来看,用镜像站的 git 版本做开发,然后给上游提交 PR 是非常怪异的事情,并且存在因为同步延迟导致 PR 出问题的可能。如果实际需求是包含所有历史的仓库太大,需要减小 clone 下来的仓库的大小,可以参考 https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ 来做,或者使用 GitHub Codespaces。

Related to: #386

taoky avatar Mar 03 '24 13:03 taoky

This has no real use for end users. Developers are supposed to handle GitHub connectivity themselves, particularly when the goal is to submit PRs on GitHub.

iBug avatar Mar 03 '24 13:03 iBug

nixpkgs.git 大概是有非提交 PR 的场景的——在需要 pin 住 nixpkgs 版本的时候

根据 https://api.github.com/repos/NixOS/nixpkgs 的报告,仓库大小为 4028389 KB ~= 4G,TUNA 的大小报告是 3.7G(https://mirrorz.org/list/nixpkgs.git

taoky avatar Mar 04 '24 11:03 taoky

考虑到 git 带来的额外 IO 与 CPU 压力,在 nix 实现了 blobless git clone 之后会考虑同步,相关 issue 参见:https://github.com/NixOS/nix/issues/6111

taoky avatar Apr 01 '24 10:04 taoky