Merge #53490: fix treewide linking errors after #51770

Issue #53001.  This might not be all of them, but let's not wait.
This commit is contained in:
Vladimír Čunát 2019-01-06 12:14:52 +01:00
commit 10a12194e3
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
56 changed files with 199 additions and 19 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
{ stdenv, fetchurl, fetchpatch, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
, wafHook
, python2Packages}:
@ -16,6 +16,17 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig makeWrapper wafHook ];
buildInputs = [ alsaLib dbus libjack2 python dbus-python ];
patches = [
(fetchpatch {
url = https://repo.or.cz/a2jmidid.git/patch/24e3b8e543256ae8fdfb4b75eb9fd775f07c46e2;
sha256 = "1nxrvnhxlgqc9wbxnp1gnpw4wjyzxvymwcg1gh2nqzmssgfykfkc";
})
(fetchpatch {
url = https://repo.or.cz/a2jmidid.git/patch/7f82da7eb2f540a94db23331be98d42a58ddc269;
sha256 = "1nab9zf0agbcj5pvhl90pz0cx1d204d4janqflc5ymjhy8jyrsdv";
})
];
postInstall = ''
wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
'';

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libjack2, gtk2, pkgconfig }:
{ stdenv, autoreconfHook, fetchurl, libjack2, gtk2, pkgconfig }:
stdenv.mkDerivation rec {
name = "bitmeter-${version}";
@ -9,9 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "09ck2gxqky701dc1p0ip61rrn16v0pdc7ih2hc2sd63zcw53g2a7";
};
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libjack2 gtk2 ];
patches = [
(fetchurl {
url = https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/bitmeter/files/bitmeter-1.2-fix-build-system.patch;
sha256 = "021mz6933iw7mpk6b9cbjr8naj6smbq1hwqjszlyx72qbwrrid7k";
})
];
meta = with stdenv.lib; {
homepage = http://devel.tlrmx.org/audio/bitmeter/;
description = "Also known as jack bitscope. Useful to detect denormals";

View file

@ -7,6 +7,11 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libjack2 ladspaH gtk2 alsaLib libxml2 librdf ];
NIX_LDFLAGS = [
"-ldl"
"-lm"
"-lpthread"
];
meta = {
description = ''An effects "rack" for the JACK low latency audio API'';

View file

@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
buildInputs = [ alsaLib gtk2 libjack2 libxml2 makeWrapper
pkgconfig readline ];
propagatedBuildInputs = [ libuuid ];
NIX_LDFLAGS = [
"-lm"
"-lpthread"
"-luuid"
];
postInstall = ''
for i in lash_control lash_panel

View file

@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
preConfigure = "cd src";
buildInputs = [ alsaLib cmake makeWrapper libGLU_combined qt4 ];
NIX_LDFLAGS = [ "-lGL" "-lpthread" ];
postInstall = ''
wrapProgram $out/bin/pianobooster \

View file

@ -19,6 +19,10 @@ stdenv.mkDerivation rec {
preConfigure = "./autogen.sh";
NIX_LDFLAGS = [
"-lm"
];
meta = {
description = "JACK audio recorder";
homepage = http://plugin.org.uk/timemachine/;

View file

@ -24,6 +24,7 @@ stdenv.mkDerivation {
};
buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
NIX_LDFLAGS = [ "-lz" ];
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
@ -33,12 +34,6 @@ stdenv.mkDerivation {
inherit (common) postPatch;
postFixup = ''
bin="$out/libexec/TeXmacs/bin/texmacs.bin"
rpath=$(patchelf --print-rpath "$bin")
patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
'';
meta = common.meta // {
maintainers = [ stdenv.lib.maintainers.roconnor ];
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice

View file

@ -29,6 +29,10 @@ stdenv.mkDerivation rec {
gst_all_1.gst-plugins-base
] ++ stdenv.lib.optional useUnrar unrar;
NIX_LDFLAGS = [
"-lpthread"
];
postPatch = ''patchShebangs version.sh'';
postInstall = ''

View file

@ -10,6 +10,13 @@ stdenv.mkDerivation {
buildInputs = [ cmake libpng libtiff libjpeg panotools libxml2 ];
patches = [
(fetchurl {
url = https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/autopano-sift-C/files/autopano-sift-C-2.5.1-lm.patch;
sha256 = "1bfcr5sps0ip9gl4jprji5jgf9wkczz6d2clsjjlbsy8r3ixi3lv";
})
];
meta = {
homepage = http://hugin.sourceforge.net/;
description = "Implementation in C of the autopano-sift algorithm for automatically stitching panoramas";

View file

@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ];
NIX_LDFLAGS = "-llcms -ljpeg -lX11";
NIX_LDFLAGS = "-lm -llcms -ljpeg -lpng -lX11";
meta = {
homepage = http://www.cinepaint.org/;

View file

@ -16,6 +16,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ];
buildInputs = [ glfw3 gtk3 libpng12 ];
NIX_LDFLAGS = [
"-lpthread"
];
buildPhase = ''
make release

View file

@ -18,6 +18,10 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
NIX_LDFLAGS = [
"-lm"
];
meta = with stdenv.lib; {
description = "A fast image viewer";
homepage = http://gqview.sourceforge.net;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, dbus-glib, gtk2, pkgconfig, wordnet }:
{ stdenv, autoreconfHook, fetchurl, dbus-glib, gtk2, pkgconfig, wordnet }:
stdenv.mkDerivation rec {
name = "artha-${version}";
@ -9,9 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "0qr4ihl7ma3cq82xi1fpzvf74mm9vsg0j035xvmcp3r6rmw2fycx";
};
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ dbus-glib gtk2 wordnet ];
patches = [
./gio-underlink.patch
];
meta = with stdenv.lib; {
description = "An offline thesaurus based on WordNet";
homepage = http://artha.sourceforge.net;

View file

@ -0,0 +1,13 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 0236d72..bcc1182 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -38,7 +38,7 @@ artha_LDADD = libwni.a $(WORDNET_LIB)
if POSIX
AM_CFLAGS += @libdbus_CFLAGS@
-artha_LDADD += -lX11 -ldbus-1 -ldbus-glib-1 -lgtk-x11-2.0 \
+artha_LDADD += -lX11 -ldbus-1 -ldbus-glib-1 -lgio-2.0 -lgtk-x11-2.0 \
-lgdk-x11-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0
else
artha_LDADD += @GTK_LIBS@

View file

@ -50,6 +50,10 @@ stdenv.mkDerivation rec {
Mako cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl
];
NIX_LDFLAGS = [
"-lpthread"
];
enableParallelBuilding = true;
postPatch = ''

View file

@ -26,6 +26,9 @@ in stdenv.mkDerivation rec {
qtconnectivity
];
nativeBuildInputs = [ flex makeWrapper qmake yacc ];
NIX_LDFLAGS = [
"-lz"
];
preConfigure = ''
cp src/gcconfig.pri.in src/gcconfig.pri
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri

View file

@ -104,6 +104,10 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DCMAKE_C_FLAGS=-I${src}/include_mod" ];
NIX_LDFLAGS = [
"-lpthread"
];
installPhase = ''
install -D -m 755 k2pdfopt $out/bin/k2pdfopt
'';

View file

@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gettext gtk2 gconf curl libexif sqlite libxml2 ];
NIX_LDFLAGS = [ "-lm" ];
# bogus includes fail with newer library version
postPatch = ''

View file

@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
mkdir .bin
ln -s ${qt4}/bin/moc .bin/moc-qt4
addToSearchPath PATH .bin
sed -i -e "s@LD=\$_cc@LD=\$_cxx@" configure
'';
meta = with stdenv.lib; {

View file

@ -16,6 +16,7 @@ stdenv.mkDerivation {
patches = [ ./conference.patch ];
buildInputs = [ cmake lame id3lib libvorbis qt4 libogg ];
NIX_LDFLAGS = [ "-lvorbis" ];
meta = {
homepage = http://atdot.ch/scr/;

View file

@ -12,7 +12,10 @@ stdenv.mkDerivation {
++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) podofo
++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
configurePhase = stdenv.lib.optionalString (!stdenv.isLinux) ''
configurePhase = ''
substituteInPlace Makefile \
--replace '$(CC) $(CFLAGS) $(LDFLAGS)' '$(CXX) $(CFLAGS) $(LDFLAGS)'
'' + stdenv.lib.optionalString (!stdenv.isLinux) ''
sed 's/#EXTRA/EXTRA/' -i Makefile
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed 's/^PDF/#PDF/' -i Makefile

View file

@ -14,6 +14,13 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-include ${libGLU_combined}/include/GL/glu.h";
patches = [
(fetchurl {
url = https://data.gpo.zugaina.org/fusion809/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch;
sha256 = "1p113v19z3zwr9gxj2k599f8p97a8rwm93pa4amqvd0snn31mw0k";
})
];
meta = {
description = "Molecule editor and visualizer";
maintainers = [ ];

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
makeFlags=[
"AM_LDFLAGS="
];
NIX_LDFLAGS="-lpython${python2.majorVersion} -lperl";
NIX_LDFLAGS="-lpython${python2.majorVersion} -lperl -ldl -lGL";
preConfigure=''
export NIX_LDFLAGS="$NIX_LDFLAGS -L$(dirname "$(find ${perl} -name libperl.so)")"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE

View file

@ -22,6 +22,10 @@ stdenv.mkDerivation {
"SVN_INCLUDE=${subversion.dev}/include/subversion-1"
];
NIX_LDFLAGS = [
"-lsvn_fs-1"
];
meta = with stdenv.lib; {
homepage = https://github.com/svn-all-fast-export/svn2git;
description = "A fast-import based converter for an svn repo to git repos";

View file

@ -48,6 +48,12 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "bindnow" "relro" ];
# this is fixed upstream though not yet in an officially released version,
# should be fine remove on next release (if one ever happens)
NIX_LDFLAGS = [
"-lpthread"
];
postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub";
meta = {

View file

@ -71,6 +71,11 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
NIX_LDFLAGS = [
"-lavcodec"
"-lavutil"
];
patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ];
postInstall = "

View file

@ -13,6 +13,7 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libxml2 gtk shared-mime-info hicolor-icon-theme libSM ];
NIX_LDFLAGS = [ "-ldl" "-lm" ];
patches = [
./rox-filer-2.11-in-source-build.patch

View file

@ -14,6 +14,10 @@ stdenv.mkDerivation rec {
configureOptions = [ "--with-gtk2" ];
NIX_LDFLAGS = [
"-ldl"
];
meta = {
description = "gtk-server for interpreted GUI programming";
homepage = http://www.gtk-server.org/;

View file

@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ bison flex makeWrapper ];
propagatedBuildInputs = [ llvm gmp mpfr readline ];
NIX_LDFLAGS = [ "-lLLVMJIT" ];
postPatch = ''
for f in expr.cc matcher.cc printer.cc symtable.cc parserdefs.hh; do

View file

@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2";
};
configureFlags = [
"--enable-shared"
];
# fails 1 out of 1 tests with "BAD GLOBAL SYMBOLS" on i686
# which can also be fixed with
# hardeningDisable = stdenv.lib.optional stdenv.isi686 "pic";

View file

@ -17,7 +17,11 @@ stdenv.mkDerivation rec {
unzip cmake libGLU_combined freeglut libX11 xproto inputproto libXi
];
cmakeFlags = [ "-DBOX2D_INSTALL=ON" "-DBOX2D_BUILD_SHARED=ON" ];
cmakeFlags = [
"-DBOX2D_INSTALL=ON"
"-DBOX2D_BUILD_SHARED=ON"
"-DBOX2D_BUILD_EXAMPLES=OFF"
];
prePatch = ''
substituteInPlace Box2D/Common/b2Settings.h \

View file

@ -11,6 +11,9 @@ stdenv.mkDerivation rec {
buildInputs = [ bison ];
patches = [ ./gcc-4.3.3-fixes.patch ];
configureFlags = [ "CFLAGS=-O3" "CXXFLAGS=-O3" ];
NIX_LDFLAGS = [
"-lm"
];
doCheck = true;
meta = {

View file

@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
NIX_LDFLAGS = [
"-lbluetooth"
];
postInstall = ''
# Some programs (for example, cabal-install) have problems with the double 0
sed -i -e "s/0.6.00/0.6.0/" $out/lib/pkgconfig/cwiid.pc

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus glib expat ];
configureFlags = [ "--disable-ecore" ];
configureFlags = [ "--disable-ecore" "--disable-tests" ];
meta = with stdenv.lib; {
homepage = http://dbus-cplusplus.sourceforge.net;

View file

@ -45,6 +45,10 @@ stdenv.mkDerivation rec {
doCheck = false; # TODO: some issues with temporary files
NIX_LDFLAGS = [
"-lpthread"
];
enableParallelBuilding = true;
configureFlags = [

View file

@ -39,4 +39,6 @@ stdenv.mkDerivation rec {
libintl
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks;
[ IOKit CoreFoundation DiskArbitration ]);
NIX_LDFLAGS = [ "-lm" ];
}

View file

@ -11,6 +11,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libX11 libXi libXtst xextproto ];
NIX_LDFLAGS = [
"-lX11"
];
meta = with stdenv.lib; {
description = "X virtual keyboard library";

View file

@ -6,6 +6,9 @@ stdenv.mkDerivation rec {
buildInputs = [ libXft libICE pango libjpeg ];
propagatedBuildInputs = [ libX11 libXext libpng ];
NIX_LDFLAGS = [
"-lX11"
];
src = fetchurl {
url = "https://downloads.yoctoproject.org/releases/matchbox/libmatchbox/${version}/libmatchbox-${version}.tar.bz2";

View file

@ -25,6 +25,7 @@ buildPythonPackage rec {
preConfigure = ''
chmod +x ./deps/pjsip/configure ./deps/pjsip/aconfigure
export LD=$CC
'';
nativeBuildInputs = [ pkgs.pkgconfig ];

View file

@ -16,6 +16,10 @@ mkDerivation rec {
nativeBuildInputs = [ cmake antlr qttools ];
NIX_LDFLAGS = [
"-lQt5PrintSupport"
];
enableParallelBuilding = true;
# We have to patch out Test and PrintSupport to make this work with Qt 5.9

View file

@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
buildInputs = [ makeWrapper SDL SDL_image ];
NIX_LDFLAGS = [
"-lm"
];
installPhase = ''
ls -l
mkdir -p $out/bin

View file

@ -21,6 +21,10 @@ stdenv.mkDerivation {
NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
NIX_LDFLAGS = [
"-ldl"
];
meta = {
homepage = http://www.bergo.eng.br/eboard/;
description = "Chess interface for Unix-like systems";

View file

@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
'';
*/
NIX_LDFLAGS = [
"-lm"
];
meta = {
description = "3D dungeon crawling adventure";

View file

@ -41,6 +41,10 @@ stdenv.mkDerivation rec {
sconsFlags+=" DATADIR=$out/share/globulation2/glob2"
'';
NIX_LDFLAGS = [
"-lboost_system"
];
meta = with stdenv.lib; {
description = "RTS without micromanagement";
maintainers = with maintainers; [ raskin ];

View file

@ -9,6 +9,10 @@ stdenv.mkDerivation rec {
};
buildInputs = [ SDL SDL_image SDL_mixer ];
NIX_LDFLAGS = [
"-lm"
];
meta = with stdenv.lib; {
homepage = "https://jump.gnu.sinusoid.es/";
description = "A clone of the simple yet addictive game Xjump";

View file

@ -15,6 +15,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake ogre cegui boost sfml openal ois ];
NIX_LDFLAGS = [
"-lpthread"
];
meta = with stdenv.lib; {
description = "An open source, real time strategy game sharing game elements with the Dungeon Keeper series and Evil Genius.";

View file

@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus libcap ];
NIX_LDFLAGS = [ "-lrt" ];
meta = with stdenv.lib; {
homepage = http://0pointer.de/blog/projects/rtkit;

View file

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libzip boost wt3 libconfig ];
NIX_LDFLAGS = [
"-lpthread"
];
postInstall = ''
ln -s ${wt3}/share/Wt/resources $out/share/fileshelter/docroot/resources
'';

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation {
'';
NIX_CFLAGS_COMPILE="-I ${subversion.dev}/include/subversion-1";
NIX_LDFLAGS="-lsvn_client-1";
NIX_LDFLAGS="-lsvn_client-1 -lsvn_subr-1";
meta = {
description = "FUSE filesystem for accessing Subversion repositories";

View file

@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook intltool pkgconfig wrapGAppsHook ];
buildInputs = [ gtk2 hicolor-icon-theme ];
NIX_LDFLAGS = [ "-lgio-2.0" ];
preFixup = ''
# Need which and xdotool on path to fix auto-pasting.

View file

@ -7,6 +7,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libX11 libXtst qt4 ];
NIX_LDFLAGS = [ "-lX11" ];
patchPhase = ''
cd src
substituteInPlace config --replace /bin/bash /bin/sh

View file

@ -54,7 +54,7 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ glib pcap ];
NIX_CFLAGS_LINK = "-lglib-2.0";
NIX_CFLAGS_LINK = "-lglib-2.0 -lpthread";
postPatch = ''
for patch in debian/patches/*.patch; do
patch < $patch

View file

@ -36,6 +36,8 @@ stdenv.mkDerivation {
buildInputs = stdenv.lib.optional tlsSupport openssl;
NIX_LDFLAGS = stdenv.lib.optional tlsSupport [ "-lcrypto" ];
meta = with stdenv.lib; {
platforms = platforms.linux;
license = licenses.gpl2;

View file

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
NIX_LDFLAGS = [
"-lm"
];
meta = with stdenv.lib; {
homepage = http://gdmap.sourceforge.net;
description = "Recursive rectangle map of disk usage";

View file

@ -9,6 +9,10 @@ stdenv.mkDerivation {
buildInputs = [ libmtsupport libfacet libbtree multitrandata ];
NIX_LDFLAGS = [
"-lbtree"
];
patchPhase = ''
sed -i -e 's@\$(DESTDIR)/usr@'$out'@' \
-e 's@/usr/include/mt/support@${libmtsupport}/include/mt/support@' \

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
configurePhase = ''
mkdir -p $out/{bin,man/man1}
makeFlags="PREFIX=$out"
makeFlags="PREFIX=$out CC=$CXX"
'';
meta = {