diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 642aedc3f24..1654d31cfeb 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -98,9 +98,9 @@ in { package = mkOption { type = types.package; - default = pulseaudioLight; - defaultText = "pkgs.pulseaudioLight"; - example = literalExample "pkgs.pulseaudioFull"; + default = pulseaudioLight.out; + defaultText = "pkgs.pulseaudioLight.out"; + example = literalExample "pkgs.pulseaudioFull.out"; description = '' The PulseAudio derivation to use. This can be used to enable features (such as JACK support, Bluetooth) via the diff --git a/nixos/modules/services/x11/desktop-managers/kde5.nix b/nixos/modules/services/x11/desktop-managers/kde5.nix index 4f74d5732af..70dc1ac2a26 100644 --- a/nixos/modules/services/x11/desktop-managers/kde5.nix +++ b/nixos/modules/services/x11/desktop-managers/kde5.nix @@ -62,17 +62,25 @@ in ${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1" ''} - exec startkde + exec "${kde5.startkde}" + ''; }; - security.setuidOwners = singleton { - program = "kcheckpass"; - source = "${kde5.plasma-workspace.out}/lib/libexec/kcheckpass"; - owner = "root"; - group = "root"; - setuid = true; - }; + security.setuidOwners = [ + { + program = "kcheckpass"; + source = "${kde5.plasma-workspace}/lib/libexec/kcheckpass"; + owner = "root"; + setuid = true; + } + { + program = "start_kdeinit_wrapper"; + source = "${kde5.plasma-workspace}/lib/libexec/kf5/start_kdeinit_wrapper"; + owner = "root"; + setuid = true; + } + ]; environment.systemPackages = [ diff --git a/pkgs/applications/altcoins/memorycoin.nix b/pkgs/applications/altcoins/memorycoin.nix index 4e5e24e3062..0470fd21eae 100644 --- a/pkgs/applications/altcoins/memorycoin.nix +++ b/pkgs/applications/altcoins/memorycoin.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, openssl, db48, boost -, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode +, zlib, miniupnpc, qt4, qmake4Hook, utillinux, protobuf, qrencode , withGui }: with stdenv.lib; @@ -15,13 +15,11 @@ stdenv.mkDerivation rec{ buildInputs = [ pkgconfig openssl db48 boost zlib miniupnpc utillinux protobuf ] - ++ optionals withGui [ qt4 qrencode ]; + ++ optionals withGui [ qt4 qmake4Hook qrencode ]; configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] ++ optionals withGui [ "--with-gui=qt4" ]; - configurePhase = optional withGui "qmake"; - preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile"; installPhase = diff --git a/pkgs/applications/altcoins/namecoin.nix b/pkgs/applications/altcoins/namecoin.nix index f2e2aae698e..563363b8baf 100644 --- a/pkgs/applications/altcoins/namecoin.nix +++ b/pkgs/applications/altcoins/namecoin.nix @@ -1,4 +1,4 @@ -{ stdenv, db4, boost, openssl, qt4, miniupnpc, unzip, namecoind }: +{ stdenv, db4, boost, openssl, qt4, qmake4Hook, miniupnpc, unzip, namecoind }: with stdenv.lib; stdenv.mkDerivation rec { @@ -7,15 +7,9 @@ stdenv.mkDerivation rec { version = namecoind.version; src = namecoind.src; - buildInputs = [ db4 boost openssl unzip qt4 miniupnpc ]; + buildInputs = [ db4 boost openssl unzip qt4 qmake4Hook miniupnpc ]; - configurePhase = '' - qmake USE_UPNP=- - ''; - - buildPhase = '' - make - ''; + qmakeFlags = [ "USE_UPNP=-" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/altcoins/primecoin.nix b/pkgs/applications/altcoins/primecoin.nix index 61bba04cb6a..360a39a4fd8 100644 --- a/pkgs/applications/altcoins/primecoin.nix +++ b/pkgs/applications/altcoins/primecoin.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, openssl, db48, boost -, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode +, zlib, miniupnpc, qt4, qmake4Hook, utillinux, protobuf, qrencode , withGui }: with stdenv.lib; @@ -15,13 +15,11 @@ stdenv.mkDerivation rec{ buildInputs = [ pkgconfig openssl db48 boost zlib miniupnpc utillinux protobuf ] - ++ optionals withGui [ qt4 qrencode ]; + ++ optionals withGui [ qt4 qmake4Hook qrencode ]; configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] ++ optionals withGui [ "--with-gui=qt4" ]; - configurePhase = optional withGui "qmake"; - preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile"; installPhase = diff --git a/pkgs/applications/audio/dfasma/default.nix b/pkgs/applications/audio/dfasma/default.nix index 94f20bc543e..d006f2c0178 100644 --- a/pkgs/applications/audio/dfasma/default.nix +++ b/pkgs/applications/audio/dfasma/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, makeQtWrapper }: +{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmakeHook, makeQtWrapper }: let @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { owner = "gillesdegottex"; }; - buildInputs = [ fftw libsndfile qtbase qtmultimedia ]; + buildInputs = [ fftw libsndfile qtbase qtmultimedia qmakeHook ]; nativeBuildInputs = [ makeQtWrapper ]; @@ -47,10 +47,8 @@ in stdenv.mkDerivation rec { cp -Rv "${libqaudioextra.src}"/* external/libqaudioextra ''; - configurePhase = '' - runHook preConfigure - qmake PREFIX=$out PREFIXSHORTCUT=$out dfasma.pro - runHook postConfigure + preConfigure = '' + qmakeFlags="$qmakeFlags PREFIXSHORTCUT=$out" ''; enableParallelBuilding = true; diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix index c27e049a4ae..83367b83e48 100644 --- a/pkgs/applications/audio/fmit/default.nix +++ b/pkgs/applications/audio/fmit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, freeglut, qtbase, qtmultimedia +{ stdenv, fetchFromGitHub, fftw, freeglut, mesa_glu, qtbase, qtmultimedia, qmakeHook , alsaSupport ? true, alsaLib ? null , jackSupport ? false, libjack2 ? null , portaudioSupport ? false, portaudio ? null }: @@ -18,22 +18,17 @@ stdenv.mkDerivation rec { owner = "gillesdegottex"; }; - buildInputs = [ fftw freeglut qtbase qtmultimedia ] + buildInputs = [ fftw freeglut mesa_glu qtbase qtmultimedia qmakeHook ] ++ stdenv.lib.optionals alsaSupport [ alsaLib ] ++ stdenv.lib.optionals jackSupport [ libjack2 ] ++ stdenv.lib.optionals portaudioSupport [ portaudio ]; - configurePhase = '' - runHook preConfigure - mkdir build - cd build - qmake \ + preConfigure = '' + qmakeFlags="$qmakeFlags \ CONFIG+=${stdenv.lib.optionalString alsaSupport "acs_alsa"} \ CONFIG+=${stdenv.lib.optionalString jackSupport "acs_jack"} \ CONFIG+=${stdenv.lib.optionalString portaudioSupport "acs_portaudio"} \ - PREFIX="$out" PREFIXSHORTCUT="$out" \ - ../fmit.pro - runHook postConfigure + PREFIXSHORTCUT=$out" ''; enableParallelBuilding = true; diff --git a/pkgs/applications/audio/iannix/default.nix b/pkgs/applications/audio/iannix/default.nix index f17abf97521..83fd2b14ed2 100644 --- a/pkgs/applications/audio/iannix/default.nix +++ b/pkgs/applications/audio/iannix/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qt5 +{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmakeHook }: stdenv.mkDerivation rec { @@ -11,13 +11,9 @@ stdenv.mkDerivation rec { sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj"; }; - buildInputs = [ alsaLib pkgconfig qt5.qtbase qt5.qtscript ]; + buildInputs = [ alsaLib pkgconfig qtbase qtscript qmakeHook ]; - configurePhase = '' - runHook preConfigure - qmake PREFIX=/ - runHook postConfigure - ''; + qmakeFlags = [ "PREFIX=/" ]; installFlags = [ "INSTALL_ROOT=$(out)" ]; diff --git a/pkgs/applications/audio/keyfinder/default.nix b/pkgs/applications/audio/keyfinder/default.nix index 049920d2807..0cacd772493 100644 --- a/pkgs/applications/audio/keyfinder/default.nix +++ b/pkgs/applications/audio/keyfinder/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, taglib }: +{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmakeHook, taglib }: stdenv.mkDerivation rec { name = "keyfinder-${version}"; @@ -11,21 +11,14 @@ stdenv.mkDerivation rec { owner = "ibsh"; }; - buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns taglib ]; + buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns qmakeHook taglib ]; postPatch = '' substituteInPlace is_KeyFinder.pro \ --replace "keyfinder.0" "keyfinder" \ - --replace '$$[QT_INSTALL_PREFIX]' "$out" \ --replace "-stdlib=libc++" "" ''; - configurePhase = '' - runHook preConfigure - qmake - runHook postConfigure - ''; - enableParallelBuilding = true; meta = with stdenv.lib; { diff --git a/pkgs/applications/audio/qtscrobbler/default.nix b/pkgs/applications/audio/qtscrobbler/default.nix index e7108ebe487..453da89953e 100644 --- a/pkgs/applications/audio/qtscrobbler/default.nix +++ b/pkgs/applications/audio/qtscrobbler/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4 }: +{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "qtscrobbler-${version}"; @@ -9,18 +9,16 @@ stdenv.mkDerivation rec { sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba"; }; - nativeBuildInputs = lib.optionals withMtp [ pkgconfig which ]; + nativeBuildInputs = [ qmake4Hook ] ++ lib.optionals withMtp [ pkgconfig which ]; buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp; enableParallelBuilding = true; postPatch = '' cd src - sed -i "s,/usr/local,$out," common.pri + sed -i -e "s,/usr/local,$out," -e "s,/usr,," common.pri ''; - configurePhase = "qmake"; - meta = with lib; { description = "Qt based last.fm scrobbler"; longDescription = '' diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix index ae7a39240a5..31a95c51fc5 100644 --- a/pkgs/applications/audio/sonic-visualiser/default.nix +++ b/pkgs/applications/audio/sonic-visualiser/default.nix @@ -3,7 +3,7 @@ { stdenv, fetchurl, alsaLib, bzip2, fftw, libjack2, libX11, liblo , libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate , libsndfile, pkgconfig, libpulseaudio, makeQtWrapper, qtbase, redland -, rubberband, serd, sord, vampSDK, fftwFloat +, qmakeHook, rubberband, serd, sord, vampSDK, fftwFloat }: stdenv.mkDerivation rec { @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ libsndfile qtbase fftw fftwFloat bzip2 librdf rubberband + [ libsndfile qtbase qmakeHook fftw fftwFloat bzip2 librdf rubberband libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland serd sord @@ -32,13 +32,12 @@ stdenv.mkDerivation rec { libX11 ]; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ makeQtWrapper qmakeHook ]; - buildPhase = '' + configurePhase = '' for i in sonic-visualiser svapp svcore svgui; - do cd $i && qmake -makefile PREFIX=$out && cd ..; + do cd $i && qmake PREFIX=$out && cd ..; done - make ''; installPhase = '' diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix index bc9163e63cb..eedb674b472 100644 --- a/pkgs/applications/editors/focuswriter/default.nix +++ b/pkgs/applications/editors/focuswriter/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, qt4, pkgconfig, hunspell}: +{ stdenv, fetchurl, qt4, qmake4Hook, pkgconfig, hunspell }: stdenv.mkDerivation rec { name = "focuswriter-${version}"; @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { sha256 = "1i58jxbiy95ijf81g8c3gwxhcg3irzssna3wv7vhrd57g4lcfj0w"; }; - buildInputs = [ qt4 pkgconfig hunspell ]; + buildInputs = [ qt4 qmake4Hook pkgconfig hunspell ]; - configurePhase = "qmake PREFIX=/"; + qmakeFlags = [ "PREFIX=/" ]; - installPhase = "make install INSTALL_ROOT=$out"; + installFlags = [ "INSTALL_ROOT=$(out)" ]; meta = { description = "Simple, distraction-free writing environment"; diff --git a/pkgs/applications/editors/texmaker/default.nix b/pkgs/applications/editors/texmaker/default.nix index 04ebf195108..83165f0a505 100644 --- a/pkgs/applications/editors/texmaker/default.nix +++ b/pkgs/applications/editors/texmaker/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, poppler_qt4, zlib, pkgconfig, poppler}: +{ stdenv, fetchurl, qt4, qmake4Hook, poppler_qt4, zlib, pkgconfig, poppler }: stdenv.mkDerivation rec { pname = "texmaker"; @@ -11,11 +11,11 @@ stdenv.mkDerivation rec { }; buildInputs = [ qt4 poppler_qt4 zlib ]; - nativeBuildInputs = [ pkgconfig poppler ]; + nativeBuildInputs = [ pkgconfig poppler qmake4Hook ]; NIX_CFLAGS_COMPILE="-I${poppler}/include/poppler"; preConfigure = '' - qmake PREFIX=$out DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps texmaker.pro + qmakeFlags="$qmakeFlags DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix index 4b0cccae364..4accf1cad67 100644 --- a/pkgs/applications/editors/texstudio/default.nix +++ b/pkgs/applications/editors/texstudio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, poppler_qt4, zlib, pkgconfig}: +{ stdenv, fetchurl, qt4, qmake4Hook, poppler_qt4, zlib, pkgconfig}: stdenv.mkDerivation rec { pname = "texstudio"; @@ -11,11 +11,9 @@ stdenv.mkDerivation rec { sha256 = "1smmc4xqs8x8qzp6iqj2wr4xarfnxxxp6rq6chx1kb256w75jwfw"; }; - buildInputs = [ qt4 poppler_qt4 zlib pkgconfig]; + buildInputs = [ qt4 qmake4Hook poppler_qt4 zlib pkgconfig ]; - preConfigure = '' - qmake PREFIX=$out NO_APPDATA=True texstudio.pro - ''; + qmakeFlags = [ "NO_APPDATA=True" ]; meta = with stdenv.lib; { description = "TeX and LaTeX editor"; diff --git a/pkgs/applications/editors/tiled/default.nix b/pkgs/applications/editors/tiled/default.nix index 059b85cee5f..e4b2f0461c2 100644 --- a/pkgs/applications/editors/tiled/default.nix +++ b/pkgs/applications/editors/tiled/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qttools, pkgconfig, python }: +{ stdenv, fetchurl, qtbase, qttools, qmakeHook, pkgconfig, python }: let version = "0.12.3"; @@ -13,9 +13,7 @@ stdenv.mkDerivation rec { inherit sha256; }; - buildInputs = [ qtbase qttools pkgconfig python ]; - - preConfigure = "qmake -r PREFIX=$out"; + buildInputs = [ qtbase qttools qmakeHook pkgconfig python ]; meta = { description = "A free, easy to use and flexible tile map editor"; diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix index fa9a7e0fdd3..50b33096e3d 100644 --- a/pkgs/applications/graphics/antimony/default.nix +++ b/pkgs/applications/graphics/antimony/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, libpng, python3, boost, mesa, qtbase, ncurses }: +{ stdenv, fetchgit, libpng, python3, boost, mesa, qtbase, qmakeHook, ncurses }: let gitRev = "745eca3a2d2657c495d5509e9083c884e021d09c"; @@ -31,16 +31,14 @@ in mesa qtbase ncurses ]; - configurePhase = '' - runHook preConfigure + nativeBuildHooks = [ qmakeHook ]; + + preConfigure = '' export GITREV=${gitRev} export GITBRANCH=${gitBranch} export GITTAG=${gitTag} cd qt - export sourceRoot=$sourceRoot/qt - qmake antimony.pro PREFIX=$out - runHook postConfigure ''; enableParallelBuilding = true; diff --git a/pkgs/applications/graphics/awesomebump/default.nix b/pkgs/applications/graphics/awesomebump/default.nix index c71b1f9335b..b89e18ed148 100644 --- a/pkgs/applications/graphics/awesomebump/default.nix +++ b/pkgs/applications/graphics/awesomebump/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, qtbase, makeWrapper }: +{ lib, stdenv, fetchurl, qtbase, qmakeHook, makeWrapper }: stdenv.mkDerivation { name = "awesomebump-4.0"; @@ -10,9 +10,7 @@ stdenv.mkDerivation { setSourceRoot = "sourceRoot=$(echo */Sources)"; - buildInputs = [ qtbase makeWrapper ]; - - preBuild = "qmake"; + buildInputs = [ qtbase qmakeHook makeWrapper ]; enableParallelBuilding = true; diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix index 9ca9c592102..884dc115853 100644 --- a/pkgs/applications/graphics/leocad/default.nix +++ b/pkgs/applications/graphics/leocad/default.nix @@ -3,7 +3,7 @@ To use aditional parts libraries set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/ */ -{ stdenv, fetchsvn, qt4, zlib }: +{ stdenv, fetchsvn, qt4, qmake4Hook, zlib }: stdenv.mkDerivation rec { name = "leocad-${version}"; @@ -14,12 +14,11 @@ stdenv.mkDerivation rec { sha256 = "1190gb437ls51hhfiwa79fq131026kywpy3j3k4fkdgfr8a9v3q8"; }; - buildInputs = [ qt4 zlib ]; + buildInputs = [ qt4 qmake4Hook zlib ]; - prefixKey = "INSTALL_PREFIX="; - configureScript = "qmake leocad.pro"; postPatch = '' substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan(" + export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/graphics/meshlab/default.nix b/pkgs/applications/graphics/meshlab/default.nix index 49bfb47c85a..d8434de5a77 100644 --- a/pkgs/applications/graphics/meshlab/default.nix +++ b/pkgs/applications/graphics/meshlab/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip}: +{ stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip, vcg }: stdenv.mkDerivation rec { name = "meshlab-1.3.3"; @@ -16,8 +16,6 @@ stdenv.mkDerivation rec { buildPhase = '' mkdir -p "$out/include" - cp -r vcglib "$out/include" - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$out/include/vcglib" export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS" cd meshlab/src pushd external @@ -38,7 +36,7 @@ stdenv.mkDerivation rec { sourceRoot = "."; - buildInputs = [ qt4 unzip ]; + buildInputs = [ qt4 unzip vcg ]; meta = { description = "System for the processing and editing of unstructured 3D triangular meshes"; diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix index 7557e19896f..f3b16a30460 100644 --- a/pkgs/applications/graphics/openscad/default.nix +++ b/pkgs/applications/graphics/openscad/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, bison, flex, eigen, boost, mesa, glew, opencsg, cgal +{ stdenv, fetchurl, qt4, qmake4Hook, bison, flex, eigen, boost, mesa, glew, opencsg, cgal , mpfr, gmp, glib, pkgconfig, harfbuzz, qscintilla, gettext }: @@ -12,13 +12,11 @@ stdenv.mkDerivation rec { }; buildInputs = [ - qt4 bison flex eigen boost mesa glew opencsg cgal mpfr gmp glib + qt4 qmake4Hook bison flex eigen boost mesa glew opencsg cgal mpfr gmp glib pkgconfig harfbuzz qscintilla gettext ]; - configurePhase = '' - qmake PREFIX="$out" VERSION=${version} - ''; + qmakeFlags = [ "VERSION=${version}" ]; doCheck = false; diff --git a/pkgs/applications/graphics/phototonic/default.nix b/pkgs/applications/graphics/phototonic/default.nix index 4ed3a424031..4782376d1e0 100644 --- a/pkgs/applications/graphics/phototonic/default.nix +++ b/pkgs/applications/graphics/phototonic/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, exiv2 }: +{ stdenv, fetchFromGitHub, qtbase, qmakeHook, exiv2 }: stdenv.mkDerivation rec { name = "phototonic-${version}"; @@ -14,16 +14,12 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase exiv2 ]; + nativeBuildInputs = [ qmakeHook ]; - configurePhase = '' - runHook preConfigure - sed -i 's;/usr;;' phototonic.pro - qmake PREFIX="" - runHook postConfigure + preConfigure = '' + sed -i 's;/usr;$$PREFIX/;g' phototonic.pro ''; - installFlags = [ "INSTALL_ROOT=$(out)" ]; - meta = with stdenv.lib; { description = "An image viewer and organizer"; homepage = http://oferkv.github.io/phototonic/; diff --git a/pkgs/applications/graphics/qtpfsgui/default.nix b/pkgs/applications/graphics/qtpfsgui/default.nix index efa245cc7e9..5223ae14c63 100644 --- a/pkgs/applications/graphics/qtpfsgui/default.nix +++ b/pkgs/applications/graphics/qtpfsgui/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, qt4, exiv2, openexr, fftwSinglePrec, libtiff, ilmbase }: +{stdenv, fetchurl, qt4, qmake4Hook, exiv2, openexr, fftwSinglePrec, libtiff, ilmbase }: stdenv.mkDerivation rec { name = "qtpfsgui-1.9.3"; @@ -9,15 +9,19 @@ stdenv.mkDerivation rec { }; buildInputs = [ qt4 exiv2 openexr fftwSinglePrec libtiff ]; + nativeBuildInputs = [ qmake4Hook ]; - configurePhase = '' + preConfigure = '' export CPATH="${ilmbase}/include/OpenEXR:$CPATH" - qmake PREFIX=$out EXIV2PATH=${exiv2}/include/exiv2 \ - OPENEXRDIR=${openexr}/include/OpenEXR \ - FFTW3DIR=${fftwSinglePrec}/include \ - LIBTIFFDIR=${libtiff}/include ''; + qmakeFlags = [ + "EXIV2PATH=${exiv2}/include/exiv2" + "OPENEXRDIR=${openexr}/include/OpenEXR" + "FFTW3DIR=${fftwSinglePrec}/include" + "LIBTIFFDIR=${libtiff}/include" + ]; + meta = { homepage = http://qtpfsgui.sourceforge.net/; description = "Qtpfsqui, a graphical application for high dynamic range (HDR) imaging"; diff --git a/pkgs/applications/graphics/rapcad/default.nix b/pkgs/applications/graphics/rapcad/default.nix index 90cb360e7d5..d5d6e27219f 100644 --- a/pkgs/applications/graphics/rapcad/default.nix +++ b/pkgs/applications/graphics/rapcad/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, cgal, boost, gmp, mpfr, flex, bison, dxflib, readline -, qtbase +, qtbase, qmakeHook, mesa_glu }: stdenv.mkDerivation rec { @@ -12,14 +12,7 @@ stdenv.mkDerivation rec { sha256 = "15c18jvgbwyrfhv7r35ih0gzx35vjlsbi984h1sckgh2z17hjq8l"; }; - buildInputs = [ qtbase cgal boost gmp mpfr flex bison dxflib readline ]; - - configurePhase = '' - runHook preConfigure - qmake - sed -e "s@/usr/@$out/@g" -i $(find . -name Makefile) - runHook postConfigure - ''; + buildInputs = [ qtbase qmakeHook cgal boost gmp mpfr flex bison dxflib readline mesa_glu ]; meta = { license = stdenv.lib.licenses.gpl3; diff --git a/pkgs/applications/misc/cool-retro-term/default.nix b/pkgs/applications/misc/cool-retro-term/default.nix index 67b9b601139..9ffa36adc12 100644 --- a/pkgs/applications/misc/cool-retro-term/default.nix +++ b/pkgs/applications/misc/cool-retro-term/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, makeQtWrapper, qtbase, qtquick1, qmltermwidget, -qtquickcontrols, qtgraphicaleffects }: +qtquickcontrols, qtgraphicaleffects, qmakeHook }: stdenv.mkDerivation rec { version = "1.0.0"; @@ -17,15 +17,9 @@ stdenv.mkDerivation rec { ''; buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ]; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ makeQtWrapper qmakeHook ]; - configurePhase = '' - runHook preConfigure - qmake PREFIX=$out - runHook postConfigure - ''; - - installPhase = "make -j $NIX_BUILD_CORES INSTALL_ROOT=$out install"; + installFlags = [ "INSTALL_ROOT=$(out)" ]; preFixup = '' mv $out/usr/share $out/share diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix index aefa4f755b8..666c3a40cdc 100644 --- a/pkgs/applications/misc/diffpdf/default.nix +++ b/pkgs/applications/misc/diffpdf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, poppler_qt4 }: +{ stdenv, fetchurl, qt4, poppler_qt4, qmake4Hook }: stdenv.mkDerivation rec { version = "2.1.3"; @@ -12,13 +12,12 @@ stdenv.mkDerivation rec { patches = [ ./fix_path_poppler_qt4.patch ]; buildInputs = [ qt4 poppler_qt4 ]; + nativeBuildInputs = [ qmake4Hook ]; - preBuild = '' + preConfigure = '' substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4} - [ -e "*.qm" ] && make clean lrelease diffpdf.pro - qmake -makefile PREFIX=\$out - ''; + ''; installPhase = '' mkdir -p $out/bin $out/share/man/man1 diff --git a/pkgs/applications/misc/evopedia/default.nix b/pkgs/applications/misc/evopedia/default.nix index b7403d4826b..b235da697d5 100644 --- a/pkgs/applications/misc/evopedia/default.nix +++ b/pkgs/applications/misc/evopedia/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit, bzip2, qt4, libX11}: +{ stdenv, fetchgit, bzip2, qt4, qmake4Hook, libX11 }: stdenv.mkDerivation rec { name = "evopedia-${version}"; @@ -10,11 +10,8 @@ stdenv.mkDerivation rec { sha256 = "1biq9zaj8nhxx1pixidsn97iwp9qy1yslgl0znpa4d4p35jcg48g"; }; - configurePhase = '' - qmake PREFIX=$out - ''; - buildInputs = [ bzip2 qt4 libX11 ]; + nativeBuildInputs = [ qmake4Hook ]; meta = { description = "Offline Wikipedia Viewer"; diff --git a/pkgs/applications/misc/freicoin/default.nix b/pkgs/applications/misc/freicoin/default.nix index 65265fc07a5..b4e71d4bbc7 100644 --- a/pkgs/applications/misc/freicoin/default.nix +++ b/pkgs/applications/misc/freicoin/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, db, boost, gmp, mpfr, miniupnpc, qt4, unzip }: +{ fetchurl, stdenv, db, boost, gmp, mpfr, miniupnpc, qt4, qmake4Hook, unzip }: stdenv.mkDerivation rec { version = "0.8.3-1"; @@ -11,9 +11,7 @@ stdenv.mkDerivation rec { # I think that openssl and zlib are required, but come through other # packages - buildInputs = [ db boost gmp mpfr miniupnpc qt4 unzip ]; - - configurePhase = "qmake"; + buildInputs = [ db boost gmp mpfr miniupnpc qt4 unzip qmake4Hook ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix index 799746ee6bd..56b1d2a0029 100644 --- a/pkgs/applications/misc/golden-cheetah/default.nix +++ b/pkgs/applications/misc/golden-cheetah/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia -, qttools, yacc, flex, zlib, config, makeQtWrapper }: +, qttools, yacc, flex, zlib, config, qmakeHook, makeQtWrapper }: stdenv.mkDerivation rec { name = "golden-cheetah-${version}"; version = "V4.0-DEV1603"; @@ -10,15 +10,14 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools yacc flex zlib ]; - nativeBuildInputs = [ makeQtWrapper ]; - configurePhase = '' - runHook preConfigure + nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + preConfigure = '' cp src/gcconfig.pri.in src/gcconfig.pri cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri echo 'QMAKE_LRELEASE = ${qttools}/bin/lrelease' >> src/gcconfig.pri sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local - qmake PREFIX=$out build.pro ''; + #postConfigure = # + ( # with (config.golden-cheetah); # stdenv.lib.optionalString (dropbox-client-id != null && dropbox-client-secret != null) '' diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix index 9a7fad6a207..36840c656d3 100644 --- a/pkgs/applications/misc/goldendict/default.nix +++ b/pkgs/applications/misc/goldendict/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, pkgconfig, qt4, libXtst, libvorbis, hunspell, libao, ffmpeg, libeb, lzo, xz, libtiff }: +{ stdenv, fetchFromGitHub, pkgconfig, qt4, qmake4Hook, libXtst, libvorbis, hunspell +, libao, ffmpeg, libeb, lzo, xz, libtiff }: stdenv.mkDerivation rec { name = "goldendict-1.5.0.ec86515"; src = fetchFromGitHub { @@ -8,10 +9,12 @@ stdenv.mkDerivation rec { sha256 = "070majwxbn15cy7sbgz7ljl8rkn7vcgkm10884v97csln7bfzwhr"; }; - buildInputs = [ pkgconfig qt4 libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff ]; - configurePhase = '' - qmake PREFIX=$out 'CONFIG+=zim_support' - ''; + buildInputs = [ + pkgconfig qt4 libXtst libvorbis hunspell libao ffmpeg libeb + lzo xz libtiff qmake4Hook + ]; + + qmakeFlags = [ "CONFIG+=zim_support" ]; meta = { homepage = http://goldendict.org/; diff --git a/pkgs/applications/misc/gqrx/default.nix b/pkgs/applications/misc/gqrx/default.nix index d30b6b8e8f9..3fda4d8881a 100644 --- a/pkgs/applications/misc/gqrx/default.nix +++ b/pkgs/applications/misc/gqrx/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qt4, gnuradio, boost, gnuradio-osmosdr +{ stdenv, fetchFromGitHub, qt4, qmake4Hook, gnuradio, boost, gnuradio-osmosdr # drivers (optional): , rtl-sdr, hackrf , pulseaudioSupport ? true, libpulseaudio @@ -17,12 +17,12 @@ stdenv.mkDerivation rec { sha256 = "02pavd1kc0gsnrl18bfa01r2f3j4j05zly4a8zwss9yrsgf8432x"; }; + nativeBuildInputs = [ qmake4Hook ]; + buildInputs = [ qt4 gnuradio boost gnuradio-osmosdr rtl-sdr hackrf ] ++ stdenv.lib.optionals pulseaudioSupport [ libpulseaudio ]; - configurePhase = ''qmake PREFIX="$out"''; - enableParallelBuilding = true; postInstall = '' diff --git a/pkgs/applications/misc/keepassx/default.nix b/pkgs/applications/misc/keepassx/default.nix index 3d078d59be6..d0bddbc1610 100644 --- a/pkgs/applications/misc/keepassx/default.nix +++ b/pkgs/applications/misc/keepassx/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bzip2, qt4, libX11, xextproto, libXtst }: +{ stdenv, fetchurl, bzip2, qt4, qmake4Hook, libX11, xextproto, libXtst }: stdenv.mkDerivation rec { name = "keepassx-${version}"; @@ -9,14 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1i5dq10x28mg7m4c0yacm32xfj4j7imir4ph8x9p0s2ym260c9ry"; }; - configurePhase = '' - qmake PREFIX=$out - ''; - patches = [ ./random.patch ]; buildInputs = [ bzip2 qt4 libX11 xextproto libXtst ]; + nativeBuildInputs = [ qmake4Hook ]; + meta = { description = "Qt password manager compatible with its Win32 and Pocket PC versions"; homepage = http://www.keepassx.org/; diff --git a/pkgs/applications/misc/librecad/default.nix b/pkgs/applications/misc/librecad/default.nix index b41ef70394e..d5c04ba555a 100644 --- a/pkgs/applications/misc/librecad/default.nix +++ b/pkgs/applications/misc/librecad/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, muparser, which, boost, pkgconfig }: +{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }: stdenv.mkDerivation rec { version = "2.0.9"; @@ -15,9 +15,7 @@ stdenv.mkDerivation rec { sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp ''; - configurePhase = '' - qmake librecad.pro PREFIX=$out MUPARSER_DIR=${muparser} BOOST_DIR=${boost.dev} - ''; + qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ]; installPhase = '' mkdir -p $out/bin $out/share @@ -26,7 +24,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ qt4 muparser which boost ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig qmake4Hook ]; enableParallelBuilding = true; diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/applications/misc/merkaartor/default.nix index a270dca910c..5954316e50f 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/applications/misc/merkaartor/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, qt4, boost, proj, gdal_1_11}: +{ stdenv, fetchurl, qt4, qmake4Hook, boost, proj, gdal_1_11 }: stdenv.mkDerivation rec { name = "merkaartor-0.18.1"; @@ -7,12 +7,10 @@ stdenv.mkDerivation rec { sha256 = "17qk45pmlxqigla1915dvn9pp91y85d2bkcaap4g3m8mk1crcsix"; }; - configurePhase = '' - qmake -makefile PREFIX=$out - ''; - buildInputs = [ qt4 boost proj gdal_1_11 ]; + nativeBuildInputs = [ qmake4Hook ]; + meta = { description = "An openstreetmap editor"; homepage = http://merkaartor.org/; diff --git a/pkgs/applications/misc/multimon-ng/default.nix b/pkgs/applications/misc/multimon-ng/default.nix index f9aa567ed4b..a9f0cb2511a 100644 --- a/pkgs/applications/misc/multimon-ng/default.nix +++ b/pkgs/applications/misc/multimon-ng/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qt4, libpulseaudio }: +{ stdenv, fetchFromGitHub, qt4, qmake4Hook, libpulseaudio }: let version = "1.0.0"; in @@ -14,7 +14,7 @@ stdenv.mkDerivation { buildInputs = [ qt4 libpulseaudio ]; - preBuild = "qmake multimon-ng.pro"; + nativeBuildInputs = [ qmake4Hook ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/misc/navipowm/default.nix b/pkgs/applications/misc/navipowm/default.nix index 6d990831a36..447fc4570a7 100644 --- a/pkgs/applications/misc/navipowm/default.nix +++ b/pkgs/applications/misc/navipowm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4 }: +{ stdenv, fetchurl, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "navipowm-0.2.4"; @@ -7,9 +7,8 @@ stdenv.mkDerivation rec { sha256 = "1kdih8kwpgcgfh6l6njkr9gq2j5hv39xvzmzgvhip553kn6bss7b"; }; - configurePhase = '' + preConfigure = '' cd Qt/KDevelop - qmake ''; installPhase = '' @@ -20,6 +19,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ qt4 ]; + nativeBuildInputs = [ qmake4Hook ]; meta = { homepage = http://navipowm.sourceforge.net/; diff --git a/pkgs/applications/misc/openbrf/default.nix b/pkgs/applications/misc/openbrf/default.nix index 478f02b970e..70be67a4d28 100644 --- a/pkgs/applications/misc/openbrf/default.nix +++ b/pkgs/applications/misc/openbrf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qt4, vcg, glew }: +{ stdenv, fetchFromGitHub, qt4, qmake4Hook, vcg, glew }: stdenv.mkDerivation { name = "openbrf-2016-01-09"; @@ -10,18 +10,16 @@ stdenv.mkDerivation { sha256 = "0laikpz0ljz7l5fgapwj09ygizmvj1iywnpfgfd0i14j46s134xb"; }; - buildInputs = [ qt4 vcg glew ]; + buildInputs = [ qt4 qmake4Hook vcg glew ]; enableParallelBuilding = true; + qmakeFlags = [ "openBrf.pro" ]; + postPatch = '' sed -i 's,^VCGLIB .*,VCGLIB = ${vcg}/include,' openBrf.pro ''; - configurePhase = '' - qmake PREFIX=$out openBrf.pro - ''; - installPhase = '' install -Dm755 openBrf $out/bin/openBrf ''; diff --git a/pkgs/applications/misc/qtbitcointrader/default.nix b/pkgs/applications/misc/qtbitcointrader/default.nix index 8b527463b22..7de4e3e55a1 100644 --- a/pkgs/applications/misc/qtbitcointrader/default.nix +++ b/pkgs/applications/misc/qtbitcointrader/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qt }: +{ stdenv, fetchFromGitHub, qt4, qmake4Hook }: let version = "1.08.03"; @@ -13,23 +13,24 @@ stdenv.mkDerivation { sha256 = "0kxb0n11agqid0nyqdspfndm03b8l0nl8x4yx2hsrizs6m5z08h4"; }; - buildInputs = [ qt ]; + buildInputs = [ qt4 ]; + + nativeBuildHooks = [ qmake4Hook ]; postUnpack = "sourceRoot=\${sourceRoot}/src"; - configurePhase = '' - qmake \ - PREFIX=$out \ + preConfigure = '' + qmakeFlags="$qmakeFlags \ DESKTOPDIR=$out/share/applications \ ICONDIR=$out/share/pixmaps \ - QtBitcoinTrader_Desktop.pro + " ''; meta = with stdenv.lib; { description = "Secure bitcoin trading client"; homepage = https://centrabit.com/; license = licenses.lgpl3; - platforms = qt.meta.platforms; + platforms = qt4.meta.platforms; maintainers = [ maintainers.ehmry ]; }; } diff --git a/pkgs/applications/misc/qtpass/default.nix b/pkgs/applications/misc/qtpass/default.nix index 69730759d08..15f249ac906 100644 --- a/pkgs/applications/misc/qtpass/default.nix +++ b/pkgs/applications/misc/qtpass/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools }: +{ stdenv, fetchurl, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools, qmakeHook }: stdenv.mkDerivation rec { name = "qtpass-${version}"; @@ -9,12 +9,10 @@ stdenv.mkDerivation rec { sha256 = "60b458062f54184057e55dbd9c93958a8bf845244ffd70b9cb31bf58697f0dc6"; }; - buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools ]; + buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools qmakeHook ]; - configurePhase = '' - runHook preConfigure - qmake CONFIG+=release PREFIX=$out DESTDIR=$out - runHook postConfigure + preConfigure = '' + qmakeFlags="$qmakeFlags CONFIG+=release DESTDIR=$out" ''; installPhase = '' diff --git a/pkgs/applications/misc/tpmmanager/default.nix b/pkgs/applications/misc/tpmmanager/default.nix index 85a1c72b349..09322b47506 100644 --- a/pkgs/applications/misc/tpmmanager/default.nix +++ b/pkgs/applications/misc/tpmmanager/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, qt4, trousers }: +{ stdenv, fetchgit, qt4, qmake4Hook, trousers }: stdenv.mkDerivation rec { version = "0.8.1"; @@ -10,11 +10,9 @@ stdenv.mkDerivation rec { sha256 = "24a606f88fed67ed0d0e61dc220295e9e1ab8db3ef3d028fa34b04ff30652d8e"; }; - buildInputs = [ qt4 trousers ]; + nativeBuildInputs = [ qmake4Hook ]; - preBuild = '' - qmake -makefile PREFIX=\$out - ''; + buildInputs = [ qt4 trousers ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/misc/twmn/default.nix b/pkgs/applications/misc/twmn/default.nix index fbbf45877d2..665e23237d8 100644 --- a/pkgs/applications/misc/twmn/default.nix +++ b/pkgs/applications/misc/twmn/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, pkgconfig, boost }: +{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, qmakeHook, pkgconfig, boost }: stdenv.mkDerivation rec { name = "twmn-git-2014-09-23"; @@ -9,13 +9,10 @@ stdenv.mkDerivation rec { sha256 = "9c91e9d3d6d7f9d90d34da6f1a4b9f3dee65605c1e43729417d6921c54dded6b"; }; - buildInputs = [ qtbase qtx11extras pkgconfig boost ]; + buildInputs = [ qtbase qtx11extras pkgconfig boost qmakeHook ]; - configurePhase = '' - runHook preConfigure + postPatch = '' sed -i s/-Werror// twmnd/twmnd.pro - qmake - runHook postConfigure ''; installPhase = '' diff --git a/pkgs/applications/misc/vym/default.nix b/pkgs/applications/misc/vym/default.nix index 62f741f9eea..97fa47399f5 100644 --- a/pkgs/applications/misc/vym/default.nix +++ b/pkgs/applications/misc/vym/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, qt4 }: +{ stdenv, fetchurl, pkgconfig, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "vym-${version}"; @@ -9,11 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1x4qp6wpszscbbs4czkfvskm7qjglvxm813nqv281bpy4y1hhvgs"; }; - buildInputs = [ pkgconfig qt4 ]; - - configurePhase = '' - qmake PREFIX="$out" - ''; + buildInputs = [ pkgconfig qt4 qmake4Hook ]; meta = with stdenv.lib; { description = "A mind-mapping software"; diff --git a/pkgs/applications/networking/browsers/arora/default.nix b/pkgs/applications/networking/browsers/arora/default.nix index d812078b6aa..8bcefe4fe7b 100644 --- a/pkgs/applications/networking/browsers/arora/default.nix +++ b/pkgs/applications/networking/browsers/arora/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4 }: +{ stdenv, fetchurl, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "arora-${version}"; @@ -10,8 +10,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qt4 ]; - - configurePhase = "qmake PREFIX=$out"; + nativeBuildInputs = [ qmake4Hook ]; meta = with stdenv.lib; { platforms = qt4.meta.platforms; diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index e08a112664a..d244c4d11c4 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, pkgconfig, libtoxcore-dev, openal, opencv, libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo, - pango, atk, qrencode, ffmpeg, filter-audio, makeWrapper, - qtbase, qtsvg, qttools, qttranslations, sqlcipher }: + pango, atk, qrencode, ffmpeg, filter-audio, makeQtWrapper, + qtbase, qtsvg, qttools, qmakeHook, qttranslations, sqlcipher }: let version = "1.3.0"; @@ -22,11 +22,11 @@ stdenv.mkDerivation rec { [ libtoxcore-dev openal opencv libsodium filter-audio qtbase qttools qtsvg libXScrnSaver glib gtk2 cairo - pango atk qrencode ffmpeg qttranslations makeWrapper + pango atk qrencode ffmpeg qttranslations makeQtWrapper sqlcipher ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig qmakeHook ]; preConfigure = '' # patch .pro file for proper set of the git hash @@ -42,16 +42,10 @@ stdenv.mkDerivation rec { export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags sqlcipher)" ''; - configurePhase = '' - runHook preConfigure - qmake - ''; - installPhase = '' mkdir -p $out/bin cp qtox $out/bin - wrapProgram $out/bin/qtox \ - --prefix QT_PLUGIN_PATH : ${qtsvg}/lib/qt5/plugins + wrapQtProgram $out/bin/qtox ''; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/instant-messengers/ricochet/default.nix b/pkgs/applications/networking/instant-messengers/ricochet/default.nix index 81e8d1b76a9..52da021000d 100644 --- a/pkgs/applications/networking/instant-messengers/ricochet/default.nix +++ b/pkgs/applications/networking/instant-messengers/ricochet/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, makeDesktopItem, unzip , qtbase, qttools, makeQtWrapper, qtmultimedia, qtquick1, qtquickcontrols -, openssl, protobuf +, openssl, protobuf, qmakeHook }: stdenv.mkDerivation rec { @@ -27,15 +27,13 @@ stdenv.mkDerivation rec { openssl protobuf ]; - nativeBuildInputs = [ pkgconfig makeQtWrapper ]; + nativeBuildInputs = [ pkgconfig makeQtWrapper qmakeHook ]; preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)" ''; - configureScript = "qmake"; - dontAddPrefix = true; - configureFlags = [ "PREFIX=$(out)" "DEFINES+=RICOCHET_NO_PORTABLE" ]; + qmakeFlags = [ "DEFINES+=RICOCHET_NO_PORTABLE" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix index 07bfcf3a03e..bc517cadf52 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix @@ -3,7 +3,7 @@ , qtimageformats, qtgraphicaleffects , telegram-qml, libqtelegram-aseman-edition , gst_all_1 -, makeQtWrapper }: +, makeQtWrapper, qmakeHook }: stdenv.mkDerivation rec { name = "cutegram-${meta.version}"; @@ -20,16 +20,10 @@ stdenv.mkDerivation rec { telegram-qml libqtelegram-aseman-edition ] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly ]); - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ makeQtWrapper qmakeHook ]; enableParallelBuilding = true; - configurePhase = '' - runHook preConfigure - qmake -r PREFIX=$out - runHook postConfigure - ''; - fixupPhase = '' wrapQtProgram $out/bin/cutegram \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" diff --git a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix index 470724876ed..322c40afc7d 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub -, qtbase, qtmultimedia, qtquick1 }: +, qtbase, qtmultimedia, qtquick1, qmakeHook }: stdenv.mkDerivation rec { name = "libqtelegram-aseman-edition-${meta.version}"; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtmultimedia qtquick1 ]; + nativeBuildInputs = [ qmakeHook ]; enableParallelBuilding = true; patchPhase = '' @@ -19,12 +20,6 @@ stdenv.mkDerivation rec { substituteInPlace libqtelegram-ae.pro --replace "/\$\$LIB_PATH" "" ''; - configurePhase = '' - runHook preConfigure - qmake -r PREFIX=$out - runHook postConfigure - ''; - meta = with stdenv.lib; { version = "6.1"; description = "A fork of libqtelegram by Aseman, using qmake"; diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 77a0d9ee0aa..e734ddc5700 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, fetchgit, qtbase, qtimageformats , breakpad, ffmpeg, openalSoft, openssl, zlib, libexif, lzma, libopus , gtk2, glib, cairo, pango, gdk_pixbuf, atk, libappindicator-gtk2 -, libunity, dee, libdbusmenu-glib, libva +, libunity, dee, libdbusmenu-glib, libva, qmakeHook , pkgconfig, libxcb, xcbutilwm, xcbutilimage, xcbutilkeysyms , libxkbcommon, libpng, libjpeg, freetype, harfbuzz, pcre16 @@ -31,7 +31,7 @@ in stdenv.mkDerivation rec { buildInputs = [ breakpad ffmpeg openalSoft openssl zlib libexif lzma libopus gtk2 glib libappindicator-gtk2 libunity cairo pango gdk_pixbuf atk - dee libdbusmenu-glib libva + dee libdbusmenu-glib libva qmakeHook # Qt dependencies libxcb xcbutilwm xcbutilimage xcbutilkeysyms libxkbcommon libpng libjpeg freetype harfbuzz pcre16 xproto libX11 @@ -73,10 +73,9 @@ in stdenv.mkDerivation rec { qtSrcs = qtbase.srcs ++ [ qtimageformats.src ]; qtPatches = qtbase.patches; - buildCommand = '' - # We don't use nativeBuildInputs to avoid adding system Qt 5 libraries to various paths. - export PATH="${qtbase}/bin:$PATH" + dontUseQmakeConfigure = true; + buildCommand = '' unpackPhase cd "$sourceRoot" patchPhase diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix index 5412b0db4d6..854648d9786 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub -, qtbase, qtmultimedia, qtquick1 +, qtbase, qtmultimedia, qtquick1, qmakeHook , libqtelegram-aseman-edition }: stdenv.mkDerivation rec { @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ qtbase qtmultimedia qtquick1 libqtelegram-aseman-edition ]; + nativeBuildInputs = [ qmakeHook ]; enableParallelBuilding = true; patchPhase = '' @@ -20,11 +21,7 @@ stdenv.mkDerivation rec { substituteInPlace telegramqml.pro --replace "INSTALL_HEADERS_PREFIX/telegramqml" "INSTALL_HEADERS_PREFIX" ''; - configurePhase = '' - runHook preConfigure - qmake -r PREFIX=$out BUILD_MODE+=lib - runHook postConfigure - ''; + qmakeFlags = [ "BUILD_MODE+=lib" ]; meta = with stdenv.lib; { version = "0.9.2"; diff --git a/pkgs/applications/networking/instant-messengers/vacuum/default.nix b/pkgs/applications/networking/instant-messengers/vacuum/default.nix index d7798273e7c..2b5ce5f4142 100644 --- a/pkgs/applications/networking/instant-messengers/vacuum/default.nix +++ b/pkgs/applications/networking/instant-messengers/vacuum/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl - , qt4, openssl + , qt4, qmake4Hook, openssl , xproto, libX11, libXScrnSaver, scrnsaverproto , xz, zlib }: @@ -16,8 +16,10 @@ stdenv.mkDerivation rec { qt4 openssl xproto libX11 libXScrnSaver scrnsaverproto xz zlib ]; - configurePhase = '' - qmake INSTALL_PREFIX=$out -recursive vacuum.pro + nativeBuildInputs = [ qmake4Hook ]; + + preConfigure = '' + qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix index 4d2605acdc9..4a8dc44dbf9 100644 --- a/pkgs/applications/networking/irc/communi/default.nix +++ b/pkgs/applications/networking/irc/communi/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, libcommuni, makeQtWrapper, qt5, stdenv }: +{ fetchgit, libcommuni, makeQtWrapper, qtbase, qmakeHook, stdenv }: stdenv.mkDerivation rec { name = "communi-${version}"; @@ -10,23 +10,22 @@ stdenv.mkDerivation rec { sha256 = "0gk6gck09zb44qfsal7bs4ln2vl9s9x3vfxh7jvfc7mmf7l3sspd"; }; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ makeQtWrapper qmakeHook ]; - buildInputs = [ libcommuni qt5.qtbase ]; + buildInputs = [ libcommuni qtbase ]; enableParallelBuild = true; - configurePhase = '' - runHook preConfigure + preConfigure = '' export QMAKEFEATURES=${libcommuni}/features - qmake -r \ + qmakeFlags="$qmakeFlags \ COMMUNI_INSTALL_PREFIX=$out \ COMMUNI_INSTALL_BINS=$out/bin \ COMMUNI_INSTALL_PLUGINS=$out/lib/communi/plugins \ COMMUNI_INSTALL_ICONS=$out/share/icons/hicolor \ COMMUNI_INSTALL_DESKTOP=$out/share/applications \ COMMUNI_INSTALL_THEMES=$out/share/communi/themes - runHook postConfigure + " ''; postInstall = '' diff --git a/pkgs/applications/networking/linssid/default.nix b/pkgs/applications/networking/linssid/default.nix index 4cbc5c8c796..d35c2e100e4 100644 --- a/pkgs/applications/networking/linssid/default.nix +++ b/pkgs/applications/networking/linssid/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qtsvg, pkgconfig, boost, wirelesstools, iw, qwt6 }: +{ stdenv, fetchurl, qtbase, qtsvg, qmakeHook, pkgconfig, boost, wirelesstools, iw, qwt6 }: stdenv.mkDerivation rec { name = "linssid-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl"; }; - buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 ]; + buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 qmakeHook ]; patches = [ ./0001-unbundled-qwt.patch ]; @@ -27,12 +27,6 @@ stdenv.mkDerivation rec { rm -fr qwt-lib ''; - configurePhase = '' - runHook preConfigure - qmake linssid.pro - runHook postConfigure - ''; - meta = with stdenv.lib; { description = "Graphical wireless scanning for Linux"; homepage = http://sourceforge.net/projects/linssid/; diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index 646e3dfdd0b..20a32159520 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchgit, pkgconfig -, qt4, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap +, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap , alsaLib , jackSupport ? false, libjack2 ? null , speechdSupport ? false, speechd ? null @@ -20,13 +20,13 @@ let patches = optional jackSupport ./mumble-jack-support.patch; nativeBuildInputs = [ pkgconfig ] - ++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}" + ++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmakeHook ]; }."qt${toString source.qtVersion}" ++ (overrides.nativeBuildInputs or [ ]); buildInputs = [ boost protobuf avahi ] ++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}" ++ (overrides.buildInputs or [ ]); - configureFlags = [ + qmakeFlags = [ "CONFIG+=shared" "CONFIG+=no-g15" "CONFIG+=packaged" @@ -39,10 +39,8 @@ let ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" ++ (overrides.configureFlags or [ ]); - configurePhase = '' - runHook preConfigure - qmake $configureFlags DEFINES+="PLUGIN_PATH=$out/lib" - runHook postConfigure + preConfigure = '' + qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib" ''; makeFlags = [ "release" ]; diff --git a/pkgs/applications/networking/ostinato/default.nix b/pkgs/applications/networking/ostinato/default.nix index 1d5986dbfa6..02209645045 100644 --- a/pkgs/applications/networking/ostinato/default.nix +++ b/pkgs/applications/networking/ostinato/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, fetchurl, writeText -, qt4, protobuf, libpcap +, qt4, qmake4Hook, protobuf, libpcap , wireshark, gzip, diffutils, gawk }: @@ -18,10 +18,9 @@ stdenv.mkDerivation rec { buildInputs = [ qt4 protobuf libpcap ]; - patches = [ ./drone_ini.patch ]; + nativeBuildInputs = [ qmake4Hook ]; - configurePhase = "qmake PREFIX=$out" - + stdenv.lib.optionalString stdenv.isDarwin " -spec macx-g++"; + patches = [ ./drone_ini.patch ]; postInstall = '' cat > $out/bin/ostinato.ini <PublisherUrl)/es_event->PublisherUrl/' \ @@ -22,13 +22,13 @@ stdenv.mkDerivation { libretroshare/src/rsserver/rsinit.cc ''; - buildInputs = [ speex qt libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig + buildInputs = [ speex qt4 qmake4Hook libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig protobuf bzip2 libXScrnSaver curl libxml2 libxslt ]; sourceRoot = "retroshare-0.5.5/src"; - configurePhase = '' - qmake PREFIX=$out DESTDIR=$out RetroShare.pro + preConfigure = '' + qmakeFlags="$qmakeFlags DESTDIR=$out" ''; postInstall = '' diff --git a/pkgs/applications/networking/remote/x2goclient/default.nix b/pkgs/applications/networking/remote/x2goclient/default.nix index 02a25b9a270..09d4cf8dac5 100644 --- a/pkgs/applications/networking/remote/x2goclient/default.nix +++ b/pkgs/applications/networking/remote/x2goclient/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cups, libssh, libXpm, nxproxy, openldap, makeWrapper, qt4 }: +{ stdenv, fetchurl, cups, libssh, libXpm, nxproxy, openldap, makeWrapper, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "x2goclient-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ cups libssh libXpm nxproxy openldap qt4 ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper qmake4Hook ]; patchPhase = '' substituteInPlace Makefile \ @@ -19,7 +19,9 @@ stdenv.mkDerivation rec { --replace "-o root -g root" "" ''; - makeFlags = [ "PREFIX=$(out)" "ETCDIR=$(out)/etc" ]; + preConfigure = '' + qmakeFlags="$qmakeFlags ETCDIR=$out/etc" + ''; enableParallelBuilding = true; diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index ff0502ac0cb..110759ea292 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -1,7 +1,6 @@ -{ stdenv, fetchurl, qtbase, qtsvg, boost }: +{ stdenv, fetchurl, qtbase, qtsvg, qmakeHook, boost }: stdenv.mkDerivation rec { - version = "0.9.0b"; name = "fritzing-${version}"; @@ -10,19 +9,7 @@ stdenv.mkDerivation rec { sha256 = "181qnknq1j5x075icpw2qk0sc4wcj9f2hym533vs936is0wxp2gk"; }; - unpackPhase = '' - tar xjf ${src} - ''; - - buildInputs = [ qtbase qtsvg boost ]; - - configurePhase = '' - runHook preConfigure - cd fritzing-${version}.source - echo $PATH - qmake PREFIX=$out phoenix.pro - runHook postConfigure - ''; + buildInputs = [ qtbase qtsvg boost qmakeHook ]; meta = { description = "An open source prototyping tool for Arduino-based projects"; diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix index 692be0a88b1..cac9fef182c 100644 --- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit, git, espeak, SDL, udev, doxygen, cmake, overrideCC#, gcc48 , qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns - , qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects + , qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmakeHook , makeQtWrapper, lndir , gst_all_1, qt_gstreamer1, pkgconfig, glibc , version ? "2.9.4" @@ -23,21 +23,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; nativeBuildInputs = [ - pkgconfig makeQtWrapper + pkgconfig makeQtWrapper qmakeHook ] ++ qtInputs; patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ]; - configurePhase = '' - runHook preConfigure - mkdir build - (cd build && qmake ../qgroundcontrol.pro) - runHook postConfigure - ''; - - preBuild = "pushd build/"; - postBuild = "popd"; - installPhase = '' mkdir -p $out/share/applications cp -v qgroundcontrol.desktop $out/share/applications diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index fa8f43a45c6..e193701ff95 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -3,12 +3,7 @@ */ args @ {pkgs}: with args; with pkgs; let - inherit (pkgs) stdenv fetchgit fetchurl subversion; - - gitBase = lib.makeOverridable (import ./git) { - inherit fetchurl stdenv curl openssl zlib expat perl python gettext gnugrep - asciidoc xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl - tk makeWrapper subversionClient gzip openssh libiconv; + gitBase = callPackage ./git { texinfo = texinfo5; svnSupport = false; # for git-svn support guiSupport = false; # requires tcl/tk @@ -64,44 +59,28 @@ rec { git-stree = callPackage ./git-stree { }; - git2cl = import ./git2cl { - inherit fetchgit stdenv perl; - }; + git2cl = callPackage ./git2cl { }; - gitFastExport = import ./fast-export { - inherit fetchgit stdenv mercurial coreutils git makeWrapper subversion; - }; + gitFastExport = callPackage ./fast-export { }; gitRemoteGcrypt = callPackage ./git-remote-gcrypt { }; gitflow = callPackage ./gitflow { }; - hub = import ./hub { - inherit go; - inherit stdenv fetchgit; + hub = callPackage ./hub { inherit (darwin) Security; }; - qgit = import ./qgit { - inherit fetchurl stdenv; - inherit (xorg) libXext libX11; - qt = qt4; - }; + qgit = callPackage ./qgit { }; - qgitGit = import ./qgit/qgit-git.nix { - inherit fetchurl sourceFromHead stdenv; - inherit (xorg) libXext libX11; - qt = qt4; - }; + qgitGit = callPackage ./qgit/qgit-git.nix { }; - stgit = import ./stgit { - inherit fetchurl stdenv python git; + stgit = callPackage ./stgit { }; subgit = callPackage ./subgit { }; - svn2git = import ./svn2git { - inherit stdenv fetchurl ruby makeWrapper; + svn2git = callPackage ./svn2git { git = gitSVN; }; @@ -109,9 +88,7 @@ rec { tig = callPackage ./tig { }; - topGit = lib.makeOverridable (import ./topgit) { - inherit stdenv fetchurl; - }; + topGit = callPackage ./topgit { }; transcrypt = callPackage ./transcrypt { }; } diff --git a/pkgs/applications/version-management/git-and-tools/qgit/default.nix b/pkgs/applications/version-management/git-and-tools/qgit/default.nix index a7e6a62ce5f..3f5f9a2dbe1 100644 --- a/pkgs/applications/version-management/git-and-tools/qgit/default.nix +++ b/pkgs/applications/version-management/git-and-tools/qgit/default.nix @@ -1,21 +1,26 @@ -{stdenv, fetchurl, qt, libXext, libX11}: +{ stdenv, fetchurl, qt4, qmake4Hook, libXext, libX11 }: stdenv.mkDerivation rec { name = "qgit-2.5"; + meta = { license = stdenv.lib.licenses.gpl2; homepage = "http://libre.tibirna.org/projects/qgit/wiki/QGit"; description = "Graphical front-end to Git"; - inherit (qt.meta) platforms; + inherit (qt4.meta) platforms; }; + src = fetchurl { url = "http://libre.tibirna.org/attachments/download/9/${name}.tar.gz"; sha256 = "25f1ca2860d840d87b9919d34fc3a1b05d4163671ed87d29c3e4a8a09e0b2499"; }; - buildInputs = [qt libXext libX11]; - configurePhase = "qmake PREFIX=$out"; + + buildInputs = [ qt4 libXext libX11 ]; + + nativeBuildInputs = [ qmake4Hook ]; + installPhase = '' install -s -D -m 755 bin/qgit "$out/bin/qgit" ''; diff --git a/pkgs/applications/version-management/git-and-tools/qgit/qgit-git.nix b/pkgs/applications/version-management/git-and-tools/qgit/qgit-git.nix index 590e090de48..c3d3c77ad33 100644 --- a/pkgs/applications/version-management/git-and-tools/qgit/qgit-git.nix +++ b/pkgs/applications/version-management/git-and-tools/qgit/qgit-git.nix @@ -1,20 +1,21 @@ -{stdenv, fetchurl, qt, libXext, libX11, sourceFromHead}: +{ stdenv, fetchurl, qt4, qmake4Hook, libXext, libX11, sourceFromHead }: stdenv.mkDerivation rec { name = "qgit-git"; + meta = { license = stdenv.lib.licenses.gpl2; homepage = "http://digilander.libero.it/mcostalba/"; description = "Graphical front-end to Git"; }; + # REGION AUTO UPDATE: { name="qgit"; type="git"; url="git://git.kernel.org/pub/scm/qgit/qgit4.git"; } src = sourceFromHead "qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz" (fetchurl { url = "http://mawercer.de/~nix/repos/qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz"; sha256 = "17e4727ac68b4f2e8503289d5b6a2c042547e7be133e7f8195b79e33eab61b93"; }); # END - buildInputs = [qt libXext libX11]; - buildPhase = '' - qmake PREFIX=$out - make - ''; + + buildInputs = [ qt4 libXext libX11 ]; + + nativeBuildInputs = [ qmake4Hook ]; } diff --git a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix index f282fa6635b..e8f9078a839 100644 --- a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix +++ b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, qt4, subversion, apr}: +{ stdenv, fetchgit, qt4, qmake4Hook, subversion, apr }: stdenv.mkDerivation rec { name = "svn2git-kde-1.0.5"; @@ -9,10 +9,10 @@ stdenv.mkDerivation rec { sha256 = "818673fe751b00a42b6ed3e78a783549fb09b5245a01dee47b3dded667bfc582"; }; - buildPhase = '' + NIX_CFLAGS_COMPILE = [ "-I${apr}/include/apr-1" "-I${subversion.dev}/include/subversion-1" "-DVER=\"${src.rev}\"" ]; + + patchPhase = '' sed -i 's|/bin/cat|cat|' ./src/repository.cpp - qmake - make CXXFLAGS='-I${apr}/include/apr-1 -I${subversion.dev}/include/subversion-1 -DVER="\"${src.rev}\""' ''; installPhase = '' @@ -22,5 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ subversion apr qt4 ]; + nativeBuildInputs = [ qmake4Hook ]; + meta.broken = true; } diff --git a/pkgs/applications/version-management/guitone/default.nix b/pkgs/applications/version-management/guitone/default.nix index 135e7c7e1ef..8731cbfde19 100644 --- a/pkgs/applications/version-management/guitone/default.nix +++ b/pkgs/applications/version-management/guitone/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchmtn, qt4, pkgconfig, graphviz }: +{ stdenv, fetchurl, fetchmtn, qt4, qmake4Hook, pkgconfig, graphviz }: let version = "1.0-mtn-head"; in stdenv.mkDerivation rec { @@ -16,10 +16,7 @@ stdenv.mkDerivation rec { branch = "net.venge.monotone.guitone"; }; - buildInputs = [ qt4 pkgconfig graphviz ]; - - prefixKey="PREFIX="; - configureScript = "qmake guitone.pro"; + buildInputs = [ qt4 qmake4Hook pkgconfig graphviz ]; meta = { description = "Qt4 based GUI for monotone"; diff --git a/pkgs/applications/video/bomi/default.nix b/pkgs/applications/video/bomi/default.nix index f9301781fc1..c017ed4cda3 100644 --- a/pkgs/applications/video/bomi/default.nix +++ b/pkgs/applications/video/bomi/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeQtWrapper , libX11, libxcb, mesa -, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras +, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmakeHook , ffmpeg , libchardet , mpg123 @@ -76,6 +76,8 @@ stdenv.mkDerivation rec { ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"} ''; + dontUseQmakeConfigure = true; + configureFlags = with stdenv.lib; [ "--qmake=qmake" ] ++ optional jackSupport "--enable-jack" @@ -84,7 +86,7 @@ stdenv.mkDerivation rec { ++ optional cddaSupport "--enable-cdda" ; - nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper ]; + nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper qmakeHook ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix index e634a0caa3f..b8967323c98 100644 --- a/pkgs/applications/video/clipgrab/default.nix +++ b/pkgs/applications/video/clipgrab/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeDesktopItem, ffmpeg, qt4 }: +{ stdenv, fetchurl, makeDesktopItem, ffmpeg, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "clipgrab-${version}"; @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ ffmpeg qt4 ]; + nativeBuildInputs = [ qmake4Hook ]; postPatch = stdenv.lib.optionalString (ffmpeg != null) '' substituteInPlace converter_ffmpeg.cpp \ @@ -18,9 +19,7 @@ stdenv.mkDerivation rec { --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg ' ''; - configurePhase = '' - qmake clipgrab.pro - ''; + qmakeFlags = [ "clipgrab.pro" ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/linuxstopmotion/default.nix b/pkgs/applications/video/linuxstopmotion/default.nix index 23a033844b3..293bdd835b5 100644 --- a/pkgs/applications/video/linuxstopmotion/default.nix +++ b/pkgs/applications/video/linuxstopmotion/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2 -, gamin +, gamin, qmake4Hook }: stdenv.mkDerivation rec { @@ -12,14 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1xkkrhllgy2d7k0vrdj794ya7y3g3n7xh8c2qgnb26yrarz79dqj"; }; - buildInputs = [ pkgconfig qt4 SDL SDL_image libvorbis libtar libxml2 gamin ]; + buildInputs = [ pkgconfig qt4 SDL SDL_image libvorbis libtar libxml2 gamin qmake4Hook ]; patches = [ ./linuxstopmotion-fix-wrong-isProcess-logic.patch ]; - configurePhase = '' - qmake PREFIX="$out" - ''; - # Installation breaks without this preInstall = '' mkdir -p "$out/share/stopmotion/translations/" diff --git a/pkgs/applications/video/minitube/default.nix b/pkgs/applications/video/minitube/default.nix index f9d887189ec..1a621032125 100644 --- a/pkgs/applications/video/minitube/default.nix +++ b/pkgs/applications/video/minitube/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, makeWrapper, phonon, phonon_backend_vlc, qt4 +{ stdenv, fetchFromGitHub, makeWrapper, phonon, phonon_backend_vlc, qt4, qmake4Hook # "Free" API key generated by nckx , withAPIKey ? "AIzaSyBtFgbln3bu1swQC-naMxMtKh384D3xJZE" }: @@ -14,11 +14,9 @@ stdenv.mkDerivation rec { }; buildInputs = [ phonon phonon_backend_vlc qt4 ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper qmake4Hook ]; - configurePhase = '' - qmake PREFIX=$out "DEFINES += APP_GOOGLE_API_KEY=${withAPIKey}" - ''; + qmakeFlags = [ "DEFINES+=APP_GOOGLE_API_KEY=${withAPIKey}" ]; enableParallelBuilding = true; diff --git a/pkgs/applications/video/qgifer/default.nix b/pkgs/applications/video/qgifer/default.nix index f528ce99a8a..8185e15dcc8 100644 --- a/pkgs/applications/video/qgifer/default.nix +++ b/pkgs/applications/video/qgifer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchsvn, cmake, opencv, qt, giflib }: +{ stdenv, fetchsvn, cmake, opencv, qt4, giflib }: stdenv.mkDerivation rec { name = "qgifer-${version}"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { substituteInPlace CMakeLists.txt --replace "SET(CMAKE_INSTALL_PREFIX" "#" ''; - buildInputs = [ cmake opencv qt giflib ]; + buildInputs = [ cmake opencv qt4 giflib ]; meta = with stdenv.lib; { description = "Video-based animated GIF creator"; diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix index d2400475a0b..fdadc1d99ab 100644 --- a/pkgs/applications/video/shotcut/default.nix +++ b/pkgs/applications/video/shotcut/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, SDL, frei0r, gettext, makeWrapper, mlt, pkgconfig, qtbase }: +{ stdenv, fetchurl, SDL, frei0r, gettext, makeWrapper, mlt, pkgconfig, qtbase, qmakeHook }: stdenv.mkDerivation rec { name = "shotcut-${version}"; @@ -9,13 +9,7 @@ stdenv.mkDerivation rec { sha256 = "1504ds3ppqmpg84nb2gb74qndqysjwn3xw7n8xv19kd1pppnr10f"; }; - buildInputs = [ SDL frei0r gettext makeWrapper mlt pkgconfig qtbase ]; - - configurePhase = '' - runHook preConfigure - qmake PREFIX=$out - runHook postConfigure - ''; + buildInputs = [ SDL frei0r gettext makeWrapper mlt pkgconfig qtbase qmakeHook ]; postInstall = '' mkdir -p $out/share/shotcut diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh index 2cf08d42ae0..06d80e12f09 100644 --- a/pkgs/build-support/setup-hooks/multiple-outputs.sh +++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh @@ -47,11 +47,28 @@ _overrideFirst outputInfo "info" "doc" "$outputMan" _multioutConfig() { if [ "$outputs" = "out" ] || [ -z "${setOutputFlags-1}" ]; then return; fi; + # try to detect share/doc/${shareDocName} + # Note: sadly, $configureScript detection comes later in configurePhase, + # and reordering would cause more trouble than worth. + if [ -z "$shareDocName" ]; then + local confScript="$configureScript" + if [ -z "$confScript" ] && [ -x ./configure ]; then + confScript=./configure + fi + if [ -f "$confScript" ]; then + local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")" + fi + # PACKAGE_TARNAME sometimes contains garbage. + if [ -n "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z-_0-9]'; then + shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')" + fi + fi + configureFlags="\ --bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \ --includedir=${!outputInclude}/include --oldincludedir=${!outputInclude}/include \ --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \ - --docdir=${!outputDoc}/share/doc \ + --docdir=${!outputDoc}/share/doc/${shareDocName} \ --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \ --localedir=${!outputLib}/share/locale \ $configureFlags" @@ -62,6 +79,7 @@ _multioutConfig() { $installFlags" } + # Add rpath prefixes to library paths, and avoid stdenv doing it for $out. _addRpathPrefix "${!outputLib}" NIX_NO_SELF_RPATH=1 @@ -144,8 +162,8 @@ _multioutDevs() { # Make the first output (typically "dev") propagate other outputs needed for development. # Take the first, because that's what one gets when putting the package into buildInputs. -# Note: during the build, probably only the "native" development packages are useful. -# With current cross-building setup, all packages are "native" if not cross-building. +# Note: with current cross-building setup, all packages are "native" if not cross-building; +# however, if cross-building, the outputs are non-native. We have to choose the right file. _multioutPropagateDev() { if [ "$outputs" = "out" ]; then return; fi; @@ -170,8 +188,15 @@ _multioutPropagateDev() { fi mkdir -p "${!outputFirst}"/nix-support + local propagatedBuildInputsFile + if [ -z "$crossConfig" ]; then + propagatedBuildInputsFile=propagated-native-build-inputs + else + propagatedBuildInputsFile=propagated-build-inputs + fi + for output in $propagatedBuildOutputs; do - echo -n " ${!output}" >> "${!outputFirst}"/nix-support/propagated-native-build-inputs + echo -n " ${!output}" >> "${!outputFirst}"/nix-support/$propagatedBuildInputsFile done } diff --git a/pkgs/data/documentation/zeal/default.nix b/pkgs/data/documentation/zeal/default.nix index dd681404e85..89e5d83df61 100644 --- a/pkgs/data/documentation/zeal/default.nix +++ b/pkgs/data/documentation/zeal/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, libarchive, pkgconfig, qtbase -, qtimageformats, qtwebkit, qtx11extras, xorg }: +, qtimageformats, qtwebkit, qtx11extras, xcbutilkeysyms, qmakeHook }: stdenv.mkDerivation rec { version = "0.2.1"; @@ -13,18 +13,12 @@ stdenv.mkDerivation rec { }; buildInputs = [ - xorg.xcbutilkeysyms pkgconfig qtbase qtimageformats qtwebkit qtx11extras libarchive + xcbutilkeysyms pkgconfig qtbase qtimageformats qtwebkit qtx11extras libarchive qmakeHook ]; - configurePhase = '' - runHook preConfigure - qmake PREFIX=/ - runHook postConfigure - ''; + qmakeFlags = [ "PREFIX=/" ]; - installPhase = '' - make INSTALL_ROOT=$out install - ''; + installFlags = [ "INSTALL_ROOT=$(out)" ]; enableParallelBuilding = true; diff --git a/pkgs/data/fonts/cantarell-fonts/default.nix b/pkgs/data/fonts/cantarell-fonts/default.nix index 34434f60172..65df7fc1f95 100644 --- a/pkgs/data/fonts/cantarell-fonts/default.nix +++ b/pkgs/data/fonts/cantarell-fonts/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl }: -stdenv.mkDerivation { - name = "cantarell-fonts-0.0.17"; +stdenv.mkDerivation rec { + major = "0.0"; + minor = "24"; + name = "cantarell-fonts-${major}.${minor}"; src = fetchurl { - url = mirror://gnome/sources/cantarell-fonts/0.0/cantarell-fonts-0.0.17.tar.xz; - sha256 = "0kx05fw1i11zcqx5yv9y9iprpl49k51sibz86bc58a50n1w6gcwn"; + url = "mirror://gnome/sources/cantarell-fonts/${major}/${name}.tar.xz"; + sha256 = "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw"; }; meta = { diff --git a/pkgs/desktops/kde-5/frameworks-5.19/extra-cmake-modules/setup-hook.sh b/pkgs/desktops/kde-5/frameworks-5.19/extra-cmake-modules/setup-hook.sh index 56ed09f4ea5..193cb048949 100644 --- a/pkgs/desktops/kde-5/frameworks-5.19/extra-cmake-modules/setup-hook.sh +++ b/pkgs/desktops/kde-5/frameworks-5.19/extra-cmake-modules/setup-hook.sh @@ -7,7 +7,6 @@ _ecmSetXdgDirs() { _ecmPropagateSharedData() { local sharedPaths=( \ "config.cfg" \ - "doc" \ "kconf_update" \ "kservices5" \ "kservicetypes5" \ @@ -20,7 +19,6 @@ _ecmPropagateSharedData() { "applications" \ "desktop-directories" \ "mime" \ - "info" \ "dbus-1" \ "interfaces" \ "services" \ @@ -28,6 +26,7 @@ _ecmPropagateSharedData() { for dir in ${sharedPaths[@]}; do if [ -d "$1/share/$dir" ]; then addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" + propagateOnce propagatedBuildInputs "$1" propagateOnce propagatedUserEnvPkgs "$1" break fi diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kconfigwidgets/default.nix b/pkgs/desktops/kde-5/frameworks-5.19/kconfigwidgets/default.nix index 0e14d06edd3..3b3bd27cce0 100644 --- a/pkgs/desktops/kde-5/frameworks-5.19/kconfigwidgets/default.nix +++ b/pkgs/desktops/kde-5/frameworks-5.19/kconfigwidgets/default.nix @@ -9,7 +9,8 @@ kdeFramework { propagatedBuildInputs = [ kauth kconfig kcodecs ki18n kwidgetsaddons ]; patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; postInstall = '' - wrapQtProgram "$out/bin/preparetips5" + moveToOutput "bin/preparetips5" "$dev" + wrapQtProgram "$dev/bin/preparetips5" ''; meta = { maintainers = [ lib.maintainers.ttuegel ]; diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kinit/0001-kinit-libpath.patch b/pkgs/desktops/kde-5/frameworks-5.19/kinit/0001-kinit-libpath.patch deleted file mode 100644 index 9c76079a382..00000000000 --- a/pkgs/desktops/kde-5/frameworks-5.19/kinit/0001-kinit-libpath.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 723c9b1268a04127647a1c20eebe9804150566dd Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sat, 13 Jun 2015 08:57:55 -0500 -Subject: [PATCH] kinit libpath - ---- - src/kdeinit/kinit.cpp | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp -index 9e775b6..0ac5646 100644 ---- a/src/kdeinit/kinit.cpp -+++ b/src/kdeinit/kinit.cpp -@@ -660,15 +660,17 @@ static pid_t launch(int argc, const char *_name, const char *args, - if (!libpath.isEmpty()) { - if (!l.load()) { - if (libpath_relative) { -- // NB: Because Qt makes the actual dlopen() call, the -- // RUNPATH of kdeinit is *not* respected - see -- // https://sourceware.org/bugzilla/show_bug.cgi?id=13945 -- // - so we try hacking it in ourselves -- QString install_lib_dir = QFile::decodeName( -- CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/"); -- libpath = install_lib_dir + libpath; -- l.setFileName(libpath); -+ // Use QT_PLUGIN_PATH to find shared library directories -+ // For KF5, the plugin path is /lib/qt5/plugins/, so kdeinit5 -+ // shared libraries should be in /lib/qt5/plugins/../../ -+ const QRegExp pathSepRegExp(QString::fromLatin1("[:\b]")); -+ const QString up = QString::fromLocal8Bit("/../../"); -+ const QStringList paths = QString::fromLocal8Bit(qgetenv("QT_PLUGIN_PATH")).split(pathSepRegExp, QString::KeepEmptyParts); -+ Q_FOREACH (const QString &path, paths) { -+ l.setFileName(path + up + libpath); - l.load(); -+ if (l.isLoaded()) break; -+ } - } - } - if (!l.isLoaded()) { --- -2.4.2 - diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix b/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix index 5f644d7c424..64210ca7605 100644 --- a/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix +++ b/pkgs/desktops/kde-5/frameworks-5.19/kinit/default.nix @@ -1,4 +1,4 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfig, kcrash +{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kconfig, kcrash , kdoctools, ki18n, kio, kservice, kwindowsystem, libcap , libcap_progs }: @@ -10,7 +10,7 @@ kdeFramework { nativeBuildInputs = [ extra-cmake-modules kdoctools libcap_progs ]; buildInputs = [ kconfig kcrash kservice libcap ]; propagatedBuildInputs = [ ki18n kio kwindowsystem ]; - patches = [ ./0001-kinit-libpath.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); meta = { maintainers = [ lib.maintainers.ttuegel ]; }; diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kinit/kinit-libpath.patch b/pkgs/desktops/kde-5/frameworks-5.19/kinit/kinit-libpath.patch new file mode 100644 index 00000000000..52c5563ea58 --- /dev/null +++ b/pkgs/desktops/kde-5/frameworks-5.19/kinit/kinit-libpath.patch @@ -0,0 +1,31 @@ +Index: kinit-5.19.0/src/kdeinit/kinit.cpp +=================================================================== +--- kinit-5.19.0.orig/src/kdeinit/kinit.cpp ++++ kinit-5.19.0/src/kdeinit/kinit.cpp +@@ -658,15 +658,17 @@ static pid_t launch(int argc, const char + if (!libpath.isEmpty()) { + if (!l.load()) { + if (libpath_relative) { +- // NB: Because Qt makes the actual dlopen() call, the +- // RUNPATH of kdeinit is *not* respected - see +- // https://sourceware.org/bugzilla/show_bug.cgi?id=13945 +- // - so we try hacking it in ourselves +- QString install_lib_dir = QFile::decodeName( +- CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/"); +- libpath = install_lib_dir + libpath; +- l.setFileName(libpath); +- l.load(); ++ // Try to load the library relative to the active profiles. ++ QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); ++ // Reverse the profile list. ++ std::reverse(profiles.begin(), profiles.end()); ++ const QString libdir = QString::fromLatin1("/lib/"); ++ Q_FOREACH (const QByteArray &profile, profiles) { ++ if (!profile.isEmpty()) { ++ l.setFileName(QFile::decodeName(profile) + libdir + libpath); ++ if (l.load()) break; ++ } ++ } + } + } + if (!l.isLoaded()) { diff --git a/pkgs/desktops/kde-5/frameworks-5.19/kinit/series b/pkgs/desktops/kde-5/frameworks-5.19/kinit/series new file mode 100644 index 00000000000..5faa456366b --- /dev/null +++ b/pkgs/desktops/kde-5/frameworks-5.19/kinit/series @@ -0,0 +1 @@ +kinit-libpath.patch diff --git a/pkgs/desktops/kde-5/plasma-5.5/default.nix b/pkgs/desktops/kde-5/plasma-5.5/default.nix index 384fa6f6d27..a4f5c7c2320 100644 --- a/pkgs/desktops/kde-5/plasma-5.5/default.nix +++ b/pkgs/desktops/kde-5/plasma-5.5/default.nix @@ -81,6 +81,7 @@ let plasma-workspace-wallpapers = callPackage ./plasma-workspace-wallpapers.nix {}; polkit-kde-agent = callPackage ./polkit-kde-agent.nix {}; powerdevil = callPackage ./powerdevil.nix {}; + startkde = callPackage ./startkde {}; systemsettings = callPackage ./systemsettings.nix {}; }; diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix index 01c5c63ce0a..1a96c1eced2 100644 --- a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix +++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/default.nix @@ -1,14 +1,12 @@ { plasmaPackage, lib, copyPathsToStore -, extra-cmake-modules, kdoctools, makeQtWrapper +, extra-cmake-modules, kdoctools , baloo, kactivities, kcmutils, kcrash, kdbusaddons, kdeclarative , kdelibs4support, kdesu, kdewebkit, kglobalaccel, kidletime , kjsembed, knewstuff, knotifyconfig, kpackage, krunner , ktexteditor, ktextwidgets, kwallet, kwayland, kwin, kxmlrpcclient , libdbusmenu, libkscreen, libSM, libXcursor, networkmanager-qt , pam, phonon, plasma-framework, qtquick1, qtscript, qtx11extras, wayland -, libksysguard, bash, coreutils, gnused, gnugrep, socat, kconfig -, kinit, kservice, qttools, dbus_tools, mkfontdir, xmessage -, xprop, xrdb, xset, xsetroot, solid, qtquickcontrols +, libksysguard, kconfig, solid, qtquickcontrols }: plasmaPackage { @@ -17,14 +15,13 @@ plasmaPackage { nativeBuildInputs = [ extra-cmake-modules kdoctools - makeQtWrapper ]; buildInputs = [ - dbus_tools kcmutils kconfig kcrash kdbusaddons kdesu kdewebkit - kinit kjsembed knewstuff knotifyconfig kpackage kservice + kcmutils kconfig kcrash kdbusaddons kdesu kdewebkit + kjsembed knewstuff knotifyconfig kpackage ktextwidgets kwallet kwayland kxmlrpcclient libdbusmenu libSM - libXcursor mkfontdir networkmanager-qt pam phonon qtscript qttools - socat wayland xmessage xprop xset xsetroot + libXcursor networkmanager-qt pam phonon qtscript + wayland ]; propagatedBuildInputs = [ baloo kactivities kdeclarative kdelibs4support kglobalaccel @@ -35,50 +32,14 @@ plasmaPackage { patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); postPatch = '' - substituteInPlace startkde/startkde.cmake \ - --subst-var-by bash $(type -P bash) \ - --subst-var-by sed $(type -P sed) \ - --subst-var-by grep $(type -P grep) \ - --subst-var-by socat $(type -P socat) \ - --subst-var-by kcheckrunning $(type -P kcheckrunning) \ - --subst-var-by xmessage $(type -P xmessage) \ - --subst-var-by tr $(type -P tr) \ - --subst-var-by qtpaths $(type -P qtpaths) \ - --subst-var-by qdbus $(type -P qdbus) \ - --subst-var-by dbus-launch $(type -P dbus-launch) \ - --subst-var-by mkfontdir $(type -P mkfontdir) \ - --subst-var-by xset $(type -P xset) \ - --subst-var-by xsetroot $(type -P xsetroot) \ - --subst-var-by xprop $(type -P xprop) \ - --subst-var-by start_kdeinit_wrapper "${kinit.out}/lib/libexec/kf5/start_kdeinit_wrapper" \ - --subst-var-by kwrapper5 $(type -P kwrapper5) \ - --subst-var-by kdeinit5_shutdown $(type -P kdeinit5_shutdown) \ - --subst-var-by kbuildsycoca5 $(type -P kbuildsycoca5) \ - --subst-var-by kreadconfig5 $(type -P kreadconfig5) \ - --subst-var out substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ --replace kdostartupconfig5 $out/bin/kdostartupconfig5 ''; postInstall = '' + rm "$out/bin/startkde" rm "$out/bin/startplasmacompositor" rm "$out/lib/libexec/startplasma" rm -r "$out/share/wayland-sessions" ''; - - postFixup = '' - wrapQtProgram "$out/bin/ksmserver" - wrapQtProgram "$out/bin/plasmawindowed" - wrapQtProgram "$out/bin/kcminit_startup" - wrapQtProgram "$out/bin/ksplashqml" - wrapQtProgram "$out/bin/kcheckrunning" - wrapQtProgram "$out/bin/systemmonitor" - wrapQtProgram "$out/bin/kstartupconfig5" - wrapQtProgram "$out/bin/kdostartupconfig5" - wrapQtProgram "$out/bin/klipper" - wrapQtProgram "$out/bin/kuiserver5" - wrapQtProgram "$out/bin/krunner" - wrapQtProgram "$out/bin/plasmashell" - wrapQtProgram "$out/lib/libexec/drkonqi" - ''; } diff --git a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series index 88b54af793e..b9081298bd6 100644 --- a/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series +++ b/pkgs/desktops/kde-5/plasma-5.5/plasma-workspace/series @@ -1,2 +1 @@ -startkde.patch qml-import-path.patch diff --git a/pkgs/desktops/kde-5/plasma-5.5/startkde/default.nix b/pkgs/desktops/kde-5/plasma-5.5/startkde/default.nix new file mode 100644 index 00000000000..30e986c21b4 --- /dev/null +++ b/pkgs/desktops/kde-5/plasma-5.5/startkde/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, runCommand +, dbus, qttools, socat +, gnugrep, gnused +, kconfig, kinit, kservice +, plasma-workspace +, xmessage, xprop, xsetroot +}: + +let + + env = { + inherit (stdenv) shell; + paths = builtins.map (pkg: pkg.out or pkg) + [ + dbus qttools socat + gnugrep gnused + kconfig kinit kservice + plasma-workspace + xmessage xprop xsetroot + ]; + }; + +in runCommand "startkde" env '' + prefix_PATH= + for pkg in $paths; do + addToSearchPath prefix_PATH "$pkg/bin" + addToSearchPath prefix_PATH "$pkg/lib/libexec" + addToSearchPath prefix_PATH "$pkg/lib/libexec/kf5" + done + substitute ${./startkde.sh} "$out" --subst-var shell --subst-var prefix_PATH + chmod +x "$out" +'' diff --git a/pkgs/desktops/kde-5/plasma-5.5/startkde/startkde.sh b/pkgs/desktops/kde-5/plasma-5.5/startkde/startkde.sh new file mode 100755 index 00000000000..d839226a456 --- /dev/null +++ b/pkgs/desktops/kde-5/plasma-5.5/startkde/startkde.sh @@ -0,0 +1,334 @@ +#!@shell@ + +PATH="@prefix_PATH@:$PATH" + +# The KDE icon cache is supposed to update itself +# automatically, but it uses the timestamp on the icon +# theme directory as a trigger. Since in Nix the +# timestamp is always the same, this doesn't work. So as +# a workaround, nuke the icon cache on login. This isn't +# perfect, since it may require logging out after +# installing new applications to update the cache. +# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html +rm -fv $HOME/.cache/icon-cache.kcache + +# Qt writes a weird ‘libraryPath’ line to +# ~/.config/Trolltech.conf that causes the KDE plugin +# paths of previous KDE invocations to be searched. +# Obviously using mismatching KDE libraries is potentially +# disastrous, so here we nuke references to the Nix store +# in Trolltech.conf. A better solution would be to stop +# Qt from doing this wackiness in the first place. +if [ -e $HOME/.config/Trolltech.conf ]; then + sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf +fi + +if test "x$1" = x--failsafe; then + KDE_FAILSAFE=1 # General failsafe flag + KWIN_COMPOSE=N # Disable KWin's compositing + QT_XCB_FORCE_SOFTWARE_OPENGL=1 + export KWIN_COMPOSE KDE_FAILSAFE QT_XCB_FORCE_SOFTWARE_OPENGL +fi + +# When the X server dies we get a HUP signal from xinit. We must ignore it +# because we still need to do some cleanup. +trap 'echo GOT SIGHUP' HUP + +# we have to unset this for Darwin since it will screw up KDE's dynamic-loading +unset DYLD_FORCE_FLAT_NAMESPACE + +# Check if a KDE session already is running and whether it's possible to connect to X +kcheckrunning +kcheckrunning_result=$? +if test $kcheckrunning_result -eq 0 ; then + echo "KDE seems to be already running on this display." + xmessage -geometry 500x100 "KDE seems to be already running on this display." + exit 1 +elif test $kcheckrunning_result -eq 2 ; then + echo "\$DISPLAY is not set or cannot connect to the X server." + exit 1 +fi + +# Boot sequence: +# +# kdeinit is used to fork off processes which improves memory usage +# and startup time. +# +# * kdeinit starts klauncher first. +# * Then kded is started. kded is responsible for keeping the sycoca +# database up to date. When an up to date database is present it goes +# into the background and the startup continues. +# * Then kdeinit starts kcminit. kcminit performs initialisation of +# certain devices according to the user's settings +# +# * Then ksmserver is started which takes control of the rest of the startup sequence + +# We need to create config folder so we can write startupconfigkeys +configDir=$(qtpaths --writable-path GenericConfigLocation) +mkdir -p "$configDir" + +#This is basically setting defaults so we can use them with kstartupconfig5 +cat >$configDir/startupconfigkeys <$plasmalocalerc <$kdeglobalsfile </dev/null 2>/dev/null; then + : # ok +else + echo 'startkde: Could not start D-Bus. Can you call qdbus?' 1>&2 + test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null + xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?" + exit 1 +fi + +ksplash_pid= +if test -z "$dl"; then + # the splashscreen and progress indicator + case "$ksplashrc_ksplash_engine" in + KSplashQML) + ksplash_pid=$(ksplashqml "${ksplashrc_ksplash_theme}" --pid) + ;; + None) + ;; + *) + ;; + esac +fi + +# Source scripts found in /plasma-workspace/env/*.sh +# (where correspond to the system and user's configuration +# directories, as identified by Qt's qtpaths, e.g. $HOME/.config +# and /etc/xdg/ on Linux) +# +# This is where you can define environment variables that will be available to +# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent` +# or eval `gpg-agent --daemon`. +# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script +# +# (see end of this file). +# For anything else (that doesn't set env vars, or that needs a window manager), +# better use the Autostart folder. + +IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation) +# Add /env/ to the directory to locate the scripts to be sourced +for prefix in "${scriptpath[@]}"; do + for file in "$prefix"/plasma-workspace/env/*.sh; do + test -r "$file" && . "$file" || true + done +done + +echo 'startkde: Starting up...' 1>&2 + +# Mark that full KDE session is running (e.g. Konqueror preloading works only +# with full KDE running). The KDE_FULL_SESSION property can be detected by +# any X client connected to the same X session, even if not launched +# directly from the KDE session but e.g. using "ssh -X", kdesu. $KDE_FULL_SESSION +# however guarantees that the application is launched in the same environment +# like the KDE session and that e.g. KDE utilities/libraries are available. +# KDE_FULL_SESSION property is also only available since KDE 3.5.5. +# The matching tests are: +# For $KDE_FULL_SESSION: +# if test -n "$KDE_FULL_SESSION"; then ... whatever +# For KDE_FULL_SESSION property: +# xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null +# if test $? -eq 0; then ... whatever +# +# Additionally there is (since KDE 3.5.7) $KDE_SESSION_UID with the uid +# of the user running the KDE session. It should be rarely needed (e.g. +# after sudo to prevent desktop-wide functionality in the new user's kded). +# +# Since KDE4 there is also KDE_SESSION_VERSION, containing the major version number. +# Note that this didn't exist in KDE3, which can be detected by its absense and +# the presence of KDE_FULL_SESSION. +# +KDE_FULL_SESSION=true +export KDE_FULL_SESSION +xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true + +KDE_SESSION_VERSION=5 +export KDE_SESSION_VERSION +xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5 + +KDE_SESSION_UID=`id -ru` +export KDE_SESSION_UID + +XDG_CURRENT_DESKTOP=KDE +export XDG_CURRENT_DESKTOP + +# At this point all the environment is ready, let's send it to kwalletd if running +if test -n "$PAM_KWALLET_LOGIN" ; then + env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN +fi +# ...and also to kwalletd5 +if test -n "$PAM_KWALLET5_LOGIN" ; then + env | socat STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN +fi + +# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment +ksyncdbusenv +if test $? -ne 0; then + # Startup error + echo 'startkde: Could not sync environment to dbus.' 1>&2 + test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null + xmessage -geometry 500x100 "Could not sync environment to dbus." + exit 1 +fi + +# We set LD_BIND_NOW to increase the efficiency of kdeinit. +# kdeinit unsets this variable before loading applications. +LD_BIND_NOW=true start_kdeinit_wrapper --kded +kcminit_startup +if test $? -ne 0; then + # Startup error + echo 'startkde: Could not start kdeinit5. Check your installation.' 1>&2 + test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null + xmessage -geometry 500x100 "Could not start kdeinit5. Check your installation." + exit 1 +fi + +# (NixOS) Run kbuildsycoca5 before starting the user session because things +# may be missing or moved if they have run nixos-rebuild and it may not be +# possible for them to start Konsole to run it manually! +kbuildsycoca5 + +# finally, give the session control to the session manager +# see kdebase/ksmserver for the description of the rest of the startup sequence +# if the KDEWM environment variable has been set, then it will be used as KDE's +# window manager instead of kwin. +# if KDEWM is not set, ksmserver will ensure kwin is started. +# kwrapper5 is used to reduce startup time and memory usage +# kwrapper5 does not return useful error codes such as the exit code of ksmserver. +# We only check for 255 which means that the ksmserver process could not be +# started, any problems thereafter, e.g. ksmserver failing to initialize, +# will remain undetected. +test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" +# If the session should be locked from the start (locked autologin), +# lock now and do the rest of the KDE startup underneath the locker. +KSMSERVEROPTIONS="" +test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen" +kwrapper5 ksmserver $KDEWM $KSMSERVEROPTIONS +if test $? -eq 255; then + # Startup error + echo 'startkde: Could not start ksmserver. Check your installation.' 1>&2 + test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null + xmessage -geometry 500x100 "Could not start ksmserver. Check your installation." +fi + +wait_drkonqi=$(kreadconfig5 --file startkderc --group WaitForDrKonqi --key Enabled --default true) + +if test x"$wait_drkonqi"x = x"true"x ; then + # wait for remaining drkonqi instances with timeout (in seconds) + wait_drkonqi_timeout=$(kreadconfig5 --file startkderc --group WaitForDrKonqi --key Timeout --default 900) + wait_drkonqi_counter=0 + while qdbus | grep "^[^w]*org.kde.drkonqi" > /dev/null ; do + sleep 5 + wait_drkonqi_counter=$((wait_drkonqi_counter+5)) + if test "$wait_drkonqi_counter" -ge "$wait_drkonqi_timeout" ; then + # ask remaining drkonqis to die in a graceful way + qdbus | grep 'org.kde.drkonqi-' | while read address ; do + qdbus "$address" "/MainApplication" "quit" + done + break + fi + done +fi + +echo 'startkde: Shutting down...' 1>&2 +# just in case +test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null + +# Clean up +kdeinit5_shutdown + +unset KDE_FULL_SESSION +xprop -root -remove KDE_FULL_SESSION +unset KDE_SESSION_VERSION +xprop -root -remove KDE_SESSION_VERSION +unset KDE_SESSION_UID + +echo 'startkde: Done.' 1>&2 diff --git a/pkgs/development/compilers/eql/default.nix b/pkgs/development/compilers/eql/default.nix index def60aa295f..de531e901d9 100644 --- a/pkgs/development/compilers/eql/default.nix +++ b/pkgs/development/compilers/eql/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ]; - NIX_CFLAGS_COMPILE = "-fPIC"; + NIX_CFLAGS_COMPILE = [ "-fPIC" ]; postPatch = '' sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 3190c5f5739..5b206a63daa 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -210,10 +210,14 @@ preInstall() { postInstall() { + mkdir -p "$lib" # some configs don't have anything to put into $lib + # Move runtime libraries to $lib. moveToOutput "lib/lib*.so*" "$lib" moveToOutput "lib/lib*.la" "$lib" - ln -s lib "$lib/lib64" # for *.la + if [ -d "$lib/lib" ]; then + ln -s lib "$lib/lib64" # for *.la + fi moveToOutput "share/gcc-*/python" "$lib" for i in "$lib"/lib/*.{la,py}; do diff --git a/pkgs/development/libraries/CGAL/default.nix b/pkgs/development/libraries/CGAL/default.nix index 1f964388cbd..b8fd4af812a 100644 --- a/pkgs/development/libraries/CGAL/default.nix +++ b/pkgs/development/libraries/CGAL/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, boost, gmp, mpfr }: +{ stdenv, fetchurl, cmake, boost, gmp, mpfr, mesa_glu }: stdenv.mkDerivation rec { version = "4.7"; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { # note: optional component libCGAL_ImageIO would need zlib and opengl; # there are also libCGAL_Qt{3,4} omitted ATM buildInputs = [ cmake boost gmp mpfr ]; + #propagatedBuildInputs = [ mesa_glu ]; doCheck = false; diff --git a/pkgs/development/libraries/accounts-qt/default.nix b/pkgs/development/libraries/accounts-qt/default.nix index e82d37f1d3c..a16a0ef8cf5 100644 --- a/pkgs/development/libraries/accounts-qt/default.nix +++ b/pkgs/development/libraries/accounts-qt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase }: +{ stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase, qmakeHook }: stdenv.mkDerivation rec { name = "accounts-qt-${version}"; @@ -12,12 +12,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ glib libaccounts-glib qtbase ]; - nativeBuildInputs = [ doxygen pkgconfig ]; + nativeBuildInputs = [ doxygen pkgconfig qmakeHook ]; - configurePhase = '' - runHook preConfigure - qmake PREFIX=$out LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake - runHook postConfigure + preConfigure = '' + qmakeFlags="$qmakeFlags LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 83635d9739f..dd86ca54081 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -6,8 +6,8 @@ assert x11Support -> libX11 != null && libSM != null; let - version = "1.8.20"; - sha256 = "0fkh3d5r57a659hw9lqnw4v0bc5556vx54fsf7l9c732ci6byksw"; + version = "1.10.8"; + sha256 = "0560y3hxpgh346w6avcrcz79c8ansmn771y5xpcvvlr6m8mx5wxs"; self = stdenv.mkDerivation { name = "dbus-${version}"; @@ -17,8 +17,7 @@ self = stdenv.mkDerivation { inherit sha256; }; - patches = [ ./ignore-missing-includedirs.patch ] - ++ lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; + patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; postPatch = '' substituteInPlace tools/Makefile.in \ --replace 'install-localstatelibDATA:' 'disabled:' \ diff --git a/pkgs/development/libraries/dbus/ignore-missing-includedirs.patch b/pkgs/development/libraries/dbus/ignore-missing-includedirs.patch deleted file mode 100644 index 2781f4ae3de..00000000000 --- a/pkgs/development/libraries/dbus/ignore-missing-includedirs.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -ru -x '*~' dbus-1.2.24-orig/bus/config-parser.c dbus-1.2.24/bus/config-parser.c ---- dbus-1.2.24-orig/bus/config-parser.c 2010-03-23 20:01:27.000000000 +0100 -+++ dbus-1.2.24/bus/config-parser.c 2010-07-20 14:17:20.000000000 +0200 -@@ -2159,12 +2159,16 @@ - - retval = FALSE; - -- dir = _dbus_directory_open (dirname, error); -+ dbus_error_init (&tmp_error); -+ -+ dir = _dbus_directory_open (dirname, &tmp_error); - - if (dir == NULL) -- goto failed; -+ { -+ retval = TRUE; -+ goto failed; -+ } - -- dbus_error_init (&tmp_error); - while (_dbus_directory_get_next_file (dir, &filename, &tmp_error)) - { - DBusString full_path; diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 756ebf81619..1487d92dada 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -2,15 +2,15 @@ , jasper, libintlOrEmpty, gobjectIntrospection, doCheck ? false }: let - ver_maj = "2.32"; - ver_min = "3"; + ver_maj = "2.34"; + ver_min = "0"; in stdenv.mkDerivation rec { name = "gdk-pixbuf-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://gnome/sources/gdk-pixbuf/${ver_maj}/${name}.tar.xz"; - sha256 = "0cfh87aqyqbfcwpbv1ihgmgfcn66il5q2n8yjyl8gxkjmkqp2rrb"; + sha256 = "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"; }; outputs = [ "dev" "out" "docdev" ]; diff --git a/pkgs/development/libraries/gegl/3.0.nix b/pkgs/development/libraries/gegl/3.0.nix index 575e2d562aa..1ca0a2b5925 100644 --- a/pkgs/development/libraries/gegl/3.0.nix +++ b/pkgs/development/libraries/gegl/3.0.nix @@ -1,13 +1,12 @@ -{ stdenv, fetchgit, pkgconfig, glib, babl, libpng, cairo, libjpeg, which +{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which , librsvg, pango, gtk, bzip2, intltool, libtool, automake, autoconf, json_glib }: stdenv.mkDerivation rec { - name = "gegl-0.3.0-20140619"; + name = "gegl-0.3.6"; - src = fetchgit { - url = "https://git.gnome.org/browse/gegl"; - sha256 = "1rjmv2y7z34zrnlqczmmh0bm724iszzdf6jpibszxnp3w0npwjrb"; - rev = "0014eb1bad50244314ed09592fe57efa9322678c"; + src = fetchurl { + url = "http://download.gimp.org/pub/gegl/0.3/${name}.tar.bz2"; + sha256 = "08m7dlf2kwmp7jw3qskwxas192swhn1g4jcd8aldg9drfjygprvh"; }; configureScript = "./autogen.sh"; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 120d398bd44..b3b9dfcef16 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -39,8 +39,8 @@ let ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true ''; - ver_maj = "2.46"; - ver_min = "2"; + ver_maj = "2.48"; + ver_min = "0"; in stdenv.mkDerivation rec { @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz"; - sha256 = "5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db"; + sha256 = "0d3w2hblrw7vvpx60l1kbvb830ygn3v8zhwdz65cc5593j9ycjvl"; }; patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch; diff --git a/pkgs/development/libraries/gnutls/3.4.nix b/pkgs/development/libraries/gnutls/3.4.nix index 6d196978cdf..71c3010467c 100644 --- a/pkgs/development/libraries/gnutls/3.4.nix +++ b/pkgs/development/libraries/gnutls/3.4.nix @@ -1,11 +1,11 @@ { callPackage, fetchurl, autoreconfHook, ... } @ args: callPackage ./generic.nix (args // rec { - version = "3.4.6"; + version = "3.4.11"; src = fetchurl { url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-${version}.tar.xz"; - sha256 = "1v109px1sy1s731fnawzdsvggdswmr7ha9q5lid4v8pzgznmkdgy"; + sha256 = "1f4sbb38xab46h67a3pm6kybgrahjx3vbrn66qq3cbc2jngrrvvh"; }; # This fixes some broken parallel dependencies diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 47ccb17e484..55abb21845b 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -7,7 +7,7 @@ # In that case its about 6MB which could be separated let - ver_maj = "1.46"; + ver_maj = "1.48"; ver_min = "0"; in with stdenv.lib; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz"; - sha256 = "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233"; + sha256 = "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs"; }; outputs = [ "dev" "out" ]; diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index a2da4c7b033..dcbf0b4a47c 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -11,8 +11,8 @@ assert cupsSupport -> cups != null; with stdenv.lib; let - ver_maj = "3.18"; - ver_min = "5"; + ver_maj = "3.20"; + ver_min = "3"; version = "${ver_maj}.${ver_min}"; in stdenv.mkDerivation rec { @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz"; - sha256 = "107aeb9a4244ce3c044becdd6dffc32d83202595181597180d4c736302a71852"; + sha256 = "3834f3bf23b260b3e5ebfea41102e2026a8af29e36c3620edf4a5cf05e82f694"; }; outputs = [ "dev" "out" ]; diff --git a/pkgs/development/libraries/herqq/default.nix b/pkgs/development/libraries/herqq/default.nix index fee12592c63..39d5b2c792a 100644 --- a/pkgs/development/libraries/herqq/default.nix +++ b/pkgs/development/libraries/herqq/default.nix @@ -1,11 +1,9 @@ -{ stdenv, fetchurl, qt4, unzip }: +{ stdenv, fetchurl, qt4, qmake4Hook, unzip }: stdenv.mkDerivation rec { name = "herqq-1.0.0"; - buildInputs = [ qt4 unzip ]; - - configurePhase = "qmake PREFIX=$out herqq.pro"; + buildInputs = [ qt4 unzip qmake4Hook ]; src = fetchurl { url = "mirror://sourceforge/hupnp/${name}.zip"; diff --git a/pkgs/development/libraries/json-glib/default.nix b/pkgs/development/libraries/json-glib/default.nix index e49063a9de9..5cfafc8e69a 100644 --- a/pkgs/development/libraries/json-glib/default.nix +++ b/pkgs/development/libraries/json-glib/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, glib, pkgconfig, gobjectIntrospection, dbus }: stdenv.mkDerivation rec { - name = "json-glib-${minVer}.2"; - minVer = "1.0"; + name = "json-glib-${minVer}.0"; + minVer = "1.2"; src = fetchurl { url = "mirror://gnome/sources/json-glib/${minVer}/${name}.tar.xz"; - sha256 = "887bd192da8f5edc53b490ec51bf3ffebd958a671f5963e4f3af32c22e35660a"; + sha256 = "1lx7p1c7cl21byvfgw92n8dhm09vi6qxrs0zkx9dg3y096zdzmlr"; }; configureflags= "--with-introspection"; diff --git a/pkgs/development/libraries/libcommuni/default.nix b/pkgs/development/libraries/libcommuni/default.nix index 008311c620c..7b83be7e911 100644 --- a/pkgs/development/libraries/libcommuni/default.nix +++ b/pkgs/development/libraries/libcommuni/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, qt5, stdenv +{ fetchgit, qtbase, qmakeHook, stdenv }: stdenv.mkDerivation rec { @@ -11,16 +11,16 @@ stdenv.mkDerivation rec { sha256 = "15sb7vinaaz1v5nclxpnp5p9a0kmfmlgiqibkipnyydizclidpfx"; }; - buildInputs = [ qt5.qtbase ]; + buildInputs = [ qtbase ]; + nativeBuildInputs = [ qmakeHook ]; enableParallelBuild = true; - postPatch = '' - sed -i -e 's|/bin/pwd|pwd|g' -e 's/which/type -P/' configure + configurePhase = '' + sed -i -e 's|/bin/pwd|pwd|g' configure + ./configure -config release -prefix $out -qmake $QMAKE ''; - configureFlags = [ "-config release" ]; - meta = with stdenv.lib; { description = "A cross-platform IRC framework written with Qt"; homepage = https://communi.github.io; diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 79cf45a8005..da4d3a9822f 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, nasm, autoreconfHook }: +{ stdenv, fetchurl, nasm }: stdenv.mkDerivation rec { name = "libjpeg-turbo-1.4.2"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" "bin" ]; - buildInputs = [ autoreconfHook nasm ]; + nativeBuildInputs = [ nasm ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libkeyfinder/default.nix b/pkgs/development/libraries/libkeyfinder/default.nix index 729df918e57..d95ada04a34 100644 --- a/pkgs/development/libraries/libkeyfinder/default.nix +++ b/pkgs/development/libraries/libkeyfinder/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, qtbase }: +{ stdenv, fetchFromGitHub, fftw, qtbase, qmakeHook }: stdenv.mkDerivation rec { name = "libkeyfinder-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "ibsh"; }; - buildInputs = [ fftw qtbase ]; + buildInputs = [ fftw qtbase qmakeHook ]; postPatch = '' substituteInPlace LibKeyFinder.pro \ @@ -19,12 +19,6 @@ stdenv.mkDerivation rec { --replace "-stdlib=libc++" "" ''; - configurePhase = '' - runHook preConfigure - qmake - runHook postConfigure - ''; - enableParallelBuilding = true; postInstall = '' diff --git a/pkgs/development/libraries/libqglviewer/default.nix b/pkgs/development/libraries/libqglviewer/default.nix index 6b40eeb3b1f..eef9e05ca03 100644 --- a/pkgs/development/libraries/libqglviewer/default.nix +++ b/pkgs/development/libraries/libqglviewer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4 }: +{ stdenv, fetchurl, qt4, qmake4Hook }: stdenv.mkDerivation rec { name = "libqglviewer-2.6.3"; @@ -9,13 +9,11 @@ stdenv.mkDerivation rec { sha256 = "00jdkyk4wg1356c3ar6nk3hyp494ya3yvshq9m57kfmqpn3inqdy"; }; - buildInputs = [ qt4 ]; + buildInputs = [ qt4 qmake4Hook ]; - buildPhase = + postPatch = '' cd QGLViewer - qmake PREFIX=$out - make ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libsigcxx/default.nix b/pkgs/development/libraries/libsigcxx/default.nix index 1171fa079cf..e062e2db5c2 100644 --- a/pkgs/development/libraries/libsigcxx/default.nix +++ b/pkgs/development/libraries/libsigcxx/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, fetchpatch, pkgconfig, gnum4 }: let - ver_maj = "2.6"; # odd major numbers are unstable - ver_min = "2"; + ver_maj = "2.8"; # odd major numbers are unstable + ver_min = "0"; in stdenv.mkDerivation rec { name = "libsigc++-${ver_maj}.${ver_min}"; src = fetchurl { url = "mirror://gnome/sources/libsigc++/${ver_maj}/${name}.tar.xz"; - sha256 = "fdace7134c31de792c17570f9049ca0657909b28c4c70ec4882f91a03de54437"; + sha256 = "0lcnzzdq6718znfshs1hflpwqq6awbzwdyp4kv5lfaf54z880jbp"; }; patches = [(fetchpatch { url = "https://anonscm.debian.org/cgit/collab-maint/libsigc++-2.0.git/plain" diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index ad6bf8ba319..2d05861605a 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -23,7 +23,7 @@ else with { inherit (stdenv.lib) optional optionalString; }; let - version = "11.1.2"; + version = "11.1.3"; # this is the default search path for DRI drivers driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; in @@ -38,7 +38,7 @@ stdenv.mkDerivation { + head (splitString "." version) + ''.x/${version}/mesa-${version}.tar.xz'') "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" ]; - sha256 = "8f72aead896b340ba0f7a4a474bfaf71681f5d675592aec1cb7ba698e319148b"; + sha256 = "51f6658a214d75e4d9f05207586d7ed56ebba75c6b10841176fb6675efa310ac"; }; prePatch = "patchShebangs ."; diff --git a/pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix b/pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix index 844c2e58009..2f588cbe708 100644 --- a/pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix +++ b/pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix @@ -1,8 +1,7 @@ -{ stdenv, fetchurl, cmake, automoc4, qt4, pkgconfig, phonon, gstreamer -, gst_plugins_base }: +{ stdenv, fetchurl, cmake, automoc4, qt4, pkgconfig, phonon, gst_all_1 }: let - version = "4.7.2"; + version = "4.8.2"; pname = "phonon-backend-gstreamer"; in @@ -11,18 +10,24 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://kde/stable/phonon/${pname}/${version}/src/${name}.tar.xz"; - sha256 = "1cfjk450aajr8hfhnfq7zbmryprxiwr9ha5x585dsh7mja82mdw0"; + sha256 = "1q1ix6zsfnh6gfnpmwp67s376m7g7ahpjl1qp2fqakzb5cgzgq10"; }; - buildInputs = [ phonon qt4 gstreamer gst_plugins_base ]; + buildInputs = with gst_all_1; [ phonon qt4 gstreamer gst-plugins-base ]; nativeBuildInputs = [ cmake automoc4 pkgconfig ]; + NIX_CFLAGS_COMPILE = [ + # This flag should be picked up through pkgconfig, but it isn't. + "-I${gst_all_1.gstreamer}/lib/gstreamer-1.0/include" + ]; + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; meta = { homepage = http://phonon.kde.org/; description = "GStreamer backend for Phonon"; platforms = stdenv.lib.platforms.linux; - }; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; } diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix new file mode 100644 index 00000000000..3c731ca19e3 --- /dev/null +++ b/pkgs/development/libraries/phonon/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, cmake, mesa, pkgconfig, libpulseaudio +, qt4 ? null, automoc4 ? null +, qtbase ? null, qtquick1 ? null, qttools ? null +, debug ? false }: + +with stdenv.lib; + +let + v = "4.8.3"; + withQt5 = qtbase != null; +in + +assert withQt5 -> qtquick1 != null; +assert withQt5 -> qttools != null; +assert !withQt5 -> automoc4 != null; + +stdenv.mkDerivation rec { + name = "phonon-${v}"; + + meta = { + homepage = http://phonon.kde.org/; + description = "Multimedia API for Qt"; + license = stdenv.lib.licenses.lgpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${v}/src/phonon-${v}.tar.xz"; + sha256 = "05nshngk03ln90vsjz44dx8al576f4vd5fvhs1l0jmx13jb9q551"; + }; + + buildInputs = + [ mesa libpulseaudio ] + ++ (if withQt5 then [ qtbase qtquick1 qttools ] else [ qt4 ]); + + nativeBuildInputs = + [ cmake pkgconfig ] + ++ optional (!withQt5) automoc4; + + NIX_CFLAGS_COMPILE = "-fPIC"; + + cmakeFlags = + [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ] + ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON"; + + postPatch = '' + sed -i PhononConfig.cmake.in \ + -e "/get_filename_component(rootDir/ s/^.*$//" \ + -e "s,\\(set(PHONON_INCLUDE_DIR\\).*$,\\1 \"''${!outputDev}/include\")," \ + -e "s,\\(set(PHONON_LIBRARY_DIR\\).*$,\\1 \"''${!outputLib}/lib\")," \ + -e "s,\\(set(PHONON_BUILDSYSTEM_DIR\\).*$,\\1 \"''${!outputDev}/share/phonon${if withQt5 then "4qt5" else ""}/buildsystem\")," + ''; +} diff --git a/pkgs/development/libraries/phonon/qt4/default.nix b/pkgs/development/libraries/phonon/qt4/default.nix deleted file mode 100644 index 9875b216e06..00000000000 --- a/pkgs/development/libraries/phonon/qt4/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchurl, cmake, automoc4, libpulseaudio, qt4 }: - -with stdenv.lib; - -let - v = "4.8.1"; -in - -stdenv.mkDerivation rec { - name = "phonon-${v}"; - - src = fetchurl { - url = "mirror://kde/stable/phonon/${v}/phonon-${v}.tar.xz"; - sha256 = "1l97h1jj3gvl1chx1qbipizfvjgqc05wrhdcflc76c2krlk03jmn"; - }; - - buildInputs = [ qt4 libpulseaudio ]; - - nativeBuildInputs = [ cmake automoc4 ]; - - meta = { - homepage = http://phonon.kde.org/; - description = "Multimedia API for Qt"; - license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ ttuegel ]; - }; -} diff --git a/pkgs/development/libraries/phonon/qt5/default.nix b/pkgs/development/libraries/phonon/qt5/default.nix deleted file mode 100644 index fc07344d2d1..00000000000 --- a/pkgs/development/libraries/phonon/qt5/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ stdenv, fetchurl, cmake, mesa, pkgconfig, libpulseaudio -, qtbase, qtquick1, qttools -, debug ? false }: - -with stdenv.lib; - -let - v = "4.8.3"; -in - -stdenv.mkDerivation rec { - name = "phonon-${v}"; - - src = fetchurl { - url = "mirror://kde/stable/phonon/${v}/src/phonon-${v}.tar.xz"; - sha256 = "05nshngk03ln90vsjz44dx8al576f4vd5fvhs1l0jmx13jb9q551"; - }; - - buildInputs = [ mesa qtbase qtquick1 qttools libpulseaudio ]; - - nativeBuildInputs = [ cmake pkgconfig ]; - - NIX_CFLAGS_COMPILE = "-fPIC"; - - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" - "-DPHONON_BUILD_PHONON4QT5=ON" - "-DCMAKE_INSTALL_LIBDIR=lib" - ]; - - meta = { - homepage = http://phonon.kde.org/; - description = "Multimedia API for Qt"; - license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ ttuegel ]; - }; -} diff --git a/pkgs/development/libraries/polkit-qt-1/default.nix b/pkgs/development/libraries/polkit-qt-1/default.nix deleted file mode 100644 index 3715158705c..00000000000 --- a/pkgs/development/libraries/polkit-qt-1/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, fetchurl, cmake, pkgconfig, polkit, automoc4, glib -, qt4 ? null -, withQt5 ? false, qtbase ? null }: - -with stdenv.lib; - -assert (withQt5 -> qtbase != null); assert (!withQt5 -> qt4 != null); - -stdenv.mkDerivation { - name = "polkit-qt-1-0.112.0"; - - src = fetchurl { - url = "mirror://kde/stable/apps/KDE4.x/admin/polkit-qt-1-0.112.0.tar.bz2"; - sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"; - }; - - nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt5) automoc4; - - propagatedBuildInputs = [ polkit glib ] ++ [(if withQt5 then qtbase else qt4)]; - - meta = { - description = "A Qt wrapper around PolKit"; - maintainers = with stdenv.lib.maintainers; [ ttuegel ]; - }; -} diff --git a/pkgs/development/libraries/polkit-qt-1/qt-4.nix b/pkgs/development/libraries/polkit-qt-1/qt-4.nix new file mode 100644 index 00000000000..fa5c77aa27a --- /dev/null +++ b/pkgs/development/libraries/polkit-qt-1/qt-4.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, cmake, pkgconfig, polkit, automoc4, glib, qt4 }: + +with stdenv.lib; + +stdenv.mkDerivation { + name = "polkit-qt-1-qt4-0.112.0"; + + src = fetchurl { + url = "mirror://kde/stable/apps/KDE4.x/admin/polkit-qt-1-0.112.0.tar.bz2"; + sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"; + }; + + nativeBuildInputs = [ cmake pkgconfig automoc4 ]; + + propagatedBuildInputs = [ polkit glib qt4 ]; + + meta = { + description = "A Qt wrapper around PolKit"; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/development/libraries/polkit-qt-1/qt-5.nix b/pkgs/development/libraries/polkit-qt-1/qt-5.nix new file mode 100644 index 00000000000..bdeb175b89f --- /dev/null +++ b/pkgs/development/libraries/polkit-qt-1/qt-5.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, cmake, pkgconfig, polkit, glib, qtbase }: + +with stdenv.lib; + +stdenv.mkDerivation { + name = "polkit-qt-1-qt5-0.112.0"; + + outputs = [ "dev" "out" ]; + + src = fetchurl { + url = "mirror://kde/stable/apps/KDE4.x/admin/polkit-qt-1-0.112.0.tar.bz2"; + sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + + propagatedBuildInputs = [ polkit glib qtbase ]; + + postFixup = '' + # Fix library location in CMake module + sed -i "$dev/lib/cmake/PolkitQt5-1/PolkitQt5-1Config.cmake" \ + -e "s,\\(set_and_check.POLKITQT-1_LIB_DIR\\).*$,\\1 \"''${!outputLib}/lib\")," + ''; + + meta = { + description = "A Qt wrapper around PolKit"; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/development/libraries/qmltermwidget/default.nix b/pkgs/development/libraries/qmltermwidget/default.nix index 359a4341537..1620649a3cc 100644 --- a/pkgs/development/libraries/qmltermwidget/default.nix +++ b/pkgs/development/libraries/qmltermwidget/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, qtbase, qtquick1 }: +{ stdenv, fetchgit, qtbase, qtquick1, qmakeHook }: stdenv.mkDerivation rec { version = "0.1.0"; @@ -11,19 +11,14 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtquick1 ]; + nativeBuildInputs = [ qmakeHook ]; patchPhase = '' substituteInPlace qmltermwidget.pro \ --replace '$$[QT_INSTALL_QML]' "/lib/qt5/qml/" ''; - configurePhase = '' - runHook preConfigure - qmake PREFIX=$out - runHook postConfigure - ''; - - installPhase=''make INSTALL_ROOT="$out" install''; + installFlags = [ "INSTALL_ROOT=$(out)" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qoauth/default.nix b/pkgs/development/libraries/qoauth/default.nix index f93e4479e71..5a448d33067 100644 --- a/pkgs/development/libraries/qoauth/default.nix +++ b/pkgs/development/libraries/qoauth/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, qca2 }: +{ stdenv, fetchurl, qt4, qca2, qmake4Hook }: stdenv.mkDerivation { name = "qoauth-1.0.1"; @@ -9,13 +9,13 @@ stdenv.mkDerivation { sha256 = "1ax0g4dd49a3a1699ams13bkhz690xfwqg8rxp1capbdpf2aa8cp"; }; - configurePhase = "qmake PREFIX=$prefix"; patchPhase = "sed -e 's/lib64/lib/g' -i src/src.pro"; buildInputs = [ qt4 qca2 ]; + nativeBuildInputs = [ qmake4Hook ]; - NIX_CFLAGS_COMPILE="-I${qca2}/include/QtCrypto"; - NIX_LDFLAGS = "-lqca"; + NIX_CFLAGS_COMPILE = [ "-I${qca2}/include/QtCrypto" ]; + NIX_LDFLAGS = [ "-lqca" ]; meta = { description = "Qt library for OAuth authentication"; diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 26d412e5a8c..bc44f53fa6e 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt }: +{ stdenv, fetchurl, qt4, qmake4Hook }: stdenv.mkDerivation rec { pname = "qscintilla"; @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { sha256 = "d7c32e32582f93779de861006d87467b38b9ebc06e3d0b32e981cb24369fa417"; }; - buildInputs = [ qt ]; + buildInputs = [ qt4 ]; + nativeBuildInputs = [ qmake4Hook ]; preConfigure = '' cd Qt4Qt5 @@ -20,7 +21,6 @@ stdenv.mkDerivation rec { -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \ -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \ qscintilla.pro - qmake qscintilla.pro ''; meta = { diff --git a/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh b/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh new file mode 100644 index 00000000000..bf716a72d0f --- /dev/null +++ b/pkgs/development/libraries/qt-4.x/4.8/qmake-hook.sh @@ -0,0 +1,11 @@ +qmakeConfigurePhase() { + runHook preConfigure + + $QMAKE PREFIX=$out $qmakeFlags + + runHook postConfigure +} + +export QMAKE=@qt4@/bin/qmake + +configurePhase=qmakeConfigurePhase diff --git a/pkgs/development/libraries/qt-5/5.4/default.nix b/pkgs/development/libraries/qt-5/5.4/default.nix index df2fb8ad186..950129ba541 100644 --- a/pkgs/development/libraries/qt-5/5.4/default.nix +++ b/pkgs/development/libraries/qt-5/5.4/default.nix @@ -37,12 +37,10 @@ let inherit src; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); - nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig ]; + nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ self.fixQtModuleCMakeConfig self.qmakeHook ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; - dontAddPrefix = args.dontAddPrefix or true; dontFixLibtool = args.dontFixLibtool or true; - configureScript = args.configureScript or "qmake"; outputs = args.outputs or [ "dev" "out" ]; setOutputFlags = false; @@ -109,6 +107,7 @@ let makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh; + qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh; }; diff --git a/pkgs/development/libraries/qt-5/5.4/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.4/qmake-hook.sh new file mode 100644 index 00000000000..a38f9f578e3 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.4/qmake-hook.sh @@ -0,0 +1,101 @@ +if [[ -z "$QMAKE" ]]; then + +_qtLinkDependencyDir() { + @lndir@/bin/lndir -silent "$1/$2" "$qtOut/$2" + if [ -n "$NIX_QT_SUBMODULE" ]; then + find "$1/$2" -printf "$2/%P\n" >> "$out/nix-support/qt-inputs" + fi +} + +_qtLinkModule() { + if [ -d "$1/mkspecs" ]; then + # $1 is a Qt module + _qtLinkDependencyDir "$1" mkspecs + + for dir in bin include lib share; do + if [ -d "$1/$dir" ]; then + _qtLinkDependencyDir "$1" "$dir" + fi + done + fi +} + +_qtRmModules() { + cat "$out/nix-support/qt-inputs" | while read file; do + if [ -h "$out/$file" ]; then + rm "$out/$file" + fi + done + + cat "$out/nix-support/qt-inputs" | while read file; do + if [ -d "$out/$file" ]; then + rmdir --ignore-fail-on-non-empty -p "$out/$file" + fi + done + + rm "$out/nix-support/qt-inputs" +} + +_qtRmQmake() { + rm "$qtOut/bin/qmake" "$qtOut/bin/qt.conf" +} + +_qtSetQmakePath() { + export PATH="$qtOut/bin${PATH:+:}$PATH" +} + +_qtMultioutModuleDevs() { + # We cannot simply set these paths in configureFlags because libQtCore retains + # references to the paths it was built with. + moveToOutput "bin" "${!outputDev}" + moveToOutput "include" "${!outputDev}" + + # The destination directory must exist or moveToOutput will do nothing + mkdir -p "${!outputDev}/share" + moveToOutput "share/doc" "${!outputDev}" +} + +qmakeConfigurePhase() { + runHook preConfigure + + qmake PREFIX=$out $qmakeFlags + + runHook postConfigure +} + +qtOut="" +if [[ -z "$NIX_QT_SUBMODULE" ]]; then + qtOut=`mktemp -d` +else + qtOut=$out +fi + +mkdir -p "$qtOut/bin" "$qtOut/mkspecs" "$qtOut/include" "$qtOut/nix-support" "$qtOut/lib" "$qtOut/share" + +cp "@qt_dev@/bin/qmake" "$qtOut/bin" +cat >"$qtOut/bin/qt.conf" <> "$out/nix-support/qt-inputs" - fi -} - -_qtLinkModule() { - if [ -d "$1/mkspecs" ]; then - # $1 is a Qt module - _qtLinkDependencyDir "$1" mkspecs - - for dir in bin include lib share; do - if [ -d "$1/$dir" ]; then - _qtLinkDependencyDir "$1" "$dir" - fi - done - fi -} - -_qtRmModules() { - cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -h "$out/$file" ]]; then - rm "$out/$file" - fi - done - - cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -d "$out/$file" ]]; then - rmdir --ignore-fail-on-non-empty -p "$out/$file" - fi - done - - rm "$out/nix-support/qt-inputs" -} - addToSearchPathOnceWithCustomDelimiter() { local delim="$1" local search="$2" @@ -43,11 +5,14 @@ addToSearchPathOnceWithCustomDelimiter() { local dirs local exported IFS="$delim" read -a dirs <<< "${!search}" - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$target" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$target\"" + local canonical + if canonical=$(readlink -e "$target"); then + for dir in ${dirs[@]}; do + if [ "z$dir" == "z$canonical" ]; then exported=1; fi + done + if [ -z $exported ]; then + eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" + fi fi } @@ -63,6 +28,7 @@ _qtPropagateRuntimeDependencies() { for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do if [ -d "$1/$dir" ]; then propagateOnce propagatedBuildInputs "$1" + propagateOnce propagatedUserEnvPkgs "$1" break fi done @@ -71,63 +37,14 @@ _qtPropagateRuntimeDependencies() { addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" } -_qtRmQmake() { - rm "$qtOut/bin/qmake" "$qtOut/bin/qt.conf" -} - -_qtSetQmakePath() { - export PATH="$qtOut/bin${PATH:+:}$PATH" -} - -_qtMultioutModuleDevs() { - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "${!outputDev}" - moveToOutput "include" "${!outputDev}" - - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "${!outputDev}/share" - moveToOutput "share/doc" "${!outputDev}" -} +envHooks+=(_qtPropagateRuntimeDependencies) _qtMultioutDevs() { # This is necessary whether the package is a Qt module or not moveToOutput "mkspecs" "${!outputDev}" } -qtOut="" -if [[ -z "$NIX_QT_SUBMODULE" ]]; then - qtOut=`mktemp -d` -else - qtOut=$out -fi - -mkdir -p "$qtOut/bin" "$qtOut/mkspecs" "$qtOut/include" "$qtOut/nix-support" "$qtOut/lib" "$qtOut/share" - -cp "@dev@/bin/qmake" "$qtOut/bin" -cat >"$qtOut/bin/qt.conf" <> "$out/nix-support/qt-inputs" + fi +} + +_qtLinkModule() { + if [ -d "$1/mkspecs" ]; then + # $1 is a Qt module + _qtLinkDependencyDir "$1" mkspecs + + for dir in bin include lib share; do + if [ -d "$1/$dir" ]; then + _qtLinkDependencyDir "$1" "$dir" + fi + done + fi +} + +_qtRmModules() { + cat "$out/nix-support/qt-inputs" | while read file; do + if [ -h "$out/$file" ]; then + rm "$out/$file" + fi + done + + cat "$out/nix-support/qt-inputs" | while read file; do + if [ -d "$out/$file" ]; then + rmdir --ignore-fail-on-non-empty -p "$out/$file" + fi + done + + rm "$out/nix-support/qt-inputs" +} + +_qtRmQmake() { + rm "$qtOut/bin/qmake" "$qtOut/bin/qt.conf" +} + +_qtSetQmakePath() { + export PATH="$qtOut/bin${PATH:+:}$PATH" +} + +_qtMultioutModuleDevs() { + # We cannot simply set these paths in configureFlags because libQtCore retains + # references to the paths it was built with. + moveToOutput "bin" "${!outputDev}" + moveToOutput "include" "${!outputDev}" + + # The destination directory must exist or moveToOutput will do nothing + mkdir -p "${!outputDev}/share" + moveToOutput "share/doc" "${!outputDev}" +} + +qmakeConfigurePhase() { + runHook preConfigure + + qmake PREFIX=$out $qmakeFlags + + runHook postConfigure +} + +qtOut="" +if [[ -z "$NIX_QT_SUBMODULE" ]]; then + qtOut=`mktemp -d` +else + qtOut=$out +fi + +mkdir -p "$qtOut/bin" "$qtOut/mkspecs" "$qtOut/include" "$qtOut/nix-support" "$qtOut/lib" "$qtOut/share" + +cp "@qt_dev@/bin/qmake" "$qtOut/bin" +cat >"$qtOut/bin/qt.conf" <append("/lib/qt5/plugins"); -+ QString canonicalPath = QDir(*it).canonicalPath(); -+ if (!canonicalPath.isEmpty() -+ && !app_libpaths->contains(canonicalPath)) { -+ app_libpaths->append(canonicalPath); -+ } ++ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); ++ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins"); ++ Q_FOREACH (const QByteArray &profile, profiles) { ++ if (!profile.isEmpty()) { ++ app_libpaths->append(QFile::decodeName(profile) + plugindir); + } + } } diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh index 9cf1ef9ccb6..a9c4fbc855f 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh @@ -1,41 +1,3 @@ -if [[ -z "$QMAKE" ]]; then - -_qtLinkDependencyDir() { - @lndir@/bin/lndir -silent "$1/$2" "$qtOut/$2" - if [[ -n "$NIX_QT_SUBMODULE" ]]; then - find "$1/$2" -printf "$2/%P\n" >> "$out/nix-support/qt-inputs" - fi -} - -_qtLinkModule() { - if [ -d "$1/mkspecs" ]; then - # $1 is a Qt module - _qtLinkDependencyDir "$1" mkspecs - - for dir in bin include lib share; do - if [ -d "$1/$dir" ]; then - _qtLinkDependencyDir "$1" "$dir" - fi - done - fi -} - -_qtRmModules() { - cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -h "$out/$file" ]]; then - rm "$out/$file" - fi - done - - cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -d "$out/$file" ]]; then - rmdir --ignore-fail-on-non-empty -p "$out/$file" - fi - done - - rm "$out/nix-support/qt-inputs" -} - addToSearchPathOnceWithCustomDelimiter() { local delim="$1" local search="$2" @@ -43,11 +5,14 @@ addToSearchPathOnceWithCustomDelimiter() { local dirs local exported IFS="$delim" read -a dirs <<< "${!search}" - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$target" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$target\"" + local canonical + if canonical=$(readlink -e "$target"); then + for dir in ${dirs[@]}; do + if [ "z$dir" == "z$canonical" ]; then exported=1; fi + done + if [ -z $exported ]; then + eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" + fi fi } @@ -72,63 +37,14 @@ _qtPropagateRuntimeDependencies() { addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" } -_qtRmQmake() { - rm "$qtOut/bin/qmake" "$qtOut/bin/qt.conf" -} - -_qtSetQmakePath() { - export PATH="$qtOut/bin${PATH:+:}$PATH" -} - -_qtMultioutModuleDevs() { - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "${!outputDev}" - moveToOutput "include" "${!outputDev}" - - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "${!outputDev}/share" - moveToOutput "share/doc" "${!outputDev}" -} +envHooks+=(_qtPropagateRuntimeDependencies) _qtMultioutDevs() { # This is necessary whether the package is a Qt module or not moveToOutput "mkspecs" "${!outputDev}" } -qtOut="" -if [[ -z "$NIX_QT_SUBMODULE" ]]; then - qtOut=`mktemp -d` -else - qtOut=$out -fi - -mkdir -p "$qtOut/bin" "$qtOut/mkspecs" "$qtOut/include" "$qtOut/nix-support" "$qtOut/lib" "$qtOut/share" - -cp "@dev@/bin/qmake" "$qtOut/bin" -cat >"$qtOut/bin/qt.conf" <