From c20cc6d0b37b8330eb1bcdc0031b600f2665eb93 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Jan 2017 11:18:56 +0100 Subject: 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. --- lib/trivial.nix | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'lib/trivial.nix') 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); -- cgit 1.4.1