summary refs log tree commit diff
path: root/lib/trivial.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-01-30 11:18:56 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-01-30 11:44:08 +0100
commitc20cc6d0b37b8330eb1bcdc0031b600f2665eb93 (patch)
tree7204fef874deec5a890e03e63d271df8dc11460a /lib/trivial.nix
parent2dc87881b045ad02abe32c6c486e2b30fceb61de (diff)
downloadnixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar.gz
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar.bz2
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar.lz
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar.xz
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.tar.zst
nixpkgs-c20cc6d0b37b8330eb1bcdc0031b600f2665eb93.zip
Excise use of importJSON
Putting information in external JSON files is IMHO not an improvement
over the idiomatic style of Nix expressions. The use of JSON doesn't
add anything over Nix expressions (in fact it removes expressive
power). And scattering package info over lots of little files makes
packages less readable over having the info in one file.
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r--lib/trivial.nix20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 7860b949939..abe5a16c67d 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);