Skip to main content

Prefetch source code from github for nix build tool

Project description

This module implements a python function and a command line tool to help you fetch sources from github when using fetchFromGitHub.

command line example

$ nix-prefetch-github seppeljordan nix-prefetch-github
{
    "owner": "seppeljordan",
    "repo": "nix-prefetch-github",
    "rev": "603f42203db128a7aaa091cf34d406bf7a80e9f0",
    "sha256": "1wrvvy85x7yqj4rkgpj93cdnhalyhzpr8pmyca38v59lm5ndh2w4"
}

python example

Python 3.6.4 (default, Dec 19 2017, 05:36:13)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nix_prefetch_github
>>> nix_prefetch_github.nix_prefetch_github(owner="seppeljordan", repo="nix-prefetch-github")
{'owner': 'seppeljordan', 'repo': 'nix-prefetch-github', 'rev': '603f42203db128a7aaa091cf34d406bf7a80e9f0', 'sha256': '1wrvvy85x7yqj4rkgpj93cdnhalyhzpr8pmyca38v59lm5ndh2w4'}

changes

v2.0

  • The result of nix_pretch_github and its corresponding command line tool now contains always the actual commit hash as detected by the tool instead of the branch or tag name.

  • Add a new flag --nix that makes the command line tool output a valid nix expression

  • Removed the --hash-only and --no-hash-only flags and changed add --prefetch and --no-prefetch flags to replace them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nix-prefetch-github-2.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file nix-prefetch-github-2.0.tar.gz.

File metadata

  • Download URL: nix-prefetch-github-2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for nix-prefetch-github-2.0.tar.gz
Algorithm Hash digest
SHA256 bac3740ae068d2a2475b6ccf501f9d85f75f08dcf4bb1eb368ba108f152f740b
MD5 3c6eb4ee6b04b05162b96e29f247898e
BLAKE2b-256 20c4572841dbd8750dc4b8464f30668042be9264e0ed0b12b667e587bd993d4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page