[Haskell-cafe] [ANN] nix-freeze-tree-0.1.0.0 - Freeze a tree using fixed-output derivations
jack at jackkelly.name
Sat Jan 25 04:39:05 UTC 2020
I have just pushed an initial release of nix-freeze-tree to Hackage.
`nix-freeze-tree` is a utility that walks a directory tree, and writes
out Nix expressions which rebuild that tree. The generated expressions
have two important properties:
1. Each file in the tree is built by a separate fixed-output
2. Directories are built by derivations that symlink their contents
If you are using `nix copy` to ship a derivation between nix stores,
copying the derivation built by evaluating the output of
`nix-freeze-tree` can reuse existing files in the destination store,
as fixed-output derivations can be checked against a hash before
I use this to speed up deploys to my personal website. Running
`nix-freeze-tree` on the output from my site generator and importing the
result means that `nix copy` only uploads new files, instead of copying
a single giant derivation containing every image on the site.
The code is on Sourcehut; bug reports and patches are
welcome. The repository also has a Nix helper function for running the
tool on your own derivations.
More information about the Haskell-Cafe