From 5d03506df77885e1ac4a18236723d37663cf8709 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 27 Dec 2015 06:36:30 +0100 Subject: [PATCH] dvdisaster: run tests & build in parallel It seems like a good idea to test back-up software... --- pkgs/tools/cd-dvd/dvdisaster/default.nix | 28 ++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix index 7d17b8b3282f..a98ce2088bd0 100644 --- a/pkgs/tools/cd-dvd/dvdisaster/default.nix +++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix @@ -33,10 +33,30 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optional (builtins.elem stdenv.system stdenv.lib.platforms.x86_64) "--with-sse2=yes"; - buildInputs = [ - pkgconfig which gettext intltool - glib gtk2 - ]; + enableParallelBuilding = true; + + doCheck = true; + checkPhase = '' + pushd regtest + + mkdir -p "$TMP"/{log,regtest} + substituteInPlace common.bash \ + --replace /dev/shm "$TMP/log" \ + --replace /var/tmp "$TMP" + + for test in *.bash; do + case "$test" in + common.bash) + echo "Skipping $test" + continue ;; + *) + echo "Running $test" + ./"$test" + esac + done + + popd + ''; postInstall = '' mkdir -pv $out/share/applications