update-nix-fetchgit: A program to update fetchgit values in Nix expressions

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This command-line utility is meant to be used by people maintaining Nix expressions that fetch files from Git repositories. It automates the process of keeping such expressions up-to-date with the latest upstream sources.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.1.0, 0.1.1.0, 0.1.2.0, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.7, 0.2.8, 0.2.9, 0.2.11
Change log CHANGELOG.md
Dependencies aeson (>=0.9), async (>=2.1), base (>=4.7 && <5), bytestring (>=0.10), data-fix (>=0.0), errors (>=2.1), hnix (>=0.8), prettyprinter, process (>=1.2), text (>=1.2), time (>=1.5), transformers (>=0.4), trifecta (>=1.6), uniplate (>=1.6), update-nix-fetchgit, utf8-string (>=1.0) [details]
License BSD-3-Clause
Copyright 2015 Joe Hermaszewski
Author Joe Hermaszewski
Maintainer haskell@monoid.al
Category Nix
Home page https://github.com/expipiplus1/update-nix-fetchgit#readme
Source repo head: git clone https://github.com/expipiplus1/update-nix-fetchgit
Uploaded by srk at 2020-06-25T08:37:54Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for update-nix-fetchgit-0.1.1.0

[back to package description]

update-nix-fetchgit

This is a command-line utility for updating fetchgit, fetchgitPrivate, and fetchFromGitHub calls in Nix expressions. This utility is meant to be used by people maintaining Nix expressions that fetch files from Git repositories. It automates the process of keeping such expressions up-to-date with the latest upstream sources.

When you run update-nix-fetchgit on a file, it will:

Any version attribute found in the file will be updated if it is in a set that contains (directly or inderictly) a Git fetch. The version attribute will be updated to the commit date of the latest HEAD commit in the Git repository, in the time zone of the committer, in "YYYY-MM-DD" format. If the set contains multiple Git fetches, the latest such date is used.

When this program fetches information from multiple repositories, it runs multiple instances of nix-prefetch-git in parallel.

Usage

Pass the name of the file to be updated as the first argument:

update-nix-fetchgit filename.nix

The file will be updated in place.

Extra arguments

update-nix-fetchgit will pass any extra arguments after the filename to nix-prefetch-git:

update-nix-fetchgit filename.nix --rev refs/heads/myBranch

Example

Here is an example of a Nix expression that can be updated by this program:

{ stdenv, fetchgit }:

stdenv.mkDerivation rec {
  name = "foo-${version}";
  version = "2016-07-13";
  src = fetchgit {
    url = "git://midipix.org/slibtool";
    rev = "4f56fd184ef6020626492a6f954a486d54f8b7ba";
    sha256 = "0nmyp5yrzl9dbq85wyiimsj9fklb8637a1936nw7zzvlnzkgh28n";
  };
}

The rev, sha256, and version attributes will all be updated.

Building from source

The recommended way to build this program from source for development purposes is to download and run nix-shell in the top-level source directory and then run cabal build.

More documentation

You can run update-nix-fetchgit --help or man update-nix-fetchgit for more documentation.

Authors