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

View File

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

View File

@ -43,7 +43,7 @@ python3Packages.buildPythonApplication rec {
# give image previews out of the box when building with w3m # give image previews out of the box when building with w3m
substituteInPlace ranger/config/rc.conf \ 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; { meta = with stdenv.lib; {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,11 +27,11 @@ stdenv.mkDerivation (
postPhases = "finalPhase"; postPhases = "finalPhase";
} }
// args // // args //
{ {
name = name + (if src ? version then "-" + src.version else ""); name = name + (if src ? version then "-" + src.version else "");
postHook = '' postHook = ''
mkdir -p $out/nix-support mkdir -p $out/nix-support
echo "$system" > $out/nix-support/system echo "$system" > $out/nix-support/system
@ -43,7 +43,7 @@ stdenv.mkDerivation (
if test -e $origSrc/nix-support/hydra-release-name; then if test -e $origSrc/nix-support/hydra-release-name; then
releaseName=$(cat $origSrc/nix-support/hydra-release-name) releaseName=$(cat $origSrc/nix-support/hydra-release-name)
fi fi
installFlagsArray=(DESTDIR=$TMPDIR/inst) installFlagsArray=(DESTDIR=$TMPDIR/inst)
# Prefix hackery because of a bug in stdenv (it tries to `mkdir # Prefix hackery because of a bug in stdenv (it tries to `mkdir
@ -62,18 +62,18 @@ stdenv.mkDerivation (
tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst . tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
''; '';
finalPhase = finalPhase =
'' ''
for i in $out/tarballs/*; do for i in $out/tarballs/*; do
echo "file binary-dist $i" >> $out/nix-support/hydra-build-products echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
done done
# Propagate the release name of the source tarball. This is # Propagate the release name of the source tarball. This is
# to get nice package names in channels. # to get nice package names in channels.
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name) test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
''; '';
meta = (if args ? meta then args.meta else {}) // { meta = (if args ? meta then args.meta else {}) // {
description = "Build of a generic binary distribution"; description = "Build of a generic binary distribution";

View File

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

View File

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

View File

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

View File

@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
fi fi
''; '';
doCheck = false; # fails 3 out of 3 tests (ctest)
meta = with stdenv.lib; { meta = with stdenv.lib; {
inherit (src.meta) homepage; inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL"; 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 , glib, libiconv, libintl, libtool, expat
}: }:
@ -7,13 +7,18 @@ let
let let
atLeast = lib.versionAtLeast "${major}.${minor}"; atLeast = lib.versionAtLeast "${major}.${minor}";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "vala-${major}.${minor}"; name = "vala-${version}";
version = "${major}.${minor}";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz"; url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
inherit sha256; inherit sha256;
}; };
postPatch = ''
patchShebangs tests
'';
outputs = [ "out" "devdoc" ]; outputs = [ "out" "devdoc" ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -26,6 +31,8 @@ let
] ++ lib.optional (atLeast "0.38") graphviz ] ++ lib.optional (atLeast "0.38") graphviz
++ extraBuildInputs; ++ extraBuildInputs;
doCheck = false; # fails, requires dbus daemon
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Compiler for GObject type system"; description = "Compiler for GObject type system";
homepage = https://wiki.gnome.org/Projects/Vala; homepage = https://wiki.gnome.org/Projects/Vala;

View File

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

View File

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

View File

@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
$out/lib/libclucene-core.1.dylib $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 = { meta = {
description = "Core library for full-featured text search engine"; description = "Core library for full-featured text search engine";
longDescription = '' longDescription = ''

View File

@ -194,11 +194,11 @@ stdenv.mkDerivation rec {
description = "A complete, cross-platform solution to record, convert and stream audio and video"; description = "A complete, cross-platform solution to record, convert and stream audio and video";
homepage = http://www.ffmpeg.org/; homepage = http://www.ffmpeg.org/;
longDescription = '' longDescription = ''
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and machines mux, demux, stream, filter and play pretty much anything that humans and machines
have created. It supports the most obscure ancient formats up to the cutting edge. have created. It supports the most obscure ancient formats up to the cutting edge.
No matter if they were designed by some standards committee, the community or No matter if they were designed by some standards committee, the community or
a corporation. a corporation.
''; '';
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.all; platforms = platforms.all;

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook }: { stdenv, fetchFromGitHub, autoreconfHook, perl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "glog-${version}"; name = "glog-${version}";
@ -13,6 +13,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/google/glog; homepage = https://github.com/google/glog;
license = licenses.bsd3; 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 { stdenv.mkDerivation rec {
version = "2.6.23"; version = "2.6.23";
@ -15,6 +15,17 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib zlib libgpgerror ]; propagatedBuildInputs = [ glib zlib libgpgerror ];
configureFlags = [ "--enable-introspection=yes" ]; 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; enableParallelBuilding = true;
meta = with stdenv.lib; { 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 { stdenv.mkDerivation rec {
version = "3.2.0"; version = "3.2.0";
@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib ]; propagatedBuildInputs = [ glib ];
configureFlags = [ "--enable-introspection=yes" ]; configureFlags = [ "--enable-introspection=yes" ];
postPatch = ''
substituteInPlace tests/testsuite.c \
--replace /bin/rm rm
'';
checkInputs = [ gnupg ];
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { 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 # https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html
++ lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; ++ 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; { meta = with stdenv.lib; {
homepage = https://gnupg.org/software/gpgme/index.html; homepage = https://gnupg.org/software/gpgme/index.html;
description = "Library for making GnuPG easier to use"; description = "Library for making GnuPG easier to use";

View File

@ -57,6 +57,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
doCheck = false; # fails, wants DRI access for OpenGL
patches = [ patches = [
(fetchpatch { (fetchpatch {
url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370414"; 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.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ]; ++ 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" --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 = { meta = {
homepage = https://gstreamer.freedesktop.org; homepage = https://gstreamer.freedesktop.org;

View File

@ -17,23 +17,22 @@ stdenv.mkDerivation rec {
buildInputs = [ perl bison flex ]; buildInputs = [ perl bison flex ];
propagatedBuildInputs = [ glib libxml2 ]; 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 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 = [ configureFlags = [
"--disable-examples" "--disable-examples"
"--enable-failing-tests"
"--localstatedir=/var" "--localstatedir=/var"
"--disable-gtk-doc" "--disable-gtk-doc"
"--disable-docbook" "--disable-docbook"
]; ];
doCheck = false; # fails. 2 tests crash
postInstall = '' postInstall = ''
# Hm, apparently --disable-gtk-doc is ignored... # Hm, apparently --disable-gtk-doc is ignored...
rm -rf $out/share/gtk-doc 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. , 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 , 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 , withGraphite2 ? true # it is small and major distros do include it
, python
}: }:
let let
@ -17,6 +18,11 @@ stdenv.mkDerivation {
sha256 = "0my6m9aqv4a8fc2pjwqx9pfdfh3a9mqvas4si4psi1b1867zi8y8"; sha256 = "0my6m9aqv4a8fc2pjwqx9pfdfh3a9mqvas4si4psi1b1867zi8y8";
}; };
postPatch = ''
patchShebangs src/gen-def.py
patchShebangs test
'';
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
outputBin = "dev"; outputBin = "dev";
@ -29,8 +35,10 @@ stdenv.mkDerivation {
buildInputs = [ glib freetype cairo ]; # recommended by upstream buildInputs = [ glib freetype cairo ]; # recommended by upstream
propagatedBuildInputs = [] propagatedBuildInputs = []
++ optional withGraphite2 graphite2 ++ 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. # Slightly hacky; some pkgs expect them in a single directory.
postInstall = optionalString withIcu '' postInstall = optionalString withIcu ''

View File

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

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, python }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "jbig2dec-0.14"; name = "jbig2dec-0.14";
@ -8,6 +8,13 @@ stdenv.mkDerivation rec {
sha256 = "0k01hp0q4275fj4rbr1gy64svfraw5w7wvwl08yjhvsnpb1rid11"; sha256 = "0k01hp0q4275fj4rbr1gy64svfraw5w7wvwl08yjhvsnpb1rid11";
}; };
postPatch = ''
patchShebangs test_jbig2dec.py
'';
checkInputs = [ python ];
doCheck = false; # fails 1 of 4 tests
meta = { meta = {
homepage = https://www.ghostscript.com/jbig2dec.html; homepage = https://www.ghostscript.com/jbig2dec.html;
description = "Decoder implementation of the JBIG2 image compression format"; 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 { stdenv.mkDerivation rec {
pname = "ldns"; pname = "ldns";
@ -45,6 +45,9 @@ stdenv.mkDerivation rec {
"ac_cv_func_realloc_0_nonnull=yes" "ac_cv_func_realloc_0_nonnull=yes"
]; ];
checkInputs = [ which ];
doCheck = false; # fails. missing some files
postInstall = '' postInstall = ''
moveToOutput "bin/ldns-config" "$dev" moveToOutput "bin/ldns-config" "$dev"

View File

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

View File

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

View File

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

View File

@ -42,6 +42,13 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; 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; { meta = with stdenv.lib; {
homepage = http://openil.sourceforge.net/; 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"; 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; 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 preConfigure = stdenv.lib.optionalString stdenv.isDarwin
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache"; "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, bash, perl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libfaketime-${version}"; name = "libfaketime-${version}";
@ -13,10 +13,20 @@ stdenv.mkDerivation rec {
./no-date-in-gzip-man-page.patch ./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 = '' preBuild = ''
makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib) makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib)
''; '';
checkInputs = [ perl ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Report faked system time to programs without having to change the system-wide time"; description = "Report faked system time to programs without having to change the system-wide time";
homepage = "https://github.com/wolfcw/libfaketime/"; homepage = "https://github.com/wolfcw/libfaketime/";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
{ stdenv, fetchurl, glib, pkgconfig, intltool, libxslt, docbook_xsl { stdenv, fetchurl, glib, pkgconfig, intltool, libxslt, docbook_xsl
, libgcrypt, gobjectIntrospection, vala_0_38, gnome3, libintl }: , libgcrypt, gobjectIntrospection, vala_0_38, gnome3, libintl }:
let
stdenv.mkDerivation rec {
pname = "libsecret"; pname = "libsecret";
version = "0.18.5"; version = "0.18.5";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
@ -12,6 +11,10 @@ stdenv.mkDerivation rec {
sha256 = "1cychxc3ff8fp857iikw0n2s13s2mhw2dn1mr632f7w3sn6vvrww"; sha256 = "1cychxc3ff8fp857iikw0n2s13s2mhw2dn1mr632f7w3sn6vvrww";
}; };
postPatch = ''
patchShebangs .
'';
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
propagatedBuildInputs = [ glib ]; propagatedBuildInputs = [ glib ];
@ -19,6 +22,10 @@ stdenv.mkDerivation rec {
buildInputs = [ libgcrypt gobjectIntrospection vala_0_38 ]; buildInputs = [ libgcrypt gobjectIntrospection vala_0_38 ];
# optional: build docs with gtk-doc? (probably needs a flag as well) # 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 = { passthru = {
updateScript = gnome3.updateScript { updateScript = gnome3.updateScript {
packageName = pname; packageName = pname;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,6 +16,15 @@ in stdenv.mkDerivation rec {
sha256 = "0hi61cdihwwvz5jz1l7yq712j7ca1cj4bhr8x0x7c2vlb1s9biw9"; 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 ]; nativeBuildInputs = [ m4 ];
buildInputs = [ hdf5 curl mpi ]; buildInputs = [ hdf5 curl mpi ];

View File

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

View File

@ -55,6 +55,11 @@ in stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-error"; 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 = '' postInstall = ''
rm -rf $out/private rm -rf $out/private
mv $out/public $out/include mv $out/public $out/include

View File

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

View File

@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
configureFlags = optional stdenv.isDarwin "--without-x"; 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; { meta = with stdenv.lib; {
description = "A library for laying out and rendering of text, with an emphasis on internationalization"; 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" ]; outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
doCheck = false; # fails 1 out of 3 tests, looks like a bug
postFixup = '' postFixup = ''
moveToOutput bin/pcre2-config "$dev" moveToOutput bin/pcre2-config "$dev"
''; '';

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ] nativeBuildInputs = [ pkgconfig ]
++ stdenv.lib.optionals stdenv.cc.isClang [ autoconf automake libtool autoreconfHook ]; ++ 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"; 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"; url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-${name}.tar.gz";
sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705"; sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
}; };
postPatch = ''
patchShebangs tests
'';
buildInputs = [ perl ]; buildInputs = [ perl ];
}; };
in in
@ -60,6 +63,8 @@ qtModule {
] ]
++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
doCheck = false; # fails 13 out of 13 tests (ctest)
# Hack to avoid TMPDIR in RPATHs. # Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';

View File

@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ]; buildInputs = [ zlib ];
checkPhase = "ctest"; checkPhase = "ctest";
doCheck = false; # fails 7 out of 293 tests
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://sourceforge.net/projects/niftilib; 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 { stdenv.mkDerivation rec {
version = "1.3.6"; version = "1.3.6";
@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
patches = stdenv.lib.optionals stdenv.isDarwin [ ./macosx.patch ]; patches = stdenv.lib.optionals stdenv.isDarwin [ ./macosx.patch ];
checkInputs = [ python ];
doCheck = false; # fails, probably missing something
meta = { meta = {
description = "An advanced font engine"; description = "An advanced font engine";
maintainers = [ stdenv.lib.maintainers.raskin ]; 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='''/" sed -i $out/lib/libsqlite3.la -e "s/dependency_libs=.*/dependency_libs='''/"
''; '';
doCheck = false; # fails to link against tcl
meta = { meta = {
description = "A self-contained, serverless, zero-configuration, transactional SQL database engine"; description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
downloadPage = http://sqlite.org/download.html; downloadPage = http://sqlite.org/download.html;

View File

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

View File

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

View File

@ -26,6 +26,9 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true; 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; { meta = with stdenv.lib; {
description = "Novel computer vision C++ library with customizable algorithms and data structures"; description = "Novel computer vision C++ library with customizable algorithms and data structures";
homepage = https://hci.iwr.uni-heidelberg.de/vigra; homepage = https://hci.iwr.uni-heidelberg.de/vigra;

View File

@ -24,6 +24,8 @@ in stdenv.mkDerivation rec {
"pythondir=$(py)/${python3.sitePackages}" "pythondir=$(py)/${python3.sitePackages}"
]; ];
doCheck = false; # fails 1 out of 1 tests, needs `certutil`
meta = with stdenv.lib; { 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"; 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/; homepage = https://pagure.io/volume_key/;

View File

@ -14,7 +14,6 @@ buildPythonPackage rec {
sha256 = "1kp2iyx20lpc9dv4qg5fgwf83a1wx6f7hj1ldqyncg0kn9xcrhbg"; sha256 = "1kp2iyx20lpc9dv4qg5fgwf83a1wx6f7hj1ldqyncg0kn9xcrhbg";
}; };
# Required for tests only
checkInputs = [ mock ]; checkInputs = [ mock ];
checkPhase = "${python.interpreter} -m unittest discover -s tests"; 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 ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus dbus-glib ] buildInputs = [ dbus dbus-glib ]
++ lib.optionals doCheck [ dbus.out pygobject3 ]
# My guess why it's sometimes trying to -lncurses. # My guess why it's sometimes trying to -lncurses.
# It seems not to retain the dependency anyway. # It seems not to retain the dependency anyway.
++ lib.optional (! python ? modules) ncurses; ++ lib.optional (! python ? modules) ncurses;
doCheck = true; doCheck = true;
checkInputs = [ dbus.out pygobject3 ];
meta = { meta = {
description = "Python DBus bindings"; description = "Python DBus bindings";

View File

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

View File

@ -25,4 +25,4 @@ buildPythonPackage rec {
homepage = https://github.com/Python-Markdown/markdown; homepage = https://github.com/Python-Markdown/markdown;
license = lib.licenses.bsd3; license = lib.licenses.bsd3;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, autoconf, makeWrapper }: { stdenv, fetchurl, perl, autoconf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "automake-1.11.6"; name = "automake-1.11.6";
@ -17,11 +17,12 @@ stdenv.mkDerivation rec {
patches = [ ./fix-test-autoconf-2.69.patch ./fix-perl-5.26.patch ]; 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 # Disable indented log output from Make, otherwise "make.test" will
# fail. # fail.
preCheck = "unset NIX_INDENT_MAKE"; 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 # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
# "fixed" path in generated files! # "fixed" path in generated files!

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, autoconf, doCheck ? false }: { stdenv, fetchurl, perl, autoconf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "automake-1.16.1"; name = "automake-1.16.1";
@ -16,7 +16,8 @@ stdenv.mkDerivation rec {
# Disable indented log output from Make, otherwise "make.test" will # Disable indented log output from Make, otherwise "make.test" will
# fail. # fail.
preCheck = "unset NIX_INDENT_MAKE"; 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. # The test suite can run in parallel.
enableParallelBuilding = true; enableParallelBuilding = true;

View File

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

View File

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

View File

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
''; '';
preBuild = '' preBuild = ''
patchShebangs tests
patchShebangs debugger/system_routine/pre_cpp.py patchShebangs debugger/system_routine/pre_cpp.py
substituteInPlace tools/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)' substituteInPlace tools/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'
substituteInPlace tests/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 ]; 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 = { meta = {
homepage = https://nixos.org/patchelf.html; homepage = https://nixos.org/patchelf.html;

View File

@ -8,7 +8,12 @@ stdenv.mkDerivation {
sha256 = "0prdld6nbkdlkcgc2r1zp13h2fh8r0mlwxx423dnc695ddlk18b8"; 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 = '' preInstall = ''
mkdir -p $out/bin mkdir -p $out/bin
@ -17,6 +22,8 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
doCheck = false; # "check" target is probably meant to do "installcheck" or something
meta = { 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"; 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"; license = "artistic";

View File

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
configureFlags = stdenv.lib.optional (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV) "--enable-mpers=check"; 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; { meta = with stdenv.lib; {
homepage = https://strace.io/; homepage = https://strace.io/;
description = "A system call tracer for Linux"; description = "A system call tracer for Linux";

View File

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

View File

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

View File

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

View File

@ -8,6 +8,12 @@ stdenv.mkDerivation rec {
sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw"; sha256 = "0fy14c35yz2m1n1m4f02by3501fn0cca37zn7jp8lpp4b3kgjhrw";
}; };
postPatch = ''
patchShebangs tests
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
substituteInPlace Makefile.in --replace "tests" " ";
'';
buildInputs = [ bison ]; buildInputs = [ bison ];
propagatedBuildInputs = [ m4 ]; propagatedBuildInputs = [ m4 ];
@ -21,11 +27,6 @@ stdenv.mkDerivation rec {
sed -i Makefile -e 's/-no-undefined//;' 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 = { meta = {
homepage = https://github.com/westes/flex; homepage = https://github.com/westes/flex;
description = "A fast lexical analyser generator"; 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"; + "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f"; 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 Makefile.in --replace "tests" " "
substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: ' substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: '

View File

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

View File

@ -4,6 +4,7 @@
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix , writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix
, gnupg , gnupg
, darwin ? null , darwin ? null
, procps
}: }:
with stdenv.lib; with stdenv.lib;
@ -66,16 +67,27 @@ in
inherit patches; inherit patches;
preBuild = optionalString stdenv.isDarwin '' postPatch = ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
prePatch = ''
patchShebangs . patchShebangs .
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py 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 = '' postInstall = ''
paxmark m $out/bin/node paxmark m $out/bin/node
PATH=$out/bin:$PATH patchShebangs $out PATH=$out/bin:$PATH patchShebangs $out

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, removeReferencesTo { stdenv, fetchurl, fetchpatch, pkgconfig, removeReferencesTo
, zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin , zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin
, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null , libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
, coreutils
}: }:
### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test ### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
@ -30,6 +31,11 @@ stdenv.mkDerivation rec {
./cups-clean-dirty.patch ./cups-clean-dirty.patch
]; ];
postPatch = ''
substituteInPlace cups/testfile.c \
--replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'
'';
nativeBuildInputs = [ pkgconfig removeReferencesTo ]; nativeBuildInputs = [ pkgconfig removeReferencesTo ];
buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ] 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 { stdenv.mkDerivation rec {
name = "foo2zjs-20180519"; name = "foo2zjs-20180519";
@ -39,6 +39,9 @@ stdenv.mkDerivation rec {
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000 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 = '' preInstall = ''
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb} mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver} 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"; NIX_LDFLAGS = "-lgcc_s";
configureFlags = [ configureFlags = [

View File

@ -4,6 +4,7 @@
, fusePackages, utillinux, gettext , fusePackages, utillinux, gettext
, meson, ninja, pkgconfig , meson, ninja, pkgconfig
, autoreconfHook , autoreconfHook
, python3Packages, which
}: }:
let let
@ -58,6 +59,14 @@ in stdenv.mkDerivation rec {
./makeconf.sh ./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 '' postFixup = "cd $out\n" + (if isFuse3 then ''
install -D -m444 etc/fuse.conf $common/etc/fuse.conf 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 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"; sha256 = "1kqpiswjn549s3w3m89bw5qkl7bw5pvq6gp5cdzd926ymlgivj5c";
}) ]; }) ];
postPatch = ''
patchShebangs harness
# Makefile is too optimistic, gcc is too smart
substituteInPlace harness/Makefile \
--replace "-Werror" ""
'';
makeFlags = "prefix=$(out)"; makeFlags = "prefix=$(out)";
hardeningDisable = stdenv.lib.optional (stdenv.isi686) "stackprotector"; hardeningDisable = stdenv.lib.optional (stdenv.isi686) "stackprotector";
checkTarget = "partcheck"; # "check" needs root
meta = { meta = {
description = "Library for asynchronous I/O in Linux"; description = "Library for asynchronous I/O in Linux";
homepage = http://lse.sourceforge.net/io/aio.html; homepage = http://lse.sourceforge.net/io/aio.html;

View File

@ -23,6 +23,15 @@ stdenv.mkDerivation rec {
sha256 = "080b0sygmg7104qbbh1amh3b322yyiajwi2d3d0vayffgva0720v"; 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; { meta = with stdenv.lib; {
description = "Library and tools for non-uniform memory access (NUMA) machines"; description = "Library and tools for non-uniform memory access (NUMA) machines";
homepage = http://oss.sgi.com/projects/libnuma/; 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 ' 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 = { meta = {
homepage = http://pmount.alioth.debian.org/; homepage = http://pmount.alioth.debian.org/;
description = "Mount removable devices as normal user"; 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 ]; nativeBuildInputs = [ nasm perl python ];
buildInputs = [ libuuid makeWrapper ]; buildInputs = [ libuuid makeWrapper ];
enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...' enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...'
hardeningDisable = [ "pic" "stackprotector" "fortify" ]; 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"; stripDebugList = "bin sbin share/syslinux/com32";
makeFlags = [ makeFlags = [
@ -47,6 +51,8 @@ stdenv.mkDerivation rec {
"bios" "bios"
]; ];
doCheck = false; # fails. some fail in a sandbox, others require qemu
postInstall = '' postInstall = ''
wrapProgram $out/bin/syslinux \ wrapProgram $out/bin/syslinux \
--prefix PATH : "${mtools}/bin" --prefix PATH : "${mtools}/bin"

View File

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

View File

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

View File

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

View File

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

View File

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

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