tinc

Last updated: 2017-05-13 04:19:16 +0100

Upstream URL: git clone http://chriswarbo.net/git/tinc.git

Repo

View repository

View issue tracker

Contents of README.md follows


FIXME: This is a hacked version of tinc, which breaks the Nix output in order

to avoid globals and allow more overriding. If it is useful, it should be

cleaned up (e.g. integrated into the existing output, rather than replacing

it) and upstreamed!

tinc: A dependency manager for Haskell

<code>tinc</code> installs dependencies for a project that you work on into a sandbox. While doing so it caches installed packages (in <code>~/.tinc/cache</code>). When a package with the same transitive dependencies is already in the cache, it reuses that cached package instead of building it again.

<code>tinc</code> uses an exact algorithm for determining reusability. This guarantees 100% cache reuse. A package with the same transitive dependencies is never built twice.

<code>tinc</code> does not take any cached packages into account when resolving dependencies. Running

<pre><code>$ tinc</code></pre>

gives you the exact same result as

<pre><code>$ cabal sandbox delete $ cabal sandbox init $ cabal install --only-dependencies --enable-tests</code></pre>

<code>tinc</code> is idempotent. It’s safe to run <code>tinc</code> multiple times. Running <code>tinc</code> after changing the <code>.cabal</code>-file of a project or after running <code>cabal update</code> results in a new updated sandbox.

If <code>tinc</code> fails / terminates for some reason, it does not modify anything (neither the cache nor any existing sandboxes). Interrupting a running <code>tinc</code> build is always safe.

Optionally use Nix for package caching

By default, <code>tinc</code> maintains its own package cache under <code>~/.tinc/cache</code>.

However, it can optionally use nixpkgs for package caching. If <code>tinc</code> is installed somewhere under <code>/nix</code>, this is the default.

To change the default, you can set the environment variable <code>TINC_USE_NIX</code> to either <code>yes</code> or <code>no</code>, specifically:

<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><span class="bu">export</span> <span class="va">TINC_USE_NIX</span><span class="op">=</span>yes <span class="co"># use nix, even if not installed under /nix</span></span> <span id="cb3-2"><span class="bu">export</span> <span class="va">TINC_USE_NIX</span><span class="op">=</span>no <span class="co"># do not use nix, even if installed under /nix</span></span></code></pre></div>