fetchFromSavannah: deprecate

The Savannah administrators do not want package maintainers to use
cgit snapshots due to putting strain on the servers and have disabled
cgit snapshots for most if not all of their repositories.

See: https://lists.gnu.org/archive/html/savannah-hackers/2025-12/msg00014.html

Co-authored-by: Philip Taron <philip.taron@gmail.com>
Co-authored-by: LIN, Jian <me@linj.tech>
This commit is contained in:
Jasi 2025-07-30 14:06:01 -07:00 committed by Jasi
parent 49961d37ff
commit 03b2128fcc
No known key found for this signature in database
GPG key ID: 04C7B921A5C3E8BF
4 changed files with 26 additions and 27 deletions

View file

@ -899,10 +899,6 @@ However, `fetchFromBitbucket` will automatically switch to using `fetchgit` and
When `fetchgit` is used, refer to the `fetchgit` section for documentation of its available options.
## `fetchFromSavannah` {#fetchfromsavannah}
This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromRepoOrCz` {#fetchfromrepoorcz}
This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above.

View file

@ -314,7 +314,8 @@
"release-notes.html#sec-nixpkgs-release-26.05-lib-breaking"
],
"sec-nixpkgs-release-26.05-lib-deprecations": [
"release-notes.html#sec-nixpkgs-release-26.05-lib-deprecations"
"release-notes.html#sec-nixpkgs-release-26.05-lib-deprecations",
"index.html#fetchfromsavannah"
],
"sec-nixpkgs-release-26.05-lib-additions-improvements": [
"release-notes.html#sec-nixpkgs-release-26.05-lib-additions-improvements"
@ -1779,9 +1780,6 @@
"fetchfrombitbucket": [
"index.html#fetchfrombitbucket"
],
"fetchfromsavannah": [
"index.html#fetchfromsavannah"
],
"fetchfromrepoorcz": [
"index.html#fetchfromrepoorcz"
],

View file

@ -162,6 +162,7 @@
- `mpv-unwrapped.scripts` and `mpv-unwrapped.wrapper` have been removed. Please use `mpvScripts` and `mpv.override` accordingly.
- `fetchFromSavannah` is now deprecated and is expected to be fully removed in a future release. From now on, use `fetchgit` or a Savannah releases mirror when applicable.
### Additions and Improvements {#sec-nixpkgs-release-26.05-lib-additions-improvements}

View file

@ -12,23 +12,27 @@ lib.makeOverridable (
name ? repoRevToNameMaybe repo rev "savannah",
... # For hash agility
}@args:
fetchzip (
{
inherit name;
url =
let
repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa
in
"https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz";
meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/";
passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git";
}
// removeAttrs args [
"repo"
"rev"
]
)
// {
inherit rev;
}
let
result =
fetchzip (
{
inherit name;
url =
let
repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa
in
"https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz";
meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/";
passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git";
}
// removeAttrs args [
"repo"
"rev"
]
)
// {
inherit rev;
};
in
lib.warnOnInstantiate "`fetchFromSavannah` is deprecated and will be removed in a future release." result
)