Merge pull request #44825 from oxij/docheck/continues-in-a-big-way

treewide: enable working, fix fixable, disable broken tests
This commit is contained in:
Michael Raskin 2018-08-11 16:34:22 +00:00 committed by GitHub
commit a68e5e918e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
127 changed files with 596 additions and 221 deletions

View File

@ -23,7 +23,7 @@
# rt2rtng
, python2
# Testing
, gmock
, gtest
# Fixup
, wrapGAppsHook
, makeWrapper
@ -58,11 +58,10 @@ stdenv.mkDerivation rec {
libxdg_basedir
lsb-release
wxGTK
] ++ stdenv.lib.optional doCheck gmock
++ gstInputs
] ++ gstInputs
++ pythonInputs;
prePatch = ''
postPatch = ''
for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
substituteInPlace $x --replace /usr $out
done
@ -74,14 +73,16 @@ stdenv.mkDerivation rec {
--replace radiotray-ng-notification radiotray-ng-on
'';
cmakeFlags = stdenv.lib.optional doCheck "-DBUILD_TESTS=ON";
cmakeFlags = [
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
];
enableParallelBuilding = true;
# XXX: as of 0.2.2, tries to download gmock instead of checking for provided
doCheck = false;
checkInputs = [ gtest ];
checkPhase = "ctest";
# doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
doCheck = false; # fails to pick up supplied gtest, tries to download it instead
preFixup = ''
gappsWrapperArgs+=(--suffix PATH : ${stdenv.lib.makeBinPath [ dbus ]})

View File

@ -15,8 +15,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "man" "doc" ];
nativeBuildInputs = [ makeWrapper xorg.libXt ]
++ optionals doCheck [ perlPackages.TestCommand perlPackages.TestHarness ];
nativeBuildInputs = [ makeWrapper xorg.libXt ];
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
@ -36,8 +35,9 @@ stdenv.mkDerivation rec {
install -D -m 644 man/*.1 $out/share/man/man1
'';
checkPhase = ''
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
checkInputs = [ perlPackages.TestCommand perlPackages.TestHarness ];
preCheck = ''
export PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl"
'';
doCheck = true;

View File

@ -43,7 +43,7 @@ python3Packages.buildPythonApplication rec {
# give image previews out of the box when building with w3m
substituteInPlace ranger/config/rc.conf \
--replace "set preview_images false" "set preview_images true" \
--replace "set preview_images false" "set preview_images true"
'';
meta = with stdenv.lib; {

View File

@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
owner = "flok99";
};
buildInputs = [ libmrss ]
++ stdenv.lib.optional doCheck cppcheck;
buildInputs = [ libmrss ];
checkInputs = [ cppcheck ];
postPatch = ''
substituteInPlace Makefile --replace -liconv_hook ""

View File

@ -22,15 +22,16 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [
check cmake pkgconfig
cmake pkgconfig
];
cmakeFlags = [
"-DENABLE_AUTOUPDATE=OFF"
] ++ lib.optional (doCheck) "-DENABLE_TESTS=ON";
doCheck = stdenv.isLinux;
"-DENABLE_TESTS=${if doCheck then "ON" else "OFF"}"
];
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
checkInputs = [ check ];
checkPhase = ''
runHook preCheck
ctest -VV

View File

@ -21,10 +21,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ tcl ];
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
checkTarget = "test";
preCheck = stdenv.lib.optional doCheck ''
preCheck = ''
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
'';
configureFlags = stdenv.lib.optional withJson "--json";

View File

@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "15i9bs2i25l7ibv530ghy8280kklcgm5kr6j86s7iwcqqckd0czp";
};
postPatch = ''
patchShebangs .
'';
buildInputs = [ perl ];
makeFlags = "PREFIX=$(out)";

View File

@ -91,6 +91,7 @@ let
enableParallelBuilding = true;
checkInputs = [ python ];
doCheck = false; # fails 10 out of ~2300 tests
meta = with stdenv.lib; {

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, intltool, gnupg, p11-kit, glib
, libgcrypt, libtasn1, dbus-glib, gtk, pango, gdk_pixbuf, atk
, gobjectIntrospection, makeWrapper, libxslt, vala, gnome3 }:
, gobjectIntrospection, makeWrapper, libxslt, vala, gnome3
, python2 }:
stdenv.mkDerivation rec {
name = "gcr-${version}";
@ -15,6 +16,10 @@ stdenv.mkDerivation rec {
updateScript = gnome3.updateScript { packageName = "gcr"; attrPath = "gnome3.gcr"; };
};
postPatch = ''
patchShebangs .
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection libxslt makeWrapper vala ];
@ -27,7 +32,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib gtk p11-kit ];
#doCheck = true;
checkInputs = [ python2 ];
doCheck = false; # fails 21 out of 603 tests, needs dbus daemon
#enableParallelBuilding = true; issues on hydra

View File

@ -22,14 +22,11 @@ stdenv.mkDerivation rec {
pango gcr gdk_pixbuf atk p11-kit
];
# In 3.20.1, tests do not support Python 3
checkInputs = [ dbus python2 ];
propagatedBuildInputs = [ glib libtasn1 libxslt ];
nativeBuildInputs = [
pkgconfig intltool docbook_xsl docbook_xml_dtd_42 wrapGAppsHook
] ++ stdenv.lib.optionals doCheck checkInputs;
];
configureFlags = [
"--with-pkcs11-config=$$out/etc/pkcs11/" # installation directories
@ -41,6 +38,9 @@ stdenv.mkDerivation rec {
'';
doCheck = true;
# In 3.20.1, tests do not support Python 3
checkInputs = [ dbus python2 ];
checkPhase = ''
export HOME=$(mktemp -d)
dbus-run-session \

View File

@ -10,10 +10,10 @@ stdenv.mkDerivation rec {
buildFlags = "build";
enableParallelBuilding = true;
nativeBuildInputs = stdenv.lib.optional doCheck python;
doCheck = true;
checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368
checkInputs = [ python ];
checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368
installPhase = ''
mkdir -p $out/opt $out/bin

View File

@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
fi
'';
doCheck = false; # fails 3 out of 3 tests (ctest)
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, automake, graphviz
, glib, libiconv, libintl, libtool, expat
}:
@ -7,13 +7,18 @@ let
let
atLeast = lib.versionAtLeast "${major}.${minor}";
in stdenv.mkDerivation rec {
name = "vala-${major}.${minor}";
name = "vala-${version}";
version = "${major}.${minor}";
src = fetchurl {
url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
inherit sha256;
};
postPatch = ''
patchShebangs tests
'';
outputs = [ "out" "devdoc" ];
nativeBuildInputs = [
@ -26,6 +31,8 @@ let
] ++ lib.optional (atLeast "0.38") graphviz
++ extraBuildInputs;
doCheck = false; # fails, requires dbus daemon
meta = with stdenv.lib; {
description = "Compiler for GObject type system";
homepage = https://wiki.gnome.org/Projects/Vala;

View File

@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ guile cairo expat ]
++ stdenv.lib.optional doCheck guile-lib;
buildInputs = [ guile cairo expat ];
checkInputs = [ guile-lib ];
doCheck = true;

View File

@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
patches = stdenv.lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ];
# This test needs the net
postPatch = ''
rm test/testsock.*
'';
outputs = [ "out" "dev" ];
outputBin = "dev";

View File

@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
$out/lib/libclucene-core.1.dylib
'';
doCheck = false; # fails with "Unable to find executable: /build/clucene-core-2.3.3.4/build/bin/cl_test"
meta = {
description = "Core library for full-featured text search engine";
longDescription = ''

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, lib, precision ? "double" }:
{ fetchurl, stdenv, lib, precision ? "double", perl }:
with lib;
@ -38,6 +38,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
checkInputs = [ perl ];
meta = with stdenv.lib; {
description = "Fastest Fourier Transform in the West library";
homepage = http://www.fftw.org/;

View File

@ -35,6 +35,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = false; # fails 2 tests
meta = with stdenv.lib; {
homepage = https://libgd.github.io/;
description = "A dynamic image creation library";

View File

@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib libsigcxx ];
enableParallelBuilding = true;
#doCheck = true; # some tests need network
doCheck = false; # fails. one test needs the net, another /etc/fstab
meta = with stdenv.lib; {
description = "C++ interface to the GLib library";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
{ stdenv, fetchFromGitHub, autoreconfHook, perl }:
stdenv.mkDerivation rec {
name = "glog-${version}";
@ -13,6 +13,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
meta = with stdenv.lib; {
homepage = https://github.com/google/glog;
license = licenses.bsd3;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, zlib, libgpgerror, gobjectIntrospection }:
{ stdenv, fetchurl, pkgconfig, glib, zlib, gnupg, libgpgerror, gobjectIntrospection }:
stdenv.mkDerivation rec {
version = "2.6.23";
@ -15,6 +15,17 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib zlib libgpgerror ];
configureFlags = [ "--enable-introspection=yes" ];
postPatch = ''
substituteInPlace tests/testsuite.c \
--replace /bin/rm rm \
--replace /bin/mkdir mkdir
substituteInPlace tests/test-pkcs7.c \
--replace /bin/mkdir mkdir
'';
checkInputs = [ gnupg ];
enableParallelBuilding = true;
meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, zlib, gpgme, libidn, gobjectIntrospection }:
{ stdenv, fetchurl, pkgconfig, glib, zlib, gnupg, gpgme, libidn, gobjectIntrospection }:
stdenv.mkDerivation rec {
version = "3.2.0";
@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib ];
configureFlags = [ "--enable-introspection=yes" ];
postPatch = ''
substituteInPlace tests/testsuite.c \
--replace /bin/rm rm
'';
checkInputs = [ gnupg ];
enableParallelBuilding = true;
meta = with stdenv.lib; {

View File

@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
# https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html
++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
checkInputs = [ which ];
doCheck = false; # fails 8 out of 26 tests with "GPGME: Decryption failed". Spooky!
meta = with stdenv.lib; {
homepage = https://gnupg.org/software/gpgme/index.html;
description = "Library for making GnuPG easier to use";

View File

@ -57,6 +57,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = false; # fails, wants DRI access for OpenGL
patches = [
(fetchpatch {
url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370414";

View File

@ -54,4 +54,7 @@ stdenv.mkDerivation rec {
++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ];
# fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
doCheck = false;
}

View File

@ -36,6 +36,9 @@ stdenv.mkDerivation rec {
--replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
'';
# fails 1 out of 65 tests with "Could not read TLS certificate from '../../tests/files/test-cert.pem': TLS support is not available"
doCheck = false;
meta = {
homepage = https://gstreamer.freedesktop.org;

View File

@ -17,23 +17,22 @@ stdenv.mkDerivation rec {
buildInputs = [ perl bison flex ];
propagatedBuildInputs = [ glib libxml2 ];
patchPhase = ''
# See https://trac.macports.org/ticket/40783 for explanation of patch
patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
postPatch = ''
sed -i -e 's/^ /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in
''
+ stdenv.lib.optionalString stdenv.isDarwin ''
# Applying this patch manually to avoid a rebuild on Linux. Feel free to refactor later
# See https://trac.macports.org/ticket/40783 for explanation of patch
patch -p1 < ${./darwin.patch}
'';
configureFlags = [
"--disable-examples"
"--enable-failing-tests"
"--localstatedir=/var"
"--disable-gtk-doc"
"--disable-docbook"
];
doCheck = false; # fails. 2 tests crash
postInstall = ''
# Hm, apparently --disable-gtk-doc is ignored...
rm -rf $out/share/gtk-doc

View File

@ -2,6 +2,7 @@
, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
, withGraphite2 ? true # it is small and major distros do include it
, python
}:
let
@ -17,6 +18,11 @@ stdenv.mkDerivation {
sha256 = "0my6m9aqv4a8fc2pjwqx9pfdfh3a9mqvas4si4psi1b1867zi8y8";
};
postPatch = ''
patchShebangs src/gen-def.py
patchShebangs test
'';
outputs = [ "out" "dev" ];
outputBin = "dev";
@ -29,8 +35,10 @@ stdenv.mkDerivation {
buildInputs = [ glib freetype cairo ]; # recommended by upstream
propagatedBuildInputs = []
++ optional withGraphite2 graphite2
++ optionals withIcu [ icu harfbuzz ]
;
++ optionals withIcu [ icu harfbuzz ];
checkInputs = [ python ];
doInstallCheck = false; # fails, probably a bug
# Slightly hacky; some pkgs expect them in a single directory.
postInstall = optionalString withIcu ''

View File

@ -14,6 +14,10 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses readline ];
nativeBuildInputs = [ autoreconfHook ];
postPatch = ''
patchShebangs tests
'';
autoreconfFlags = "-vfi";
configureFlags = [ "--with-ui" "--with-readline" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, python }:
stdenv.mkDerivation rec {
name = "jbig2dec-0.14";
@ -8,6 +8,13 @@ stdenv.mkDerivation rec {
sha256 = "0k01hp0q4275fj4rbr1gy64svfraw5w7wvwl08yjhvsnpb1rid11";
};
postPatch = ''
patchShebangs test_jbig2dec.py
'';
checkInputs = [ python ];
doCheck = false; # fails 1 of 4 tests
meta = {
homepage = https://www.ghostscript.com/jbig2dec.html;
description = "Decoder implementation of the JBIG2 image compression format";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, openssl, perl, dns-root-data }:
{ stdenv, fetchurl, fetchpatch, openssl, perl, which, dns-root-data }:
stdenv.mkDerivation rec {
pname = "ldns";
@ -45,6 +45,9 @@ stdenv.mkDerivation rec {
"ac_cv_func_realloc_0_nonnull=yes"
];
checkInputs = [ which ];
doCheck = false; # fails. missing some files
postInstall = ''
moveToOutput "bin/ldns-config" "$dev"

View File

@ -61,6 +61,8 @@ in stdenv.mkDerivation rec {
--replace /usr/bin/file ${file}/bin/file
'';
doCheck = false; # generates shebangs in check phase, too lazy to fix
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"

View File

@ -8,12 +8,15 @@ stdenv.mkDerivation rec {
sha256 = "0jr8ppdm80c533nzmrpz3iffnpc6nhvsria1di9f4jg1l19a03fd";
};
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libcddb ncurses help2man ]
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ];
# Disabled due to several spurious test failures.
# doCheck = true;
doCheck = true;
meta = with stdenv.lib; {
description = "A library for OS-independent CD-ROM and CD image access";

View File

@ -46,6 +46,8 @@ stdenv.mkDerivation rec {
"--disable-scrollkeeper"
] ++ optional (gtkVersion != "2") "--disable-dumper";
doCheck = false; # generates shebangs in check phase, too lazy to fix
installFlags = [
"sysconfdir=\${out}/etc"
"localstatedir=\${TMPDIR}"

View File

@ -42,6 +42,13 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postPatch = ''
for a in test/Makefile.in test/format_test/format_checks.sh.in ; do
substituteInPlace $a \
--replace /bin/bash ${stdenv.shell}
done
'';
meta = with stdenv.lib; {
homepage = http://openil.sourceforge.net/;
description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";

View File

@ -16,6 +16,12 @@ stdenv.mkDerivation rec {
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
postPatch = ''
for a in */*-symbol-check ; do
patchShebangs $a
done
'';
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, bash, perl }:
stdenv.mkDerivation rec {
name = "libfaketime-${version}";
@ -13,10 +13,20 @@ stdenv.mkDerivation rec {
./no-date-in-gzip-man-page.patch
];
postPatch = ''
patchShebangs test src
for a in test/functests/test_exclude_mono.sh src/faketime.c ; do
substituteInPlace $a \
--replace /bin/bash ${stdenv.shell}
done
'';
preBuild = ''
makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib)
'';
checkInputs = [ perl ];
meta = with stdenv.lib; {
description = "Report faked system time to programs without having to change the system-wide time";
homepage = "https://github.com/wolfcw/libfaketime/";

View File

@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig intltool libintl ];
buildInputs = [ gettext bzip2 zlib python ]
++ stdenv.lib.optional doCheck perl;
buildInputs = [ gettext bzip2 zlib python ];
checkInputs = [ perl ];
propagatedBuildInputs = [ libxml2 glib gdk_pixbuf libiconv ];

View File

@ -14,21 +14,26 @@ stdenv.mkDerivation rec {
sha256 = "0mn4n3ihzcr1jw2g1vy6c8p4lkc88jwljk04argmj7k4djrgpxpa";
};
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib netcdf nifticlib hdf5 ];
cmakeFlags = [ "-DBUILD_TESTING=${if doCheck then "TRUE" else "FALSE"}"
"-DLIBMINC_MINC1_SUPPORT=TRUE"
"-DLIBMINC_BUILD_SHARED_LIBS=TRUE"
"-DLIBMINC_USE_SYSTEM_NIFTI=TRUE" ];
cmakeFlags = [
"-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
"-DLIBMINC_MINC1_SUPPORT=ON"
"-DLIBMINC_BUILD_SHARED_LIBS=ON"
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
];
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkPhase = ''
export LD_LIBRARY_PATH="$(pwd)" # see #22060
ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure
# ezminc_rw_test can't find libminc_io.so.5.2.0; minc_conversion hits netcdf compilation issue
'';
doCheck = true;
enableParallelBuilding = true;

View File

@ -31,6 +31,10 @@ in stdenv.mkDerivation rec {
})
];
postPatch = ''
patchShebangs test
'';
preAutoreconf = ''
substituteInPlace configure.ac --replace "which" "${which}/bin/which"
substituteInPlace git-version --replace /bin/bash ${stdenv.shell}

View File

@ -14,9 +14,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
pkgconfig vala intltool gobjectIntrospection gtk-doc docbook_xsl
] ++ stdenv.lib.optionals doCheck checkInputs;
checkInputs = [ check curl perl ];
];
buildInputs = [ glib libsoup libxml2 libxslt ];
checkInputs = [ check curl perl ];
patches = [
./osinfo-db-data-dir.patch

View File

@ -3,9 +3,7 @@
assert zlib != null;
let
version = "1.6.34";
patchVersion = "1.6.34";
sha256 = "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig";
patch_src = fetchurl {
url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
sha256 = "1ha4npf9mfrzp0srg8a5amks5ww84xzfpjbsj8k3yjjpai798qg6";
@ -14,10 +12,11 @@ let
in stdenv.mkDerivation rec {
name = "libpng" + whenPatched "-apng" + "-${version}";
version = "1.6.34";
src = fetchurl {
url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz";
inherit sha256;
sha256 = "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig";
};
postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1";
@ -26,9 +25,7 @@ in stdenv.mkDerivation rec {
propagatedBuildInputs = [ zlib ];
# it's hard to cross-run tests and some check programs didn't compile anyway
makeFlags = stdenv.lib.optional (!doCheck) "check_PROGRAMS=";
doCheck = true; # not cross;
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
passthru = { inherit zlib; };

View File

@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
# Fix broken DT_NEEDED in lib/redland/librdf_storage_sqlite.so.
NIX_CFLAGS_LINK = "-lraptor2";
doCheck = false; # fails 1 out of 17 tests with a segmentation fault
meta = {
homepage = http://librdf.org/;
platforms = stdenv.lib.platforms.unix;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, getopt, makeWrapper }:
{ stdenv, fetchurl, getopt, makeWrapper, utillinux }:
stdenv.mkDerivation rec {
name = "libseccomp-${version}";
@ -17,6 +17,9 @@ stdenv.mkDerivation rec {
patchShebangs .
'';
checkInputs = [ utillinux ];
doCheck = false; # dependency cycle
# Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference.
preFixup = "rm -rfv src";

View File

@ -1,10 +1,9 @@
{ stdenv, fetchurl, glib, pkgconfig, intltool, libxslt, docbook_xsl
, libgcrypt, gobjectIntrospection, vala_0_38, gnome3, libintl }:
let
stdenv.mkDerivation rec {
pname = "libsecret";
version = "0.18.5";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
@ -12,6 +11,10 @@ stdenv.mkDerivation rec {
sha256 = "1cychxc3ff8fp857iikw0n2s13s2mhw2dn1mr632f7w3sn6vvrww";
};
postPatch = ''
patchShebangs .
'';
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ glib ];
@ -19,6 +22,10 @@ stdenv.mkDerivation rec {
buildInputs = [ libgcrypt gobjectIntrospection vala_0_38 ];
# optional: build docs with gtk-doc? (probably needs a flag as well)
# checkInputs = [ python2 ];
doCheck = false; # fails. with python3 tests fail to evaluate, with python2 they fail to run python3
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;

View File

@ -3,22 +3,19 @@
, valaSupport ? true, vala_0_40
, intltool, python3 }:
let
pname = "libsoup";
version = "2.62.2";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "libsoup";
version = "2.62.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
sha256 = "1dkrz1iwsswscayfmjxqv2q00b87snlq9nxdccn5vck0vbinylwy";
};
prePatch = ''
postPatch = ''
patchShebangs libsoup/
'' + stdenv.lib.optionalString valaSupport
''
'' + stdenv.lib.optionalString valaSupport ''
substituteInPlace libsoup/Makefile.in --replace "\$(DESTDIR)\$(vapidir)" "\$(DESTDIR)\$(girdir)/../vala/vapi"
'';

View File

@ -30,8 +30,6 @@ let
enableParallelBuilding = true;
doCheck = false; # hangs, tries to access the net?
# for some reason the tests are not running - it says "No tests found!!"
checkInputs = [ check ];
checkPhase = "ctest";

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "01pbg67qy5hcssy2yi0ckqapzfclgdq93li2rmzw4pa3wh5j42cw";
};
nativeBuildInputs = stdenv.lib.optional doCheck perl;
checkInputs = [ perl ];
preCheck = "patchShebangs tests/unit";
doCheck = true;

View File

@ -9,13 +9,19 @@ stdenv.mkDerivation rec {
sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
};
postPatch = ''
patchShebangs test-driver
patchShebangs man/handle_links
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ perl ];
propagatedBuildInputs = [ zlib ];
preInstall = ''
patchShebangs man/handle_links
preCheck = ''
# regress/runtests is a generated file
patchShebangs regress
'';
# At least mysqlWorkbench cannot find zipconf.h; I think also openoffice

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0sbs2lm8b9in2m8d52zf0x9gpp40x6r7sl6sha92yq3pr78rwa4v";
};
buildInputs = stdenv.lib.optional doCheck libopcodes;
checkInputs = [ libopcodes ];
doCheck = true;

View File

@ -16,6 +16,15 @@ in stdenv.mkDerivation rec {
sha256 = "0hi61cdihwwvz5jz1l7yq712j7ca1cj4bhr8x0x7c2vlb1s9biw9";
};
postPatch = ''
patchShebangs .
# this test requires the net
for a in ncdap_test/Makefile.am ncdap_test/Makefile.in; do
substituteInPlace $a --replace testurl.sh " "
done
'';
nativeBuildInputs = [ m4 ];
buildInputs = [ hdf5 curl mpi ];

View File

@ -15,9 +15,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkTarget = "test";
enableParallelBuilding = true;
cmakeFlags = [
@ -26,6 +23,8 @@ stdenv.mkDerivation rec {
"-DCMAKE_SYSTEM_NAME=Windows"
];
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
meta = with stdenv.lib; {
description = "Header only C++ library for the JSON file format";
homepage = https://github.com/nlohmann/json;

View File

@ -55,6 +55,11 @@ in stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-error";
# TODO(@oxij): investigate this: `make -n check` works but `make
# check` fails with "no rule", same for "installcheck".
doCheck = false;
doInstallCheck = false;
postInstall = ''
rm -rf $out/private
mv $out/public $out/include

View File

@ -24,11 +24,19 @@ let
++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
./darwin-arch.patch;
postPatch = if (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isMusl) then ''
substituteInPlace crypto/async/arch/async_posix.h \
--replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
'!defined(__ANDROID__) && !defined(__OpenBSD__) && 0'
'' else null;
postPatch = ''
patchShebangs Configure
'' + optionalString (versionOlder version "1.1.0") ''
patchShebangs test/*
for a in test/t* ; do
substituteInPlace "$a" \
--replace /bin/rm rm
done
'' + optionalString (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isMusl) ''
substituteInPlace crypto/async/arch/async_posix.h \
--replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
'!defined(__ANDROID__) && !defined(__OpenBSD__) && 0'
'';
outputs = [ "bin" "dev" "out" "man" ];
setOutputFlags = false;
@ -38,6 +46,7 @@ let
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
# TODO(@Ericson2314): Improve with mass rebuild
configurePlatforms = [];
configureScript = {
"x86_64-darwin" = "./Configure darwin64-x86_64-cc";
"x86_64-solaris" = "./Configure solaris64-x86_64-gcc";
@ -56,13 +65,6 @@ let
throw "Not sure what configuration to use for ${hostPlatform.config}"
);
# TODO(@Ericson2314): Make unconditional on mass rebuild
${if buildPlatform != hostPlatform then "configurePlatforms" else null} = [];
preConfigure = ''
patchShebangs Configure
'';
configureFlags = [
"shared" # "shared" builds both shared and static libraries
"--libdir=lib"

View File

@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
configureFlags = optional stdenv.isDarwin "--without-x";
doCheck = false; # fails 1 out of 12 tests with "Fontconfig error: Cannot load default config file"
meta = with stdenv.lib; {
description = "A library for laying out and rendering of text, with an emphasis on internationalization";

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
doCheck = false; # fails 1 out of 3 tests, looks like a bug
postFixup = ''
moveToOutput bin/pcre2-config "$dev"
'';

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ]
++ stdenv.lib.optionals stdenv.cc.isClang [ autoconf automake libtool autoreconfHook ];
buildInputs = stdenv.lib.optional doCheck libpng;
buildInputs = [ libpng ];
configureFlags = stdenv.lib.optional stdenv.isAarch32 "--disable-arm-iwmmxt";

View File

@ -17,6 +17,9 @@ let
url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-${name}.tar.gz";
sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
};
postPatch = ''
patchShebangs tests
'';
buildInputs = [ perl ];
};
in
@ -60,6 +63,8 @@ qtModule {
]
++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
doCheck = false; # fails 13 out of 13 tests (ctest)
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';

View File

@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ];
checkPhase = "ctest";
doCheck = false; # fails 7 out of 293 tests
meta = with stdenv.lib; {
homepage = https://sourceforge.net/projects/niftilib;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, freetype, cmake }:
{ stdenv, fetchurl, pkgconfig, freetype, cmake, python }:
stdenv.mkDerivation rec {
version = "1.3.6";
@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
patches = stdenv.lib.optionals stdenv.isDarwin [ ./macosx.patch ];
checkInputs = [ python ];
doCheck = false; # fails, probably missing something
meta = {
description = "An advanced font engine";
maintainers = [ stdenv.lib.maintainers.raskin ];

View File

@ -71,6 +71,8 @@ stdenv.mkDerivation rec {
sed -i $out/lib/libsqlite3.la -e "s/dependency_libs=.*/dependency_libs='''/"
'';
doCheck = false; # fails to link against tcl
meta = {
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
downloadPage = http://sqlite.org/download.html;

View File

@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libsndfile ];
doCheck = false; # fails with "../build-scripts/test-driver: line 107: -Mstrict: command not found"
meta = with stdenv.lib;{
description = "A MP2 encoder";
longDescription = ''

View File

@ -13,9 +13,8 @@ stdenv.mkDerivation rec {
dontBuild = false;
buildInputs = stdenv.lib.optional doCheck perl;
doCheck = true;
checkInputs = [ perl ];
checkTarget = "-C tests/";
installPhase = ''
@ -30,4 +29,3 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
};
}

View File

@ -26,6 +26,9 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
# fails with "./test_watersheds3d: error while loading shared libraries: libvigraimpex.so.11: cannot open shared object file: No such file or directory"
doCheck = false;
meta = with stdenv.lib; {
description = "Novel computer vision C++ library with customizable algorithms and data structures";
homepage = https://hci.iwr.uni-heidelberg.de/vigra;

View File

@ -24,6 +24,8 @@ in stdenv.mkDerivation rec {
"pythondir=$(py)/${python3.sitePackages}"
];
doCheck = false; # fails 1 out of 1 tests, needs `certutil`
meta = with stdenv.lib; {
description = "A library for manipulating storage volume encryption keys and storing them separately from volumes to handle forgotten passphrases, and the associated command-line tool";
homepage = https://pagure.io/volume_key/;

View File

@ -14,7 +14,6 @@ buildPythonPackage rec {
sha256 = "1kp2iyx20lpc9dv4qg5fgwf83a1wx6f7hj1ldqyncg0kn9xcrhbg";
};
# Required for tests only
checkInputs = [ mock ];
checkPhase = "${python.interpreter} -m unittest discover -s tests";

View File

@ -15,12 +15,12 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus dbus-glib ]
++ lib.optionals doCheck [ dbus.out pygobject3 ]
# My guess why it's sometimes trying to -lncurses.
# It seems not to retain the dependency anyway.
++ lib.optional (! python ? modules) ncurses;
doCheck = true;
checkInputs = [ dbus.out pygobject3 ];
meta = {
description = "Python DBus bindings";

View File

@ -5,6 +5,7 @@
, six
, scipy
, smart_open
, scikitlearn, testfixtures, unittest2
}:
buildPythonPackage rec {
@ -15,20 +16,20 @@ buildPythonPackage rec {
sha256 = "78ed9b6ac35f104542f3bee0386d71ddf9432d74c153065d2ea9f6baf10e5b49";
};
propagatedBuildInputs = [ smart_open numpy six scipy
# scikitlearn testfixtures unittest2 # for tests
];
doCheck = false;
propagatedBuildInputs = [ smart_open numpy six scipy ];
checkInputs = [ scikitlearn testfixtures unittest2 ];
# Two tests fail.
#
# ERROR: testAddMorphemesToEmbeddings (gensim.test.test_varembed_wrapper.TestVarembed)
# ImportError: Could not import morfessor.
# This package is not in nix
#
# ERROR: testWmdistance (gensim.test.test_fasttext_wrapper.TestFastText)
# ImportError: Please install pyemd Python package to compute WMD.
# This package is not in nix
doCheck = false;
meta = {
description = "Topic-modelling library";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, autoconf, makeWrapper }:
{ stdenv, fetchurl, perl, autoconf }:
stdenv.mkDerivation rec {
name = "automake-1.11.6";
@ -17,11 +17,12 @@ stdenv.mkDerivation rec {
patches = [ ./fix-test-autoconf-2.69.patch ./fix-perl-5.26.patch ];
buildInputs = [perl autoconf makeWrapper];
buildInputs = [ perl autoconf ];
# Disable indented log output from Make, otherwise "make.test" will
# fail.
preCheck = "unset NIX_INDENT_MAKE";
doCheck = false; # takes _a lot_ of time, fails 11 of 782 tests
# Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
# "fixed" path in generated files!

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, autoconf, doCheck ? false }:
{ stdenv, fetchurl, perl, autoconf }:
stdenv.mkDerivation rec {
name = "automake-1.16.1";
@ -16,7 +16,8 @@ stdenv.mkDerivation rec {
# Disable indented log output from Make, otherwise "make.test" will
# fail.
preCheck = "unset NIX_INDENT_MAKE";
inherit doCheck;
doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths
doInstallCheck = false; # runs the same thing, fails the same tests
# The test suite can run in parallel.
enableParallelBuilding = true;

View File

@ -1,6 +1,6 @@
{ stdenv, buildPackages
, fetchurl, zlib, autoreconfHook264
, hostPlatform, targetPlatform
, hostPlatform, buildPlatform, targetPlatform
, noSysDirs, gold ? true, bison ? null
}:
@ -121,6 +121,9 @@ stdenv.mkDerivation rec {
doCheck = false; # fails
# else fails with "./sanity.sh: line 36: $out/bin/size: not found"
doInstallCheck = buildPlatform == hostPlatform && hostPlatform == targetPlatform;
enableParallelBuilding = true;
passthru = {

View File

@ -10,7 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "1zq0l12k64hrbjmdjc4llrad96c25i427hpma1id9nk87w9qqvdp";
};
patches = ./debug-info-from-env.patch;
patches = [ ./debug-info-from-env.patch ];
postPatch = ''
patchShebangs tests
'';
hardeningDisable = [ "format" ];
@ -63,6 +67,9 @@ stdenv.mkDerivation rec {
cp version.h $out/include
'';
doCheck = false; # fails 3 out of 174 tests
doInstallCheck = false; # fails 70 out of 174 tests
meta = {
homepage = https://sourceware.org/elfutils/;
description = "A set of utilities to handle ELF objects";

View File

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
'';
preBuild = ''
patchShebangs tests
patchShebangs debugger/system_routine/pre_cpp.py
substituteInPlace tools/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'
substituteInPlace tests/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
setupHook = [ ./setup-hook.sh ];
#doCheck = true; # problems when loading libc.so.6
doCheck = false; # fails 8 out of 24 tests, problems when loading libc.so.6
meta = {
homepage = https://nixos.org/patchelf.html;

View File

@ -8,7 +8,12 @@ stdenv.mkDerivation {
sha256 = "0prdld6nbkdlkcgc2r1zp13h2fh8r0mlwxx423dnc695ddlk18b8";
};
makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/share/man";
postPatch = ''
substituteInPlace Makefile \
--replace ginstall install
'';
makeFlags = [ "BINDIR=$(out)/bin" "MANDIR=$(out)/share/man" ];
preInstall = ''
mkdir -p $out/bin
@ -17,6 +22,8 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
doCheck = false; # "check" target is probably meant to do "installcheck" or something
meta = {
description = "Parse formatted man pages and man page source from most flavors of UNIX and converts them to HTML, ASCII, TkMan, DocBook, and other formats";
license = "artistic";

View File

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
configureFlags = stdenv.lib.optional (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV) "--enable-mpers=check";
# fails 1 out of 523 tests with
# "strace-k.test: failed test: ../../strace -e getpid -k ../stack-fcall output mismatch"
doCheck = false;
meta = with stdenv.lib; {
homepage = https://strace.io/;
description = "A system call tracer for Linux";

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
buildInputs = [ xz.bin ]
++ optionals stdenv.isSunOS [ libiconv gawk ]
++ optionals interactive [ ncurses procps ];
++ optional interactive ncurses;
configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ]
++ stdenv.lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk";
@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
installTargets="install install-tex";
'';
checkInputs = [ procps ];
doCheck = interactive
&& !stdenv.isDarwin
&& !stdenv.isSunOS; # flaky

View File

@ -8,8 +8,9 @@ stdenv.mkDerivation rec {
sha256 = "0c9li3iaslzzr3zig6m3zlmb4r8i0wfvkcrvdyiqxasb09mjkqh8";
};
nativeBuildInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl;
nativeBuildInputs = [ m4 ];
propagatedBuildInputs = [ m4 ];
checkInputs = [ perl ];
patches = lib.optional stdenv.isDarwin ./darwin-vasnprintf.patch;

View File

@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm";
};
postPatch = ''
patchShebangs tests
'';
nativeBuildInputs = [ flex bison texinfo help2man autoreconfHook ];
propagatedBuildInputs = [ m4 ];
@ -17,6 +21,8 @@ stdenv.mkDerivation rec {
"ac_cv_func_realloc_0_nonnull=yes"
];
doCheck = false; # fails 2 out of 46 tests
meta = {
branch = "2.5.35";
homepage = http://flex.sourceforge.net/;

View File

@ -8,6 +8,12 @@ stdenv.mkDerivation rec {
sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw";
};
postPatch = ''
patchShebangs tests
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
substituteInPlace Makefile.in --replace "tests" " ";
'';
buildInputs = [ bison ];
propagatedBuildInputs = [ m4 ];
@ -21,11 +27,6 @@ stdenv.mkDerivation rec {
sed -i Makefile -e 's/-no-undefined//;'
'';
# disable tests which can't run on build machine
postPatch = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
substituteInPlace Makefile.in --replace "tests" " ";
'';
meta = {
homepage = https://github.com/westes/flex;
description = "A fast lexical analyser generator";

View File

@ -19,7 +19,10 @@ stdenv.mkDerivation rec {
+ "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f";
})];
postPatch = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
postPatch = ''
patchShebangs tests
'' + stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace Makefile.in --replace "tests" " "
substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: '

View File

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
preCheck = ''
patchShebangs run_tests.sh
'';
meta = with stdenv.lib; {
description = "Tool for writing very fast and very flexible scanners";
homepage = "http://re2c.org";

View File

@ -4,6 +4,7 @@
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix
, gnupg
, darwin ? null
, procps
}:
with stdenv.lib;
@ -66,16 +67,27 @@ in
inherit patches;
preBuild = optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
prePatch = ''
postPatch = ''
patchShebangs .
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
# fix tests
for a in test/parallel/test-child-process-env.js \
test/parallel/test-child-process-exec-env.js \
test/parallel/test-child-process-default-options.js \
test/fixtures/syntax/good_syntax_shebang.js \
test/fixtures/syntax/bad_syntax_shebang.js ; do
substituteInPlace $a \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
'' + optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
checkInputs = [ procps ];
doCheck = false; # fails 4 out of 1453 tests
postInstall = ''
paxmark m $out/bin/node
PATH=$out/bin:$PATH patchShebangs $out

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, removeReferencesTo
, zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin
, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
, coreutils
}:
### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
@ -30,6 +31,11 @@ stdenv.mkDerivation rec {
./cups-clean-dirty.patch
];
postPatch = ''
substituteInPlace cups/testfile.c \
--replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'
'';
nativeBuildInputs = [ pkgconfig removeReferencesTo ];
buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ]

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, foomatic-filters, bc, unzip, ghostscript, systemd, vim }:
{ stdenv, fetchurl, foomatic-filters, bc, unzip, ghostscript, systemd, vim, time }:
stdenv.mkDerivation rec {
name = "foo2zjs-20180519";
@ -39,6 +39,9 @@ stdenv.mkDerivation rec {
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
'';
checkInputs = [ time ];
doCheck = false; # fails to find its own binary. Also says "Tests will pass only if you are using ghostscript-8.71-16.fc14".
preInstall = ''
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}

View File

@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
})
];
postPatch = ''
patchShebangs tests
'';
NIX_LDFLAGS = "-lgcc_s";
configureFlags = [

View File

@ -4,6 +4,7 @@
, fusePackages, utillinux, gettext
, meson, ninja, pkgconfig
, autoreconfHook
, python3Packages, which
}:
let
@ -58,6 +59,14 @@ in stdenv.mkDerivation rec {
./makeconf.sh
'');
checkInputs = [ which ] ++ (with python3Packages; [ python pytest ]);
checkPhase = ''
python3 -m pytest test/
'';
doCheck = false; # v2: no tests, v3: all tests get skipped in a sandbox
postFixup = "cd $out\n" + (if isFuse3 then ''
install -D -m444 etc/fuse.conf $common/etc/fuse.conf
install -D -m444 etc/udev/rules.d/99-fuse3.rules $common/etc/udev/rules.d/99-fuse.rules

View File

@ -14,10 +14,20 @@ stdenv.mkDerivation rec {
sha256 = "1kqpiswjn549s3w3m89bw5qkl7bw5pvq6gp5cdzd926ymlgivj5c";
}) ];
postPatch = ''
patchShebangs harness
# Makefile is too optimistic, gcc is too smart
substituteInPlace harness/Makefile \
--replace "-Werror" ""
'';
makeFlags = "prefix=$(out)";
hardeningDisable = stdenv.lib.optional (stdenv.isi686) "stackprotector";
checkTarget = "partcheck"; # "check" needs root
meta = {
description = "Library for asynchronous I/O in Linux";
homepage = http://lse.sourceforge.net/io/aio.html;

View File

@ -23,6 +23,15 @@ stdenv.mkDerivation rec {
sha256 = "080b0sygmg7104qbbh1amh3b322yyiajwi2d3d0vayffgva0720v";
});
postPatch = ''
patchShebangs test
'';
# You probably shouldn't ever run these! They will reconfigure Linux
# NUMA settings, which on my build machine makes the rest of package
# building ~5% slower until reboot. Ugh!
doCheck = false; # never ever!
meta = with stdenv.lib; {
description = "Library and tools for non-uniform memory access (NUMA) machines";
homepage = http://oss.sgi.com/projects/libnuma/;

View File

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
substituteInPlace ./src/Makefile --replace '-o root -g root -m 4755 ' '-m 755 '
'';
doCheck = false; # fails 1 out of 1 tests with "Error: could not open fstab-type file: No such file or directory"
meta = {
homepage = http://pmount.alioth.debian.org/;
description = "Mount removable devices as normal user";

View File

@ -21,19 +21,23 @@ stdenv.mkDerivation rec {
})
];
postPatch = ''
substituteInPlace Makefile --replace /bin/pwd $(type -P pwd)
substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo)
substituteInPlace utils/ppmtolss16 --replace /usr/bin/perl $(type -P perl)
substituteInPlace gpxe/src/Makefile --replace /usr/bin/perl $(type -P perl)
# fix tests
substituteInPlace tests/unittest/include/unittest/unittest.h \
--replace /usr/include/ ""
'';
nativeBuildInputs = [ nasm perl python ];
buildInputs = [ libuuid makeWrapper ];
enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...'
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
preBuild = ''
substituteInPlace Makefile --replace /bin/pwd $(type -P pwd)
substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo)
substituteInPlace utils/ppmtolss16 --replace /usr/bin/perl $(type -P perl)
substituteInPlace gpxe/src/Makefile --replace /usr/bin/perl $(type -P perl)
'';
stripDebugList = "bin sbin share/syslinux/com32";
makeFlags = [
@ -47,6 +51,8 @@ stdenv.mkDerivation rec {
"bios"
];
doCheck = false; # fails. some fail in a sandbox, others require qemu
postInstall = ''
wrapProgram $out/bin/syslinux \
--prefix PATH : "${mtools}/bin"

View File

@ -22,6 +22,8 @@ in stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" ];
postPatch = ''
patchShebangs tests/run.sh
substituteInPlace include/pathnames.h \
--replace "/bin/login" "${shadow}/bin/login"
substituteInPlace sys-utils/eject.c \
@ -54,6 +56,8 @@ in stdenv.mkDerivation rec {
[ zlib pam ]
++ lib.filter (p: p != null) [ ncurses systemd perl ];
doCheck = false; # "For development purpose only. Don't execute on production system!"
postInstall = ''
rm "$bin/bin/su" # su should be supplied by the su package (shadow)
'' + lib.optionalString minimal ''

View File

@ -30,7 +30,8 @@ stdenv.mkDerivation rec {
CFLAGS = [ "-O2" "-DNDEBUG" ];
#doCheck = true; problems in combination with dynamic linking
doCheck = true;
doInstallCheck = false; # needs pykeymgr?
postInstall = ''rm -r "$out"/var "$out"/lib/*.la'';

View File

@ -27,11 +27,12 @@ unwrapped = stdenv.mkDerivation rec {
# http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
buildInputs = [ knot-dns luajit libuv gnutls nettle lmdb ]
++ optional doCheck cmocka
++ optional stdenv.isLinux systemd # sd_notify
## optional dependencies; TODO: libedit, dnstap
;
checkInputs = [ cmocka ];
makeFlags = [
"PREFIX=$(out)"
"ROOTHINTS=${dns-root-data}/root.hints"
@ -83,4 +84,3 @@ wrapped-full = with luajitPackages; let
'';
in result

View File

@ -3,6 +3,7 @@
, enableMysql ? false, mysql ? null
, enableLdap ? false, openldap ? null
, enableWebDAV ? true, sqlite ? null, libuuid ? null
, perl
}:
assert enableMagnet -> lua5_1 != null;
@ -19,6 +20,10 @@ stdenv.mkDerivation rec {
sha256 = "02ff77cpvy1006cwfym38vf78xm18plyj636ll74r7kx2bblkpxf";
};
postPatch = ''
patchShebangs tests
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]
++ stdenv.lib.optional enableMagnet lua5_1
@ -38,6 +43,9 @@ stdenv.mkDerivation rec {
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
'';
checkInputs = [ perl ];
doCheck = false; # fails 2 tests
postInstall = ''
mkdir -p "$out/share/lighttpd/doc/config"
cp -vr doc/config "$out/share/lighttpd/doc/"

View File

@ -14,9 +14,11 @@ stdenv.mkDerivation rec {
patches =
[ ./disable-dns-lookup-in-chroot.patch ];
buildInputs =
[ libgcrypt libevent libidn gnutls libxml2 zlib guile texinfo ]
++ lib.optional doCheck cppunit;
buildInputs = [
libgcrypt libevent libidn gnutls libxml2 zlib guile texinfo
];
checkInputs = [ cppunit ];
makeFlags = [ "V=1" ];

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doCheck = false; # needs tcl
meta = with stdenv.lib; {
homepage = https://redis.io;
description = "An open source, advanced key-value store";

View File

@ -10,9 +10,9 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig m4 ];
buildInputs = [ libxcb xcbutil ]
++ stdenv.lib.optional doCheck libX11;
doCheck = true;
buildInputs = [ libxcb xcbutil ];
checkInputs = [ libX11 ];
meta = with stdenv.lib; {
description = "XCB utility functions for the X resource manager";

View File

@ -1,5 +1,5 @@
{ stdenv, buildPackages
, fetchurl, binutils ? null, bison, autoconf
, fetchurl, binutils ? null, bison, autoconf, utillinux
, buildPlatform, hostPlatform
# patch for cygwin requires readline support
@ -87,6 +87,9 @@ stdenv.mkDerivation rec {
"SHOBJ_LIBS=-lbash"
];
checkInputs = [ utillinux ];
doCheck = false; # dependency cycle, needs to be interactive
postInstall = ''
ln -s bash "$out/bin/sh"
rm -f $out/lib/bash/Makefile.inc

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, gnugrep
, fixDarwinDylibNames
, file
, legacySupport ? false }:
stdenv.mkDerivation rec {
@ -19,6 +20,10 @@ stdenv.mkDerivation rec {
"ZSTD_LEGACY_SUPPORT=${if legacySupport then "1" else "0"}"
];
checkInputs = [ file ];
doCheck = false; # fails with "zstd: --list does not support reading from standard input"
# probably a bug
installFlags = [
"PREFIX=$(out)"
];

Some files were not shown because too many files have changed in this diff Show More