1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

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>
This commit is contained in:
aszlig 2016-09-13 03:48:14 +02:00
parent f5ab9c81a8
commit 6d69293f26
No known key found for this signature in database
GPG key ID: 1DE8E48E57DB5436
3 changed files with 13 additions and 12 deletions

View file

@ -16,11 +16,7 @@ with stdenv.lib;
let
buildType = "release";
# When changing this, update ./guest-additions and the extpack
# revision/hash as well. See
# http://download.virtualbox.org/virtualbox/${version}/SHA256SUMS
# for hashes.
version = "5.1.4";
inherit (importJSON ./upstream-info.json) version extpackRev extpack main;
forEachModule = action: ''
for mod in \
@ -41,12 +37,9 @@ let
'';
# See https://github.com/NixOS/nixpkgs/issues/672 for details
extpackRevision = "110228";
extensionPack = requireFile rec {
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}.vbox-extpack";
# IMPORTANT: Hash must be base16 encoded because it's used as an input to
# VBoxExtPackHelperApp!
sha256 = "9462ff1b567c37ad9a33c0c7ca1925776615ec89b5a72563f29a8cc8514cf316";
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRev}.vbox-extpack";
sha256 = extpack;
message = ''
In order to use the extension pack, you need to comply with the VirtualBox Personal Use
and Evaluation License (PUEL) available at:
@ -70,7 +63,7 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
sha256 = "b9a14a7771059c55c44b97f8d4eef9bea84544f3e215e0caa563bc35e2f16aaf";
sha256 = main;
};
buildInputs =

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
sha256 = "e385b698338003595f6cdeee7b631ec6713058ba1227d1f2a1da342bdf741982";
sha256 = (lib.importJSON ../upstream-info.json).guest;
};
KERN_DIR = "${kernel.dev}/lib/modules/*/build";

View file

@ -0,0 +1,8 @@
{
"__NOTE": "Generated using update.py from the same directory.",
"extpack": "9462ff1b567c37ad9a33c0c7ca1925776615ec89b5a72563f29a8cc8514cf316",
"extpackRev": "110228",
"guest": "e385b698338003595f6cdeee7b631ec6713058ba1227d1f2a1da342bdf741982",
"main": "b9a14a7771059c55c44b97f8d4eef9bea84544f3e215e0caa563bc35e2f16aaf",
"version": "5.1.4"
}