]> git.immae.eu Git - github/fretlink/clever-tools-nix.git/commitdiff
refact: update example
authorHussein Ait Lahcen <hussein.aitlahcen@gmail.com>
Mon, 25 Jun 2018 09:40:03 +0000 (11:40 +0200)
committerHussein Ait Lahcen <hussein.aitlahcen@gmail.com>
Mon, 25 Jun 2018 09:41:23 +0000 (11:41 +0200)
README.md
example.nix

index 3e0c1bbbe9672db4776668bd5ecb08e0e8e357ce..b47a4bce390d8c38067272c4ce6124caa52a41ba 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,15 +13,13 @@ Main job of those derivations is to use patchelf to make it nix compliant.
 ## How to use it
 
 ```nix
-{ pkgs ? import <nixpkgs> {} }:
+{ pkgs ? import <nixpkgs> {} }: with pkgs;
 
-let
-  clever-tools = pkgs.fetchFromGitHub
-                   { owner  = "fmenou";
+let clever-tools = fetchFromGitHub {
+                     owner  = "fretlink";
                      repo   = "clever-tools-nix";
-                     rev    = "7c2a7868b387ffd064dd14c51f7b18224cdc5c88";
-                     sha256 = "0r4bc4k90xpq325djvsyix9a6hiabmd4nba14j0plgdrwgzb36rh";
+                     rev    = "DESIRED_REVISION_HASH";
+                     sha256 = "CONTENT_HASH";
                    };
-
-in import clever-tools { inherit pkgs; }
+in (import clever-tools {}).latest # select appropriate version
 ```
index 1245fec8f7ddda24d5330f3fe94d9d74aaf17866..d7b53db56dd109a5d5eec2c4572e1658463e6472 100644 (file)
@@ -1,11 +1,9 @@
-{ pkgs ? import <nixpkgs> {} }:
+{ pkgs ? import <nixpkgs> {} }: with pkgs;
 
-let
-  clever-tools = pkgs.fetchFromGitHub
-                   { owner  = "fmenou";
+let clever-tools = fetchFromGitHub {
+                     owner  = "fretlink";
                      repo   = "clever-tools-nix";
-                     rev    = "7c2a7868b387ffd064dd14c51f7b18224cdc5c88";
-                     sha256 = "0r4bc4k90xpq325djvsyix9a6hiabmd4nba14j0plgdrwgzb36rh";
+                     rev    = "DESIRED_REVISION_HASH";
+                     sha256 = "CONTENT_HASH";
                    };
-
-in import clever-tools { inherit pkgs; }
+in (import clever-tools {}).latest # select appropriate version