diff options
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r-- | lib/trivial.nix | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix index 7860b9499390..abe5a16c67d6 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -102,25 +102,7 @@ rec { min = x: y: if x < y then x else y; max = x: y: if x > y then x else y; - /* Reads a JSON file. It is useful to import pure data into other nix - expressions. - - Example: - - mkDerivation { - src = fetchgit (importJSON ./repo.json) - #... - } - - where repo.json contains: - - { - "url": "git://some-domain/some/repo", - "rev": "265de7283488964f44f0257a8b4a055ad8af984d", - "sha256": "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h" - } - - */ + /* Reads a JSON file. */ importJSON = path: builtins.fromJSON (builtins.readFile path); |