git.iko.soy/typeable/nixpkgs
on master help sign in
virtualbox: Generate and use upstream-info.json

We now no longer need to update VirtualBox manually, which has a few advantages. Along with making it just easier to update this also makes the update procedure way less error-prone, for example if people forget to bump the extension pack revision or to update the guest additions. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit6d69293f26ff57a2621b299409af814ba7226413 authoraszlig <aszlig@redmoonstudios.org> dateTue 13 Sep 2016, 03:48 (10 years ago) parentf5ab9c8
3 files changed+13−12
pkgs/applications/virtualization/virtualbox/default.nix+4−11 pkgs/applications/virtualization/virtualbox/guest-additions/default.nix+1−1 pkgs/applications/virtualization/virtualbox/upstream-info.json+8
pkgs/applications/virtualization/virtualbox/default.nix+4−11
@@ -16,11 +16,7 @@ with stdenv.lib;
1616let
1717 buildType = "release";
1818
19− # When changing this, update ./guest-additions and the extpack
20− # revision/hash as well. See
21− # http://download.virtualbox.org/virtualbox/${version}/SHA256SUMS
22− # for hashes.
23− version = "5.1.4";
19+ inherit (importJSON ./upstream-info.json) version extpackRev extpack main;
2420
2521 forEachModule = action: ''
2622 for mod in \
@@ -41,12 +37,9 @@ let
4137 '';
4238
4339 # See https://github.com/NixOS/nixpkgs/issues/672 for details
44− extpackRevision = "110228";
4540 extensionPack = requireFile rec {
46− name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}.vbox-extpack";
47− # IMPORTANT: Hash must be base16 encoded because it's used as an input to
48− # VBoxExtPackHelperApp!
49− sha256 = "9462ff1b567c37ad9a33c0c7ca1925776615ec89b5a72563f29a8cc8514cf316";
41+ name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRev}.vbox-extpack";
42+ sha256 = extpack;
5043 message = ''
5144 In order to use the extension pack, you need to comply with the VirtualBox Personal Use
5245 and Evaluation License (PUEL) available at:
@@ -70,7 +63,7 @@ in stdenv.mkDerivation {
7063
7164 src = fetchurl {
7265 url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
73− sha256 = "b9a14a7771059c55c44b97f8d4eef9bea84544f3e215e0caa563bc35e2f16aaf";
66+ sha256 = main;
7467 };
7568
7669 buildInputs =
pkgs/applications/virtualization/virtualbox/guest-additions/default.nix+1−1
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
1212
1313 src = fetchurl {
1414 url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
15− sha256 = "e385b698338003595f6cdeee7b631ec6713058ba1227d1f2a1da342bdf741982";
15+ sha256 = (lib.importJSON ../upstream-info.json).guest;
1616 };
1717
1818 KERN_DIR = "${kernel.dev}/lib/modules/*/build";
pkgs/applications/virtualization/virtualbox/upstream-info.jsonnew file+8
@@ -0,0 +1,8 @@
1+{
2+ "__NOTE": "Generated using update.py from the same directory.",
3+ "extpack": "9462ff1b567c37ad9a33c0c7ca1925776615ec89b5a72563f29a8cc8514cf316",
4+ "extpackRev": "110228",
5+ "guest": "e385b698338003595f6cdeee7b631ec6713058ba1227d1f2a1da342bdf741982",
6+ "main": "b9a14a7771059c55c44b97f8d4eef9bea84544f3e215e0caa563bc35e2f16aaf",
7+ "version": "5.1.4"
8+}