diff --git a/pkgs/development/perl-modules/net-amazon-ec2-ipv6.patch b/pkgs/development/perl-modules/net-amazon-ec2-ipv6.patch
new file mode 100644
index 000000000000..453d8f7d29e9
--- /dev/null
+++ b/pkgs/development/perl-modules/net-amazon-ec2-ipv6.patch
@@ -0,0 +1,60 @@
+Support OpenStack's DescribeInstancesV6 API call.
+
+diff -ru -x '*~' Net-Amazon-EC2-0.14-orig2//lib/Net/Amazon/EC2/RunningInstances.pm Net-Amazon-EC2-0.14//lib/Net/Amazon/EC2/RunningInstances.pm
+--- Net-Amazon-EC2-0.14-orig2//lib/Net/Amazon/EC2/RunningInstances.pm 2010-01-24 02:12:50.000000000 +0100
++++ Net-Amazon-EC2-0.14//lib/Net/Amazon/EC2/RunningInstances.pm 2011-06-21 17:19:36.000000000 +0200
+@@ -25,6 +25,10 @@
+ This element remains empty until the instance enters a
+ running state.
+
++=item dns_name_v6 (optional)
++
++The public IPv6 address of the instance.
++
+ =item image_id (required)
+
+ The image id of the AMI currently running in this instance.
+@@ -126,6 +130,7 @@
+
+ has 'ami_launch_index' => ( is => 'ro', isa => 'Str', required => 0 );
+ has 'dns_name' => ( is => 'ro', isa => 'Maybe[Str]', required => 0 );
++has 'dns_name_v6' => ( is => 'ro', isa => 'Maybe[Str]', required => 0 );
+ has 'image_id' => ( is => 'ro', isa => 'Str', required => 1 );
+ has 'kernel_id' => ( is => 'ro', isa => 'Maybe[Str]', required => 1 );
+ has 'ramdisk_id' => ( is => 'ro', isa => 'Maybe[Str]', required => 1 );
+diff -ru -x '*~' Net-Amazon-EC2-0.14-orig2//lib/Net/Amazon/EC2.pm Net-Amazon-EC2-0.14//lib/Net/Amazon/EC2.pm
+--- Net-Amazon-EC2-0.14-orig2//lib/Net/Amazon/EC2.pm 2011-06-16 16:11:53.000000000 +0200
++++ Net-Amazon-EC2-0.14//lib/Net/Amazon/EC2.pm 2011-10-20 20:13:12.585277245 +0200
+@@ -1542,6 +1542,7 @@
+ my $self = shift;
+ my %args = validate( @_, {
+ InstanceId => { type => SCALAR | ARRAYREF, optional => 1 },
++ Action => { default => "DescribeInstances" },
+ });
+
+ # If we have a array ref of instances lets split them out into their InstanceId.n format
+@@ -1556,7 +1557,8 @@
+ $args{"InstanceId.1"} = delete $args{InstanceId};
+ }
+
+- my $xml = $self->_sign(Action => 'DescribeInstances', %args);
++ my $xml = $self->_sign(Action => $args{Action}, %args);
++ delete $args{Action};
+ my $reservations;
+
+ if ( grep { defined && length } $xml->{Errors} ) {
+@@ -1635,6 +1637,7 @@
+ my $running_instance = Net::Amazon::EC2::RunningInstances->new(
+ ami_launch_index => $instance_elem->{amiLaunchIndex},
+ dns_name => $instance_elem->{dnsName},
++ dns_name_v6 => $instance_elem->{dnsNameV6},
+ image_id => $instance_elem->{imageId},
+ kernel_id => $instance_elem->{kernelId},
+ ramdisk_id => $instance_elem->{ramdiskId},
+@@ -3866,4 +3869,4 @@
+
+ =head1 SEE ALSO
+
+-Amazon EC2 API: L
+\ No newline at end of file
++Amazon EC2 API: L
diff --git a/pkgs/development/perl-modules/net-amazon-ec2-nova-compat.patch b/pkgs/development/perl-modules/net-amazon-ec2-nova-compat.patch
index c08b3579fc3b..5d9aef7f70d4 100644
--- a/pkgs/development/perl-modules/net-amazon-ec2-nova-compat.patch
+++ b/pkgs/development/perl-modules/net-amazon-ec2-nova-compat.patch
@@ -1,6 +1,6 @@
diff -ru -x '*~' Net-Amazon-EC2-0.14-orig/lib/Net/Amazon/EC2.pm Net-Amazon-EC2-0.14/lib/Net/Amazon/EC2.pm
--- Net-Amazon-EC2-0.14-orig/lib/Net/Amazon/EC2.pm 2010-02-02 02:26:58.000000000 +0100
-+++ Net-Amazon-EC2-0.14/lib/Net/Amazon/EC2.pm 2011-06-16 14:18:19.874176129 +0200
++++ Net-Amazon-EC2-0.14/lib/Net/Amazon/EC2.pm 2011-06-16 16:11:53.861341300 +0200
@@ -1552,6 +1552,8 @@
$args{"InstanceId." . $count} = $instance_id;
$count++;
@@ -10,3 +10,12 @@ diff -ru -x '*~' Net-Amazon-EC2-0.14-orig/lib/Net/Amazon/EC2.pm Net-Amazon-EC2-0
}
my $xml = $self->_sign(Action => 'DescribeInstances', %args);
+@@ -3739,6 +3741,8 @@
+ $args{"InstanceId." . $count} = $instance_id;
+ $count++;
+ }
++ } else {
++ $args{"InstanceId.1"} = delete $args{InstanceId};
+ }
+
+ my $xml = $self->_sign(Action => 'TerminateInstances', %args);
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 32b804a2b19c..74160ca3f237 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -2411,6 +2411,8 @@ rec {
# "InstanceId", as required by the Amazon spec. EC2 tolerates
# "InstanceId", but Nova doesn't.
../development/perl-modules/net-amazon-ec2-nova-compat.patch
+ # Support DescribeInstancesV6.
+ ../development/perl-modules/net-amazon-ec2-ipv6.patch
];
propagatedBuildInputs =
[ DigestHMAC LWP LWPProtocolHttps Moose URI ParamsValidate XMLSimple ];