NIX-PREFETCH-GITHUB(1)
π NIX-PREFETCH-GITHUB(1) π
Okay bestie, welcome to the manual page for nix-prefetch-github β yes, thatβs literally the manual name β and weβre on the NIX-PREFETCH-GITHUB(1) page, version 7.1.0. Itβs giving βtool that generates nix arguments so you donβt have to suffer manually.β Letβs go. β¨
β¨ NAME β¨
nix-prefetch-githubβ thenix-prefetch-github 7.1.0page, periodt. π
π NIX-PREFETCH-GITHUB π
Use this program to generate the arguments for the fetchFromGitHub nix function. Thatβs the whole vibe. π«Ά
usage: nix-prefetch-github [-h] [--fetch-submodules] [--no-fetch-submodules]
[--leave-dot-git] [--no-leave-dot-git]
[--deep-clone] [--no-deep-clone] [--verbose]
[--quiet] [--nix] [--json] [--meta] [--version]
[--rev REV]
owner repo
π Positional Arguments π
ownerβ first positional argument. The original page gives no extra description here, so weβre not inventing one. πrepoβ second positional argument. Same deal: no extra description in the original. π«Ά
ποΈ Named Arguments ποΈ
--fetch-submodulesβ include git submodules in the output derivation. Default:PrefetchOptions(fetch_submodules=False, deep_clone=False, leave_dot_git=False). π§--no-fetch-submodulesβ donβt include git submodules in output derivation. π«--leave-dot-gitβ include.gitfolder in output derivation. Use this if you need repository data, e.g. current commit hash, for the build process. π₯--no-leave-dot-gitβ donβt include.gitfolder in output derivation. π--deep-cloneβ include all of the repository history in the output derivation. This option implies--leave-dot-git. π--no-deep-cloneβ donβt include the repository history in the output derivation. π--verbose,-vβ print additional information about the programs execution. This is useful if you want to issue a bug report. Default:LoggingConfiguration(output_file=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, log_level=30). π--quiet,-qβ print less information about the programs execution. π€«--nixβ output the results as valid nix code. Default:RenderingFormat.json. π--jsonβ output the results in the JSON format. β--metaβ output the results in JSON format where the arguments tofetchFromGitHubare located under thesrckey of the resulting json dictionary and meta information about the prefetched repository is located under themetakey of the output. π--versionβ show programβs version number and exit. π--revβ the original page lists this with no description, so weβre leaving it exactly that way. No invented lore. π«Ά
π NIX-PREFETCH-GITHUB-DIRECTORY π
Use this program to generate a nix expression for fetchFromGitHub based on the git repository in the local directory. Local-directory main character energy. π¦
usage: nix-prefetch-github-directory [-h] [--fetch-submodules]
[--no-fetch-submodules] [--leave-dot-git]
[--no-leave-dot-git] [--deep-clone]
[--no-deep-clone] [--verbose] [--quiet]
[--nix] [--json] [--meta] [--version]
[--directory DIRECTORY] [--remote REMOTE]
ποΈ Named Arguments ποΈ
--fetch-submodulesβ include git submodules in the output derivation. Default:PrefetchOptions(fetch_submodules=False, deep_clone=False, leave_dot_git=False). π§--no-fetch-submodulesβ donβt include git submodules in output derivation. π«--leave-dot-gitβ include.gitfolder in output derivation. Use this if you need repository data, e.g. current commit hash, for the build process. π₯--no-leave-dot-gitβ donβt include.gitfolder in output derivation. π--deep-cloneβ include all of the repository history in the output derivation. This option implies--leave-dot-git. π--no-deep-cloneβ donβt include the repository history in the output derivation. π--verbose,-vβ print additional information about the programs execution. This is useful if you want to issue a bug report. Default:LoggingConfiguration(output_file=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, log_level=30). π--quiet,-qβ print less information about the programs execution. π€«--nixβ output the results as valid nix code. Default:RenderingFormat.json. π--jsonβ output the results in the JSON format. β--metaβ output the results in JSON format where the arguments tofetchFromGitHubare located under thesrckey of the resulting json dictionary and meta information about the prefetched repository is located under themetakey of the output. π--versionβ show programβs version number and exit. π--directoryβ the original page lists this with no description, so no extra description from me. π--remoteβ Default:'origin'. π§
π·οΈ NIX-PREFETCH-LATEST-RELEASE π·οΈ
Use this program to generate a nix expression for the latest release of a github repository. Latest release, no cap. π
usage: nix-prefetch-github-latest-release [-h] [--fetch-submodules]
[--no-fetch-submodules]
[--leave-dot-git]
[--no-leave-dot-git] [--deep-clone]
[--no-deep-clone] [--verbose]
[--quiet] [--nix] [--json] [--meta]
[--version]
owner repo
π Positional Arguments π
ownerβ first positional argument. The original gives no description, so weβre keeping it cute and empty. πrepoβ second positional argument. Same energy: no description in the original. π«Ά
ποΈ Named Arguments ποΈ
--fetch-submodulesβ include git submodules in the output derivation. Default:PrefetchOptions(fetch_submodules=False, deep_clone=False, leave_dot_git=False). π§--no-fetch-submodulesβ donβt include git submodules in output derivation. π«--leave-dot-gitβ include.gitfolder in output derivation. Use this if you need repository data, e.g. current commit hash, for the build process. π₯--no-leave-dot-gitβ donβt include.gitfolder in output derivation. π--deep-cloneβ include all of the repository history in the output derivation. This option implies--leave-dot-git. π--no-deep-cloneβ donβt include the repository history in the output derivation. π--verbose,-vβ print additional information about the programs execution. This is useful if you want to issue a bug report. Default:LoggingConfiguration(output_file=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, log_level=30). π--quiet,-qβ print less information about the programs execution. π€«--nixβ output the results as valid nix code. Default:RenderingFormat.json. π--jsonβ output the results in the JSON format. β--metaβ output the results in JSON format where the arguments tofetchFromGitHubare located under thesrckey of the resulting json dictionary and meta information about the prefetched repository is located under themetakey of the output. π--versionβ show programβs version number and exit. π
π GITHUB API TOKEN π
All the commands provided by this package will read the environment variable GITHUB_TOKEN and use its content verbatim as an authentication/authorization token when requesting from GitHubs API. Thatβs the token vibe. π
The different command line programs of this package provide different output formats. Those can be selected via different arguments provided to the program. β¨
π§Ύ JSON OUTPUT π§Ύ
The --json argument is the default and will render the output as JSON to the standard output of the program. The resulting json value will consist of a single dictionary where all key value pairs correspond to the arguments to the fetchFromGitHub function provided by nixpkgs. It is intended to be used directly in nix code:
src = with builtins; fetchFromGitHub (fromJSON (readFile ./nix-prefetch-github-output.json))
Thatβs literally the whole JSON moment. Clean, direct, iconic. π
πͺ META INFORMATION OUTPUT πͺ
The --meta argument produces output similar to the output produced by --json. The difference is that a nested dictionary is produced with two top level keys: src and meta. The src key will contain the same data as would have been yielded by --json whereas the meta key contains some meta data on the commit that was fetched. At the moment this will only be the date and time of day of the latest commit. This can be useful when providing nightly versions of a package:
let fetchedSourceCode = (fromJSON (readFile ./nix-prefetch-github-output.json));
in buildPackage {
pname = "my-package";
version = fetchedSourceCode.meta.commitDate;
src = fetchFromGitHub fetchedSourceCode.src;
...
};
Nightly versions said βlet me be metadata-coded.β π
π§± NIX OUTPUT π§±
Consider this a legacy output format without any practical applications. The --nix argument will result in a valid nix expression produced by the respective program.
Legacy, yes. Still valid nix, yes. We donβt make the rules. π«
π Author π
Sebastian Jordan. Iconic author behavior. π
π Copyright π
2022, Sebastian Jordan.
Byeee bestie! This was the NIX-PREFETCH-GITHUB(1) page from nix-prefetch-github 7.1.0, dated Jan 02, 1980 β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: python3.13-nix-prefetch-github 7.1.0
- nixpkgs unstable: python3.14-nix-prefetch-github 7.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms