diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix index f443aec43ddb..70709ae4ac4c 100644 --- a/pkgs/applications/audio/a2jmidid/default.nix +++ b/pkgs/applications/audio/a2jmidid/default.nix @@ -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 ''; diff --git a/pkgs/applications/audio/bitmeter/default.nix b/pkgs/applications/audio/bitmeter/default.nix index 5f3229dc157c..fbe2c97042f0 100644 --- a/pkgs/applications/audio/bitmeter/default.nix +++ b/pkgs/applications/audio/bitmeter/default.nix @@ -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"; diff --git a/pkgs/applications/audio/jack-rack/default.nix b/pkgs/applications/audio/jack-rack/default.nix index d68e67d19dd4..26a717dbd6e4 100644 --- a/pkgs/applications/audio/jack-rack/default.nix +++ b/pkgs/applications/audio/jack-rack/default.nix @@ -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''; diff --git a/pkgs/applications/audio/lash/default.nix b/pkgs/applications/audio/lash/default.nix index 9d2950735976..7fb5a01e2c80 100644 --- a/pkgs/applications/audio/lash/default.nix +++ b/pkgs/applications/audio/lash/default.nix @@ -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 diff --git a/pkgs/applications/audio/pianobooster/default.nix b/pkgs/applications/audio/pianobooster/default.nix index d013a26277e8..53afcdd2306a 100644 --- a/pkgs/applications/audio/pianobooster/default.nix +++ b/pkgs/applications/audio/pianobooster/default.nix @@ -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 \ diff --git a/pkgs/applications/audio/timemachine/default.nix b/pkgs/applications/audio/timemachine/default.nix index 8837566b13d0..643f50752985 100644 --- a/pkgs/applications/audio/timemachine/default.nix +++ b/pkgs/applications/audio/timemachine/default.nix @@ -19,6 +19,10 @@ stdenv.mkDerivation rec { preConfigure = "./autogen.sh"; + NIX_LDFLAGS = [ + "-lm" + ]; + meta = { description = "JACK audio recorder"; homepage = http://plugin.org.uk/timemachine/; diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix index d3d95e5886a5..ac5ac34d2145 100644 --- a/pkgs/applications/editors/texmacs/default.nix +++ b/pkgs/applications/editors/texmacs/default.nix @@ -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 diff --git a/pkgs/applications/graphics/ahoviewer/default.nix b/pkgs/applications/graphics/ahoviewer/default.nix index 52df41c683cd..6668bc42a8b5 100644 --- a/pkgs/applications/graphics/ahoviewer/default.nix +++ b/pkgs/applications/graphics/ahoviewer/default.nix @@ -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 = '' diff --git a/pkgs/applications/graphics/autopanosiftc/default.nix b/pkgs/applications/graphics/autopanosiftc/default.nix index 5fd1810bc284..c64604975ab0 100644 --- a/pkgs/applications/graphics/autopanosiftc/default.nix +++ b/pkgs/applications/graphics/autopanosiftc/default.nix @@ -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"; diff --git a/pkgs/applications/graphics/cinepaint/default.nix b/pkgs/applications/graphics/cinepaint/default.nix index 9c736f5ffb57..14c7bb1be61a 100644 --- a/pkgs/applications/graphics/cinepaint/default.nix +++ b/pkgs/applications/graphics/cinepaint/default.nix @@ -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/; diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix index c553b7cf60c4..71ee715b535d 100644 --- a/pkgs/applications/graphics/goxel/default.nix +++ b/pkgs/applications/graphics/goxel/default.nix @@ -16,6 +16,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ]; buildInputs = [ glfw3 gtk3 libpng12 ]; + NIX_LDFLAGS = [ + "-lpthread" + ]; buildPhase = '' make release diff --git a/pkgs/applications/graphics/gqview/default.nix b/pkgs/applications/graphics/gqview/default.nix index 75140bd005d5..205376b1257c 100644 --- a/pkgs/applications/graphics/gqview/default.nix +++ b/pkgs/applications/graphics/gqview/default.nix @@ -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; diff --git a/pkgs/applications/misc/artha/default.nix b/pkgs/applications/misc/artha/default.nix index f69152820e43..202c1669f858 100644 --- a/pkgs/applications/misc/artha/default.nix +++ b/pkgs/applications/misc/artha/default.nix @@ -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; diff --git a/pkgs/applications/misc/artha/gio-underlink.patch b/pkgs/applications/misc/artha/gio-underlink.patch new file mode 100644 index 000000000000..08d9c4787369 --- /dev/null +++ b/pkgs/applications/misc/artha/gio-underlink.patch @@ -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@ diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index a7c00cceaa72..f9a50313c472 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -50,6 +50,10 @@ stdenv.mkDerivation rec { Mako cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl ]; + NIX_LDFLAGS = [ + "-lpthread" + ]; + enableParallelBuilding = true; postPatch = '' diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix index 01447281fe76..edf16f806a6b 100644 --- a/pkgs/applications/misc/golden-cheetah/default.nix +++ b/pkgs/applications/misc/golden-cheetah/default.nix @@ -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 diff --git a/pkgs/applications/misc/k2pdfopt/default.nix b/pkgs/applications/misc/k2pdfopt/default.nix index 8f69abd3a987..2a3b2e61fc23 100644 --- a/pkgs/applications/misc/k2pdfopt/default.nix +++ b/pkgs/applications/misc/k2pdfopt/default.nix @@ -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 ''; diff --git a/pkgs/applications/misc/tangogps/default.nix b/pkgs/applications/misc/tangogps/default.nix index bde30d9041ae..08bea18d8e9a 100644 --- a/pkgs/applications/misc/tangogps/default.nix +++ b/pkgs/applications/misc/tangogps/default.nix @@ -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 = '' diff --git a/pkgs/applications/misc/xautoclick/default.nix b/pkgs/applications/misc/xautoclick/default.nix index 045354da3d60..bf3d9b737a9e 100644 --- a/pkgs/applications/misc/xautoclick/default.nix +++ b/pkgs/applications/misc/xautoclick/default.nix @@ -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; { diff --git a/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix index 5fcee73c0f90..3ac2b567a8cb 100644 --- a/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix +++ b/pkgs/applications/networking/instant-messengers/skype-call-recorder/default.nix @@ -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/; diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix index d499916c7b6c..d91bfbae501d 100644 --- a/pkgs/applications/networking/offrss/default.nix +++ b/pkgs/applications/networking/offrss/default.nix @@ -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 diff --git a/pkgs/applications/science/chemistry/avogadro/default.nix b/pkgs/applications/science/chemistry/avogadro/default.nix index 78cda9d115ce..a569b82ff59d 100644 --- a/pkgs/applications/science/chemistry/avogadro/default.nix +++ b/pkgs/applications/science/chemistry/avogadro/default.nix @@ -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 = [ ]; diff --git a/pkgs/applications/science/misc/golly/beta.nix b/pkgs/applications/science/misc/golly/beta.nix index 83b9c5a04a19..ebc476d3c6d0 100644 --- a/pkgs/applications/science/misc/golly/beta.nix +++ b/pkgs/applications/science/misc/golly/beta.nix @@ -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 diff --git a/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix b/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix index 35c6d33d74da..0ee188cc19d0 100644 --- a/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix +++ b/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix @@ -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"; diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix index 3dd0cc5adc29..d4208aee62e0 100644 --- a/pkgs/applications/video/aegisub/default.nix +++ b/pkgs/applications/video/aegisub/default.nix @@ -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 = { diff --git a/pkgs/applications/video/kino/default.nix b/pkgs/applications/video/kino/default.nix index d6404a82bc34..4ddd84433e88 100644 --- a/pkgs/applications/video/kino/default.nix +++ b/pkgs/applications/video/kino/default.nix @@ -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 = " diff --git a/pkgs/desktops/rox/rox-filer/default.nix b/pkgs/desktops/rox/rox-filer/default.nix index 65e4463600a9..543e3ca897f1 100644 --- a/pkgs/desktops/rox/rox-filer/default.nix +++ b/pkgs/desktops/rox/rox-filer/default.nix @@ -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 diff --git a/pkgs/development/interpreters/gtk-server/default.nix b/pkgs/development/interpreters/gtk-server/default.nix index ab295dab4443..6f5a5ec0f198 100644 --- a/pkgs/development/interpreters/gtk-server/default.nix +++ b/pkgs/development/interpreters/gtk-server/default.nix @@ -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/; diff --git a/pkgs/development/interpreters/pure/default.nix b/pkgs/development/interpreters/pure/default.nix index c2b120576ea2..188058a73b52 100644 --- a/pkgs/development/interpreters/pure/default.nix +++ b/pkgs/development/interpreters/pure/default.nix @@ -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 diff --git a/pkgs/development/libraries/a52dec/default.nix b/pkgs/development/libraries/a52dec/default.nix index ef1307c97112..5ff5e609723e 100644 --- a/pkgs/development/libraries/a52dec/default.nix +++ b/pkgs/development/libraries/a52dec/default.nix @@ -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"; diff --git a/pkgs/development/libraries/box2d/default.nix b/pkgs/development/libraries/box2d/default.nix index e65980be320e..a6ab33d20f77 100644 --- a/pkgs/development/libraries/box2d/default.nix +++ b/pkgs/development/libraries/box2d/default.nix @@ -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 \ diff --git a/pkgs/development/libraries/buddy/default.nix b/pkgs/development/libraries/buddy/default.nix index a8555a349d08..fb25b0a58108 100644 --- a/pkgs/development/libraries/buddy/default.nix +++ b/pkgs/development/libraries/buddy/default.nix @@ -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 = { diff --git a/pkgs/development/libraries/cwiid/default.nix b/pkgs/development/libraries/cwiid/default.nix index ee646b24c81a..246dd009820c 100644 --- a/pkgs/development/libraries/cwiid/default.nix +++ b/pkgs/development/libraries/cwiid/default.nix @@ -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 diff --git a/pkgs/development/libraries/dbus-cplusplus/default.nix b/pkgs/development/libraries/dbus-cplusplus/default.nix index 6190f6ddc52a..163b0f4be883 100644 --- a/pkgs/development/libraries/dbus-cplusplus/default.nix +++ b/pkgs/development/libraries/dbus-cplusplus/default.nix @@ -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; diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix index 39ff74681690..1b5facbc0d06 100644 --- a/pkgs/development/libraries/flatpak/default.nix +++ b/pkgs/development/libraries/flatpak/default.nix @@ -45,6 +45,10 @@ stdenv.mkDerivation rec { doCheck = false; # TODO: some issues with temporary files + NIX_LDFLAGS = [ + "-lpthread" + ]; + enableParallelBuilding = true; configureFlags = [ diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 6bc2ea8af896..0cdfd1f4a7b6 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -39,4 +39,6 @@ stdenv.mkDerivation rec { libintl ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit CoreFoundation DiskArbitration ]); + + NIX_LDFLAGS = [ "-lm" ]; } diff --git a/pkgs/development/libraries/libfakekey/default.nix b/pkgs/development/libraries/libfakekey/default.nix index fa04655341d4..2a8e461d27eb 100644 --- a/pkgs/development/libraries/libfakekey/default.nix +++ b/pkgs/development/libraries/libfakekey/default.nix @@ -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"; diff --git a/pkgs/development/libraries/libmatchbox/default.nix b/pkgs/development/libraries/libmatchbox/default.nix index 798aef8e7da7..8ff02b49e584 100644 --- a/pkgs/development/libraries/libmatchbox/default.nix +++ b/pkgs/development/libraries/libmatchbox/default.nix @@ -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"; diff --git a/pkgs/development/python-modules/sipsimple/default.nix b/pkgs/development/python-modules/sipsimple/default.nix index 1df36dcf5d0a..bf76166d73b4 100644 --- a/pkgs/development/python-modules/sipsimple/default.nix +++ b/pkgs/development/python-modules/sipsimple/default.nix @@ -25,6 +25,7 @@ buildPythonPackage rec { preConfigure = '' chmod +x ./deps/pjsip/configure ./deps/pjsip/aconfigure + export LD=$CC ''; nativeBuildInputs = [ pkgs.pkgconfig ]; diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix index 1b4a4b7f50b2..929dfc61ba33 100644 --- a/pkgs/development/tools/database/sqlitebrowser/default.nix +++ b/pkgs/development/tools/database/sqlitebrowser/default.nix @@ -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 diff --git a/pkgs/games/airstrike/default.nix b/pkgs/games/airstrike/default.nix index a0bbd3b1c671..02ea6f688069 100644 --- a/pkgs/games/airstrike/default.nix +++ b/pkgs/games/airstrike/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper SDL SDL_image ]; + NIX_LDFLAGS = [ + "-lm" + ]; + installPhase = '' ls -l mkdir -p $out/bin diff --git a/pkgs/games/eboard/default.nix b/pkgs/games/eboard/default.nix index bed3abccf9b4..206ed02e69ce 100644 --- a/pkgs/games/eboard/default.nix +++ b/pkgs/games/eboard/default.nix @@ -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"; diff --git a/pkgs/games/egoboo/default.nix b/pkgs/games/egoboo/default.nix index 29ad352c3168..98ab4d27d5f5 100644 --- a/pkgs/games/egoboo/default.nix +++ b/pkgs/games/egoboo/default.nix @@ -44,6 +44,10 @@ stdenv.mkDerivation rec { ''; */ + NIX_LDFLAGS = [ + "-lm" + ]; + meta = { description = "3D dungeon crawling adventure"; diff --git a/pkgs/games/globulation/default.nix b/pkgs/games/globulation/default.nix index 0c3b184b4952..a539b79339f9 100644 --- a/pkgs/games/globulation/default.nix +++ b/pkgs/games/globulation/default.nix @@ -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 ]; diff --git a/pkgs/games/gnujump/default.nix b/pkgs/games/gnujump/default.nix index ae2cbd818417..d4cbb04f39b8 100644 --- a/pkgs/games/gnujump/default.nix +++ b/pkgs/games/gnujump/default.nix @@ -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"; diff --git a/pkgs/games/opendungeons/default.nix b/pkgs/games/opendungeons/default.nix index 2a162525388f..3c4e85a91e5a 100644 --- a/pkgs/games/opendungeons/default.nix +++ b/pkgs/games/opendungeons/default.nix @@ -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."; diff --git a/pkgs/os-specific/linux/rtkit/default.nix b/pkgs/os-specific/linux/rtkit/default.nix index 059b09449619..78bcd925aea0 100644 --- a/pkgs/os-specific/linux/rtkit/default.nix +++ b/pkgs/os-specific/linux/rtkit/default.nix @@ -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; diff --git a/pkgs/servers/web-apps/fileshelter/default.nix b/pkgs/servers/web-apps/fileshelter/default.nix index 01fb8c624820..d7510e7d1e03 100644 --- a/pkgs/servers/web-apps/fileshelter/default.nix +++ b/pkgs/servers/web-apps/fileshelter/default.nix @@ -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 ''; diff --git a/pkgs/tools/filesystems/svnfs/default.nix b/pkgs/tools/filesystems/svnfs/default.nix index 333714182177..ebfb211732e8 100644 --- a/pkgs/tools/filesystems/svnfs/default.nix +++ b/pkgs/tools/filesystems/svnfs/default.nix @@ -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"; diff --git a/pkgs/tools/misc/parcellite/default.nix b/pkgs/tools/misc/parcellite/default.nix index 37073daa699d..1e747961499c 100644 --- a/pkgs/tools/misc/parcellite/default.nix +++ b/pkgs/tools/misc/parcellite/default.nix @@ -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. diff --git a/pkgs/tools/misc/qjoypad/default.nix b/pkgs/tools/misc/qjoypad/default.nix index 6a5e674b698b..4d91c184b0ae 100644 --- a/pkgs/tools/misc/qjoypad/default.nix +++ b/pkgs/tools/misc/qjoypad/default.nix @@ -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 diff --git a/pkgs/tools/networking/dsniff/default.nix b/pkgs/tools/networking/dsniff/default.nix index 41acb533a3de..50a3c98af0f7 100644 --- a/pkgs/tools/networking/dsniff/default.nix +++ b/pkgs/tools/networking/dsniff/default.nix @@ -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 diff --git a/pkgs/tools/networking/ssmtp/default.nix b/pkgs/tools/networking/ssmtp/default.nix index 4c906812f64d..22f60bfcee55 100644 --- a/pkgs/tools/networking/ssmtp/default.nix +++ b/pkgs/tools/networking/ssmtp/default.nix @@ -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; diff --git a/pkgs/tools/system/gdmap/default.nix b/pkgs/tools/system/gdmap/default.nix index 72938216b0a4..0c254bb28545 100644 --- a/pkgs/tools/system/gdmap/default.nix +++ b/pkgs/tools/system/gdmap/default.nix @@ -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"; diff --git a/pkgs/tools/text/multitran/libmtquery/default.nix b/pkgs/tools/text/multitran/libmtquery/default.nix index 153184bf70f3..8b2032dcaba5 100644 --- a/pkgs/tools/text/multitran/libmtquery/default.nix +++ b/pkgs/tools/text/multitran/libmtquery/default.nix @@ -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@' \ diff --git a/pkgs/tools/text/qshowdiff/default.nix b/pkgs/tools/text/qshowdiff/default.nix index 761a498bcfb6..e3970c059027 100644 --- a/pkgs/tools/text/qshowdiff/default.nix +++ b/pkgs/tools/text/qshowdiff/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { configurePhase = '' mkdir -p $out/{bin,man/man1} - makeFlags="PREFIX=$out" + makeFlags="PREFIX=$out CC=$CXX" ''; meta = {