diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-01-30 11:18:56 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-01-30 11:44:08 +0100 |
commit | c20cc6d0b37b8330eb1bcdc0031b600f2665eb93 (patch) | |
tree | 7204fef874deec5a890e03e63d271df8dc11460a /lib/trivial.nix | |
parent | 2dc87881b045ad02abe32c6c486e2b30fceb61de (diff) |
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.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); |