From 32457773474ef660486bf6cd61063932cfdc26f9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 May 2009 21:32:01 +0000 Subject: Viking: Make tests happier. svn path=/nixpkgs/trunk/; revision=15805 --- pkgs/applications/misc/viking/default.nix | 7 +++++-- pkgs/applications/misc/viking/test-bc.patch | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/misc/viking/test-bc.patch (limited to 'pkgs/applications/misc/viking') diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix index 9b9387f6053d..eabd4a020f61 100644 --- a/pkgs/applications/misc/viking/default.nix +++ b/pkgs/applications/misc/viking/default.nix @@ -1,4 +1,5 @@ -{ fetchurl, stdenv, pkgconfig, intltool, gettext, gtk, expat, curl }: +{ fetchurl, stdenv, pkgconfig, intltool, gettext, gtk, expat, curl +, bc, file }: stdenv.mkDerivation rec { name = "viking-0.9.8"; @@ -8,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1is8g6ld5pd13iiv9qm8526q1cblg01pqyakg52sd6k7fys7dz2d"; }; - buildInputs = [ pkgconfig intltool gettext gtk expat curl ]; + patches = [ ./test-bc.patch ]; + + buildInputs = [ pkgconfig intltool gettext gtk expat curl bc file ]; # XXX: Remove this once we have `gpsd' (http://gpsd.berlios.de/). configureFlags = "--disable-realtime-gps-tracking"; diff --git a/pkgs/applications/misc/viking/test-bc.patch b/pkgs/applications/misc/viking/test-bc.patch new file mode 100644 index 000000000000..fc0c91eec522 --- /dev/null +++ b/pkgs/applications/misc/viking/test-bc.patch @@ -0,0 +1,22 @@ +For some reason, `bc -l' yields no output. + +--- viking-0.9.8/test/check_degrees_conversions.sh 2008-03-15 23:01:48.000000000 +0100 ++++ viking-0.9.8/test/check_degrees_conversions.sh 2009-05-30 23:23:27.000000000 +0200 +@@ -7,7 +7,7 @@ function check_success() + for value in "$@" + do + result=`./degrees_converter "$value" | cut -d' ' -f3` +- diff=`echo "$result - $expected" | bc -l` ++ diff=`echo "$result - $expected" | bc` + if [ $diff != 0 ] + then + echo "$value -> $result != $expected" +@@ -23,7 +23,7 @@ function check_failure() + for value in "$@" + do + result=`./degrees_converter "$value" | cut -d' ' -f3` +- diff=`echo "$result - $expected" | bc -l` ++ diff=`echo "$result - $expected" | bc` + if [ $diff = 0 ] + then + echo "$value -> $result = $expected" -- cgit 1.4.1