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.
This commit is contained in:
@@ -18,11 +18,14 @@ let
|
||||
python = python2;
|
||||
buildType = "release";
|
||||
|
||||
inherit (importJSON ./upstream-info.json) version extpackRev extpack main;
|
||||
extpack = "3982657fd4853bcbc79b9162e618545a479b65aca08e9ced43a904aeeba3ffa5";
|
||||
extpackRev = 112026;
|
||||
main = "98073b1b2adee4e6553df73cb5bb6ea8ed7c3a41a475757716fd9400393bea40";
|
||||
version = "5.1.10";
|
||||
|
||||
# See https://github.com/NixOS/nixpkgs/issues/672 for details
|
||||
extensionPack = requireFile rec {
|
||||
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRev}.vbox-extpack";
|
||||
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${toString extpackRev}.vbox-extpack";
|
||||
sha256 = extpack;
|
||||
message = ''
|
||||
In order to use the extension pack, you need to comply with the VirtualBox Personal Use
|
||||
|
||||
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
|
||||
sha256 = (lib.importJSON ../upstream-info.json).guest;
|
||||
sha256 = "29fa0af66a3dd273b0c383c4adee31a52061d52f57d176b67f444698300b8c41";
|
||||
};
|
||||
|
||||
KERN_DIR = "${kernel.dev}/lib/modules/*/build";
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"__NOTE": "Generated using update.py from the same directory.",
|
||||
"extpack": "3982657fd4853bcbc79b9162e618545a479b65aca08e9ced43a904aeeba3ffa5",
|
||||
"extpackRev": "112026",
|
||||
"guest": "29fa0af66a3dd273b0c383c4adee31a52061d52f57d176b67f444698300b8c41",
|
||||
"main": "98073b1b2adee4e6553df73cb5bb6ea8ed7c3a41a475757716fd9400393bea40",
|
||||
"version": "5.1.10"
|
||||
}
|
||||
Reference in New Issue
Block a user