Nix derivation to install clever-tools - see https://github.com/CleverCloud/clever-tools
-## What's in it
+## How to use it
-2 derivations to install
-- nodegit.node 0.20.3 for node v51, from prebuilt archive
-- clever-tools 0.9.3, from prebuilt archive
+[See the example.nix](https://github.com/fretlink/clever-tools-nix/blob/master/example.nix)
-Main job of those derivations is to use patchelf to make it nix compliant.
+## How to publish a new version
-## How to use it
+First, edit `clever-tools/default.nix`, to update the version number. For the expected hash, you can put `0000000000000000000000000000000000000000000000000000` (52 zeroes).
+
+Then, edit `default.nix`, update the `callPackage` line to the new version, as well as the `latest` value.
+
+Once you've done that, add a `mkOlderVersion` for the previous latest version. Once again, you can use the null hash for `sha256`.
+
+Then, run `nix build`. It will give you the correct values for the hashes. Correct those, run it again and you'll see `result-` directories, one per version. Go ahead and make sure they all work.
-```nix
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
-
-let clever-tools = fetchFromGitHub {
- owner = "fretlink";
- repo = "clever-tools-nix";
- rev = "DESIRED_REVISION_HASH";
- sha256 = "CONTENT_HASH";
- };
-in (import clever-tools {}).latest # select appropriate version
-```
+Finally, don't forget to update `scripts/check.sh` with the latest version number.