diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | default.nix | 18 | ||||
-rw-r--r-- | example.nix | 14 |
4 files changed, 28 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml index 9f457c4..8b81afc 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -2,7 +2,7 @@ | |||
2 | language: nix | 2 | language: nix |
3 | 3 | ||
4 | script: | 4 | script: |
5 | - nix-env -i -f default.nix | 5 | - nix-env -i -f default.nix -A latest |
6 | - ./check.sh . | 6 | - ./check.sh . |
7 | 7 | ||
8 | notifications: | 8 | notifications: |
@@ -13,15 +13,13 @@ Main job of those derivations is to use patchelf to make it nix compliant. | |||
13 | ## How to use it | 13 | ## How to use it |
14 | 14 | ||
15 | ```nix | 15 | ```nix |
16 | { pkgs ? import <nixpkgs> {} }: | 16 | { pkgs ? import <nixpkgs> {} }: with pkgs; |
17 | 17 | ||
18 | let | 18 | let clever-tools = fetchFromGitHub { |
19 | clever-tools = pkgs.fetchFromGitHub | 19 | owner = "fretlink"; |
20 | { owner = "fmenou"; | ||
21 | repo = "clever-tools-nix"; | 20 | repo = "clever-tools-nix"; |
22 | rev = "7c2a7868b387ffd064dd14c51f7b18224cdc5c88"; | 21 | rev = "DESIRED_REVISION_HASH"; |
23 | sha256 = "0r4bc4k90xpq325djvsyix9a6hiabmd4nba14j0plgdrwgzb36rh"; | 22 | sha256 = "CONTENT_HASH"; |
24 | }; | 23 | }; |
25 | 24 | in (import clever-tools {}).latest # select appropriate version | |
26 | in import clever-tools { inherit pkgs; } | ||
27 | ``` | 25 | ``` |
diff --git a/default.nix b/default.nix index 0c12df8..e8849a1 100644 --- a/default.nix +++ b/default.nix | |||
@@ -1,5 +1,17 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: with pkgs; | 1 | { pkgs ? import <nixpkgs> {} }: with pkgs; |
2 | 2 | let | |
3 | callPackage ./clever-tools { | 3 | mkOlderVersion = { rev, sha256 }: |
4 | nodegit = callPackage ./nodegit {}; | 4 | let |
5 | olderVersion = fetchFromGitHub { | ||
6 | owner = "fretlink"; | ||
7 | repo = "clever-tools-nix"; | ||
8 | inherit rev; | ||
9 | inherit sha256; | ||
10 | }; | ||
11 | in (import olderVersion {}).latest; | ||
12 | in | ||
13 | { | ||
14 | latest = callPackage ./clever-tools { | ||
15 | nodegit = callPackage ./nodegit {}; | ||
16 | }; | ||
5 | } | 17 | } |
diff --git a/example.nix b/example.nix index 1245fec..d7b53db 100644 --- a/example.nix +++ b/example.nix | |||
@@ -1,11 +1,9 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: | 1 | { pkgs ? import <nixpkgs> {} }: with pkgs; |
2 | 2 | ||
3 | let | 3 | let clever-tools = fetchFromGitHub { |
4 | clever-tools = pkgs.fetchFromGitHub | 4 | owner = "fretlink"; |
5 | { owner = "fmenou"; | ||
6 | repo = "clever-tools-nix"; | 5 | repo = "clever-tools-nix"; |
7 | rev = "7c2a7868b387ffd064dd14c51f7b18224cdc5c88"; | 6 | rev = "DESIRED_REVISION_HASH"; |
8 | sha256 = "0r4bc4k90xpq325djvsyix9a6hiabmd4nba14j0plgdrwgzb36rh"; | 7 | sha256 = "CONTENT_HASH"; |
9 | }; | 8 | }; |
10 | 9 | in (import clever-tools {}).latest # select appropriate version | |
11 | in import clever-tools { inherit pkgs; } | ||