Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/build-helpers/fetchers.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,11 @@ Used with Mercurial. Expects `url`, `rev`, `hash`, overridable with [`<pkg>.over

A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.

## `fetchFromGitea` {#fetchfromgitea}
## `fetchFromGitea`, `fetchFromForgejo` and `fetchFromCodeberg` {#fetchfromgitea}

`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `hash` is currently preferred.
`fetchFromGitea`, also aliased to `fetchFromForgejo`, expects five arguments. `domain` is the Gitea/Forgejo server name. `owner` is a string corresponding to the user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea/Forgejo HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `hash` is currently preferred.

As <codeberg.org> is currently the most popular public Forgejo server, the `fetchFromCodeberg` fetcher is also available, which pre-fills the `domain` attribute.

## `fetchFromGitHub` {#fetchfromgithub}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
lib,
vimUtils,
fetchFromGitea,
fetchFromCodeberg,
nix-update-script,
vimPlugins,
}:
vimUtils.buildVimPlugin {
pname = "cmp-async-path";
version = "0-unstable-2026-01-09";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "FelipeLema";
repo = "cmp-async-path";
rev = "9c2374deb32c2bec8b27e928c6f57090e9a875d2";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
lib,
vimUtils,
fetchFromGitea,
fetchFromCodeberg,
nix-update-script,
}:
vimUtils.buildVimPlugin {
pname = "zig.vim";
version = "0-unstable-2026-01-16";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "ziglang";
repo = "zig.vim";
rev = "fc01f73ce0636723a03b784b63a7a89f2f9a84ae";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/applications/networking/browsers/librewolf/src.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
lib,
fetchurl,
fetchFromGitea,
fetchFromCodeberg,
}:
let
src = lib.importJSON ./src.json;
in
{
inherit (src) packageVersion;
source = fetchFromGitea (
source = fetchFromCodeberg (
src.source
// {
domain = "codeberg.org";
owner = "librewolf";
repo = "source";
fetchSubmodules = true;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/build-support/fetchcodeberg/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{ lib, fetchFromGitea }:
lib.makeOverridable (args: fetchFromGitea ({ domain = "codeberg.org"; } // args))
5 changes: 2 additions & 3 deletions pkgs/by-name/ar/arcan/sources.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
fetchFromGitHub,
fetchFromGitea,
fetchFromCodeberg,
}:

{
Expand All @@ -10,8 +10,7 @@
pname = "arcan";
version = "0.7.1";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "letoram";
repo = "arcan";
tag = self.version;
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/bi/bibiman/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
fetchFromGitea,
fetchFromCodeberg,
lib,
nix-update-script,
rustPlatform,
Expand All @@ -10,8 +10,7 @@ rustPlatform.buildRustPackage rec {
pname = "bibiman";
version = "0.15.0";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "lukeflo";
repo = "bibiman";
tag = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/bi/biboumi/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
stdenv,
fetchFromGitea,
fetchFromCodeberg,
cmake,
libuuid,
expat,
Expand All @@ -28,8 +28,7 @@ stdenv.mkDerivation {
pname = "biboumi";
version = "9.0-unstable-2025-10-27";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "poezio";
repo = "biboumi";
rev = "61242c35bc825d58c9db4301b5696bc17428bf98";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/ca/caffeine-ng/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
fetchFromGitea,
fetchFromCodeberg,
meson,
ninja,
pkg-config,
Expand All @@ -22,8 +22,7 @@ python3Packages.buildPythonApplication rec {
version = "4.2.0";
pyproject = false;

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "WhyNotHugo";
repo = "caffeine-ng";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/ca/calamares/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
writeShellScriptBin,
xdg-utils,

fetchFromGitea,
fetchFromCodeberg,

cmake,
ninja,
Expand Down Expand Up @@ -38,8 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
pname = "calamares";
version = "3.4.0";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "Calamares";
repo = "calamares";
tag = "v${finalAttrs.version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/ca/cat9/package.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
lib,
fetchFromGitea,
fetchFromCodeberg,
stdenvNoCC,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "cat9";
version = "0-unstable-2025-12-26";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "letoram";
repo = "cat9";
rev = "8d2b30545c3e87c8f2e161d755b53c23a48bcf05";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/ce/censor/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
fetchFromGitea,
fetchFromCodeberg,
python3Packages,
wrapGAppsHook4,
gobject-introspection,
Expand All @@ -16,8 +16,7 @@ python3Packages.buildPythonApplication rec {
version = "0.3.0";
pyproject = false;

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "censor";
repo = "Censor";
tag = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/co/codeberg-cli/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
fetchFromGitea,
fetchFromCodeberg,
installShellFiles,
lib,
openssl,
Expand All @@ -11,8 +11,7 @@ rustPlatform.buildRustPackage rec {
pname = "codeberg-cli";
version = "0.5.4";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "Aviac";
repo = "codeberg-cli";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/co/codeberg-pages/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
fetchFromGitea,
fetchFromCodeberg,
buildGoModule,
nix-update-script,
}:
Expand All @@ -9,8 +9,7 @@ buildGoModule rec {
pname = "codeberg-pages";
version = "6.4";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "Codeberg";
repo = "pages-server";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/co/colorpanes/package.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
lib,
rustPlatform,
fetchFromGitea,
fetchFromCodeberg,
}:

rustPlatform.buildRustPackage rec {
pname = "colorpanes";
version = "3.0.1";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "annaaurora";
repo = "colorpanes";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/co/comaps/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
organicmaps,
fetchurl,
fetchFromGitea,
fetchFromCodeberg,
boost,
gtest,
glm,
Expand Down Expand Up @@ -38,8 +38,7 @@ organicmaps.overrideAttrs (oldAttrs: rec {
pname = "comaps";
version = "2025.11.07-2";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "comaps";
repo = "comaps";
tag = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/cu/cunicu/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
stdenv,
buildGoModule,
fetchFromGitea,
fetchFromCodeberg,
installShellFiles,
versionCheckHook,
protobuf,
Expand All @@ -14,8 +14,7 @@ buildGoModule rec {
pname = "cunicu";
version = "0.12.0";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "cunicu";
repo = "cunicu";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/cu/curv/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
stdenv,
fetchFromGitea,
fetchFromCodeberg,
cmake,
git,
pkg-config,
Expand Down Expand Up @@ -29,8 +29,7 @@ stdenv.mkDerivation {
pname = "curv";
version = "0.5-unstable-2026-01-23";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "doug-moen";
repo = "curv";
rev = "17d03b534c69976ed60936beb8b7cc38e8c12c13";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/da/dabet/package.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
lib,
rustPlatform,
fetchFromGitea,
fetchFromCodeberg,
}:

rustPlatform.buildRustPackage rec {
pname = "dabet";
version = "3.0.1";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "annaaurora";
repo = "dabet";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/de/delfin/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
appstream,
cargo,
desktop-file-utils,
fetchFromGitea,
fetchFromCodeberg,
gitUpdater,
gtk4,
libadwaita,
Expand All @@ -24,8 +24,7 @@ stdenv.mkDerivation rec {
pname = "delfin";
version = "0.4.8";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "avery42";
repo = "delfin";
rev = "v${version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/de/deltatouch/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
stdenv,
fetchFromGitea,
fetchFromCodeberg,
fetchFromGitHub,
cmake,
intltool,
Expand Down Expand Up @@ -32,8 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
pname = "deltatouch";
version = "2.25.1";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "lk108";
repo = "deltatouch";
tag = "v${finalAttrs.version}";
Expand Down
5 changes: 2 additions & 3 deletions pkgs/by-name/de/dev86/package.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
lib,
stdenv,
fetchFromGitea,
fetchFromCodeberg,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "dev86";
version = "1.0.1-unstable-2025-02-12";

src = fetchFromGitea {
domain = "codeberg.org";
src = fetchFromCodeberg {
owner = "jbruchon";
repo = "dev86";
rev = "0332db1ceb238fa7f98603cdf4223a1d839d4b31";
Expand Down
Loading
Loading