Merge branch 'qmake-hook' into staging

This commit is contained in:
Nikolay Amiantov 2016-04-20 19:18:36 +03:00
commit 35cef635ff
111 changed files with 623 additions and 821 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, openssl, db48, boost { stdenv, fetchurl, pkgconfig, openssl, db48, boost
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode , zlib, miniupnpc, qt4, qmake4Hook, utillinux, protobuf, qrencode
, withGui }: , withGui }:
with stdenv.lib; with stdenv.lib;
@ -15,13 +15,11 @@ stdenv.mkDerivation rec{
buildInputs = [ pkgconfig openssl db48 boost zlib buildInputs = [ pkgconfig openssl db48 boost zlib
miniupnpc utillinux protobuf ] miniupnpc utillinux protobuf ]
++ optionals withGui [ qt4 qrencode ]; ++ optionals withGui [ qt4 qmake4Hook qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ]
++ optionals withGui [ "--with-gui=qt4" ]; ++ optionals withGui [ "--with-gui=qt4" ];
configurePhase = optional withGui "qmake";
preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile"; preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile";
installPhase = installPhase =

View File

@ -1,4 +1,4 @@
{ stdenv, db4, boost, openssl, qt4, miniupnpc, unzip, namecoind }: { stdenv, db4, boost, openssl, qt4, qmake4Hook, miniupnpc, unzip, namecoind }:
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -7,15 +7,9 @@ stdenv.mkDerivation rec {
version = namecoind.version; version = namecoind.version;
src = namecoind.src; src = namecoind.src;
buildInputs = [ db4 boost openssl unzip qt4 miniupnpc ]; buildInputs = [ db4 boost openssl unzip qt4 qmake4Hook miniupnpc ];
configurePhase = '' qmakeFlags = [ "USE_UPNP=-" ];
qmake USE_UPNP=-
'';
buildPhase = ''
make
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, openssl, db48, boost { stdenv, fetchurl, pkgconfig, openssl, db48, boost
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode , zlib, miniupnpc, qt4, qmake4Hook, utillinux, protobuf, qrencode
, withGui }: , withGui }:
with stdenv.lib; with stdenv.lib;
@ -15,13 +15,11 @@ stdenv.mkDerivation rec{
buildInputs = [ pkgconfig openssl db48 boost zlib buildInputs = [ pkgconfig openssl db48 boost zlib
miniupnpc utillinux protobuf ] miniupnpc utillinux protobuf ]
++ optionals withGui [ qt4 qrencode ]; ++ optionals withGui [ qt4 qmake4Hook qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ]
++ optionals withGui [ "--with-gui=qt4" ]; ++ optionals withGui [ "--with-gui=qt4" ];
configurePhase = optional withGui "qmake";
preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile"; preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile";
installPhase = installPhase =

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, makeQtWrapper }: { stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmakeHook, makeQtWrapper }:
let let
@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
owner = "gillesdegottex"; owner = "gillesdegottex";
}; };
buildInputs = [ fftw libsndfile qtbase qtmultimedia ]; buildInputs = [ fftw libsndfile qtbase qtmultimedia qmakeHook ];
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper ];
@ -47,10 +47,8 @@ in stdenv.mkDerivation rec {
cp -Rv "${libqaudioextra.src}"/* external/libqaudioextra cp -Rv "${libqaudioextra.src}"/* external/libqaudioextra
''; '';
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags PREFIXSHORTCUT=$out"
qmake PREFIX=$out PREFIXSHORTCUT=$out dfasma.pro
runHook postConfigure
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fftw, freeglut, qtbase, qtmultimedia { stdenv, fetchFromGitHub, fftw, freeglut, mesa_glu, qtbase, qtmultimedia, qmakeHook
, alsaSupport ? true, alsaLib ? null , alsaSupport ? true, alsaLib ? null
, jackSupport ? false, libjack2 ? null , jackSupport ? false, libjack2 ? null
, portaudioSupport ? false, portaudio ? null }: , portaudioSupport ? false, portaudio ? null }:
@ -18,22 +18,17 @@ stdenv.mkDerivation rec {
owner = "gillesdegottex"; owner = "gillesdegottex";
}; };
buildInputs = [ fftw freeglut qtbase qtmultimedia ] buildInputs = [ fftw freeglut mesa_glu qtbase qtmultimedia qmakeHook ]
++ stdenv.lib.optionals alsaSupport [ alsaLib ] ++ stdenv.lib.optionals alsaSupport [ alsaLib ]
++ stdenv.lib.optionals jackSupport [ libjack2 ] ++ stdenv.lib.optionals jackSupport [ libjack2 ]
++ stdenv.lib.optionals portaudioSupport [ portaudio ]; ++ stdenv.lib.optionals portaudioSupport [ portaudio ];
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags \
mkdir build
cd build
qmake \
CONFIG+=${stdenv.lib.optionalString alsaSupport "acs_alsa"} \ CONFIG+=${stdenv.lib.optionalString alsaSupport "acs_alsa"} \
CONFIG+=${stdenv.lib.optionalString jackSupport "acs_jack"} \ CONFIG+=${stdenv.lib.optionalString jackSupport "acs_jack"} \
CONFIG+=${stdenv.lib.optionalString portaudioSupport "acs_portaudio"} \ CONFIG+=${stdenv.lib.optionalString portaudioSupport "acs_portaudio"} \
PREFIX="$out" PREFIXSHORTCUT="$out" \ PREFIXSHORTCUT=$out"
../fmit.pro
runHook postConfigure
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qt5 { stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmakeHook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -11,13 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj"; sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj";
}; };
buildInputs = [ alsaLib pkgconfig qt5.qtbase qt5.qtscript ]; buildInputs = [ alsaLib pkgconfig qtbase qtscript qmakeHook ];
configurePhase = '' qmakeFlags = [ "PREFIX=/" ];
runHook preConfigure
qmake PREFIX=/
runHook postConfigure
'';
installFlags = [ "INSTALL_ROOT=$(out)" ]; installFlags = [ "INSTALL_ROOT=$(out)" ];

View File

@ -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 { stdenv.mkDerivation rec {
name = "keyfinder-${version}"; name = "keyfinder-${version}";
@ -11,21 +11,14 @@ stdenv.mkDerivation rec {
owner = "ibsh"; owner = "ibsh";
}; };
buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns taglib ]; buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns qmakeHook taglib ];
postPatch = '' postPatch = ''
substituteInPlace is_KeyFinder.pro \ substituteInPlace is_KeyFinder.pro \
--replace "keyfinder.0" "keyfinder" \ --replace "keyfinder.0" "keyfinder" \
--replace '$$[QT_INSTALL_PREFIX]' "$out" \
--replace "-stdlib=libc++" "" --replace "-stdlib=libc++" ""
''; '';
configurePhase = ''
runHook preConfigure
qmake
runHook postConfigure
'';
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -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 { stdenv.mkDerivation rec {
name = "qtscrobbler-${version}"; name = "qtscrobbler-${version}";
@ -9,18 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba"; sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba";
}; };
nativeBuildInputs = lib.optionals withMtp [ pkgconfig which ]; nativeBuildInputs = [ qmake4Hook ] ++ lib.optionals withMtp [ pkgconfig which ];
buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp; buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp;
enableParallelBuilding = true; enableParallelBuilding = true;
postPatch = '' postPatch = ''
cd src 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; { meta = with lib; {
description = "Qt based last.fm scrobbler"; description = "Qt based last.fm scrobbler";
longDescription = '' longDescription = ''

View File

@ -3,7 +3,7 @@
{ stdenv, fetchurl, alsaLib, bzip2, fftw, libjack2, libX11, liblo { stdenv, fetchurl, alsaLib, bzip2, fftw, libjack2, libX11, liblo
, libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate , libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate
, libsndfile, pkgconfig, libpulseaudio, makeQtWrapper, qtbase, redland , libsndfile, pkgconfig, libpulseaudio, makeQtWrapper, qtbase, redland
, rubberband, serd, sord, vampSDK, fftwFloat , qmakeHook, rubberband, serd, sord, vampSDK, fftwFloat
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = buildInputs =
[ libsndfile qtbase fftw fftwFloat bzip2 librdf rubberband [ libsndfile qtbase qmakeHook fftw fftwFloat bzip2 librdf rubberband
libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland
serd serd
sord sord
@ -32,13 +32,12 @@ stdenv.mkDerivation rec {
libX11 libX11
]; ];
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper qmakeHook ];
buildPhase = '' configurePhase = ''
for i in sonic-visualiser svapp svcore svgui; for i in sonic-visualiser svapp svcore svgui;
do cd $i && qmake -makefile PREFIX=$out && cd ..; do cd $i && qmake PREFIX=$out && cd ..;
done done
make
''; '';
installPhase = '' installPhase = ''

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, qt4, pkgconfig, hunspell}: { stdenv, fetchurl, qt4, qmake4Hook, pkgconfig, hunspell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "focuswriter-${version}"; name = "focuswriter-${version}";
@ -9,11 +9,11 @@ stdenv.mkDerivation rec {
sha256 = "1i58jxbiy95ijf81g8c3gwxhcg3irzssna3wv7vhrd57g4lcfj0w"; 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 = { meta = {
description = "Simple, distraction-free writing environment"; description = "Simple, distraction-free writing environment";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, poppler_qt4, zlib, pkgconfig, poppler}: { stdenv, fetchurl, qt4, qmake4Hook, poppler_qt4, zlib, pkgconfig, poppler }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "texmaker"; pname = "texmaker";
@ -11,11 +11,11 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qt4 poppler_qt4 zlib ]; buildInputs = [ qt4 poppler_qt4 zlib ];
nativeBuildInputs = [ pkgconfig poppler ]; nativeBuildInputs = [ pkgconfig poppler qmake4Hook ];
NIX_CFLAGS_COMPILE="-I${poppler}/include/poppler"; NIX_CFLAGS_COMPILE="-I${poppler}/include/poppler";
preConfigure = '' 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; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, poppler_qt4, zlib, pkgconfig}: { stdenv, fetchurl, qt4, qmake4Hook, poppler_qt4, zlib, pkgconfig}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "texstudio"; pname = "texstudio";
@ -11,11 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "1smmc4xqs8x8qzp6iqj2wr4xarfnxxxp6rq6chx1kb256w75jwfw"; sha256 = "1smmc4xqs8x8qzp6iqj2wr4xarfnxxxp6rq6chx1kb256w75jwfw";
}; };
buildInputs = [ qt4 poppler_qt4 zlib pkgconfig]; buildInputs = [ qt4 qmake4Hook poppler_qt4 zlib pkgconfig ];
preConfigure = '' qmakeFlags = [ "NO_APPDATA=True" ];
qmake PREFIX=$out NO_APPDATA=True texstudio.pro
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "TeX and LaTeX editor"; description = "TeX and LaTeX editor";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qtbase, qttools, pkgconfig, python }: { stdenv, fetchurl, qtbase, qttools, qmakeHook, pkgconfig, python }:
let let
version = "0.12.3"; version = "0.12.3";
@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
inherit sha256; inherit sha256;
}; };
buildInputs = [ qtbase qttools pkgconfig python ]; buildInputs = [ qtbase qttools qmakeHook pkgconfig python ];
preConfigure = "qmake -r PREFIX=$out";
meta = { meta = {
description = "A free, easy to use and flexible tile map editor"; description = "A free, easy to use and flexible tile map editor";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, libpng, python3, boost, mesa, qtbase, ncurses }: { stdenv, fetchgit, libpng, python3, boost, mesa, qtbase, qmakeHook, ncurses }:
let let
gitRev = "745eca3a2d2657c495d5509e9083c884e021d09c"; gitRev = "745eca3a2d2657c495d5509e9083c884e021d09c";
@ -31,16 +31,14 @@ in
mesa qtbase ncurses mesa qtbase ncurses
]; ];
configurePhase = '' nativeBuildHooks = [ qmakeHook ];
runHook preConfigure
preConfigure = ''
export GITREV=${gitRev} export GITREV=${gitRev}
export GITBRANCH=${gitBranch} export GITBRANCH=${gitBranch}
export GITTAG=${gitTag} export GITTAG=${gitTag}
cd qt cd qt
export sourceRoot=$sourceRoot/qt
qmake antimony.pro PREFIX=$out
runHook postConfigure
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, qtbase, makeWrapper }: { lib, stdenv, fetchurl, qtbase, qmakeHook, makeWrapper }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "awesomebump-4.0"; name = "awesomebump-4.0";
@ -10,9 +10,7 @@ stdenv.mkDerivation {
setSourceRoot = "sourceRoot=$(echo */Sources)"; setSourceRoot = "sourceRoot=$(echo */Sources)";
buildInputs = [ qtbase makeWrapper ]; buildInputs = [ qtbase qmakeHook makeWrapper ];
preBuild = "qmake";
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -3,7 +3,7 @@ To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/ 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 { stdenv.mkDerivation rec {
name = "leocad-${version}"; name = "leocad-${version}";
@ -14,12 +14,11 @@ stdenv.mkDerivation rec {
sha256 = "1190gb437ls51hhfiwa79fq131026kywpy3j3k4fkdgfr8a9v3q8"; sha256 = "1190gb437ls51hhfiwa79fq131026kywpy3j3k4fkdgfr8a9v3q8";
}; };
buildInputs = [ qt4 zlib ]; buildInputs = [ qt4 qmake4Hook zlib ];
prefixKey = "INSTALL_PREFIX=";
configureScript = "qmake leocad.pro";
postPatch = '' postPatch = ''
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan(" substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip}: { stdenv, fetchurl, qt4, bzip2, lib3ds, levmar, muparser, unzip, vcg }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "meshlab-1.3.3"; name = "meshlab-1.3.3";
@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
buildPhase = '' buildPhase = ''
mkdir -p "$out/include" 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" export NIX_LDFLAGS="-rpath $out/opt/meshlab $NIX_LDFLAGS"
cd meshlab/src cd meshlab/src
pushd external pushd external
@ -38,7 +36,7 @@ stdenv.mkDerivation rec {
sourceRoot = "."; sourceRoot = ".";
buildInputs = [ qt4 unzip ]; buildInputs = [ qt4 unzip vcg ];
meta = { meta = {
description = "System for the processing and editing of unstructured 3D triangular meshes"; description = "System for the processing and editing of unstructured 3D triangular meshes";

View File

@ -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 , mpfr, gmp, glib, pkgconfig, harfbuzz, qscintilla, gettext
}: }:
@ -12,13 +12,11 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ 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 pkgconfig harfbuzz qscintilla gettext
]; ];
configurePhase = '' qmakeFlags = [ "VERSION=${version}" ];
qmake PREFIX="$out" VERSION=${version}
'';
doCheck = false; doCheck = false;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qtbase, exiv2 }: { stdenv, fetchFromGitHub, qtbase, qmakeHook, exiv2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "phototonic-${version}"; name = "phototonic-${version}";
@ -14,16 +14,12 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qtbase exiv2 ]; buildInputs = [ qtbase exiv2 ];
nativeBuildInputs = [ qmakeHook ];
configurePhase = '' preConfigure = ''
runHook preConfigure sed -i 's;/usr;$$PREFIX/;g' phototonic.pro
sed -i 's;/usr;;' phototonic.pro
qmake PREFIX=""
runHook postConfigure
''; '';
installFlags = [ "INSTALL_ROOT=$(out)" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An image viewer and organizer"; description = "An image viewer and organizer";
homepage = http://oferkv.github.io/phototonic/; homepage = http://oferkv.github.io/phototonic/;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, qt4, exiv2, openexr, fftwSinglePrec, libtiff, ilmbase }: {stdenv, fetchurl, qt4, qmake4Hook, exiv2, openexr, fftwSinglePrec, libtiff, ilmbase }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qtpfsgui-1.9.3"; name = "qtpfsgui-1.9.3";
@ -9,15 +9,19 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qt4 exiv2 openexr fftwSinglePrec libtiff ]; buildInputs = [ qt4 exiv2 openexr fftwSinglePrec libtiff ];
nativeBuildInputs = [ qmake4Hook ];
configurePhase = '' preConfigure = ''
export CPATH="${ilmbase}/include/OpenEXR:$CPATH" 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 = { meta = {
homepage = http://qtpfsgui.sourceforge.net/; homepage = http://qtpfsgui.sourceforge.net/;
description = "Qtpfsqui, a graphical application for high dynamic range (HDR) imaging"; description = "Qtpfsqui, a graphical application for high dynamic range (HDR) imaging";

View File

@ -1,5 +1,5 @@
{ stdenv, fetchgit, cgal, boost, gmp, mpfr, flex, bison, dxflib, readline { stdenv, fetchgit, cgal, boost, gmp, mpfr, flex, bison, dxflib, readline
, qtbase , qtbase, qmakeHook, mesa_glu
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -12,14 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "15c18jvgbwyrfhv7r35ih0gzx35vjlsbi984h1sckgh2z17hjq8l"; sha256 = "15c18jvgbwyrfhv7r35ih0gzx35vjlsbi984h1sckgh2z17hjq8l";
}; };
buildInputs = [ qtbase cgal boost gmp mpfr flex bison dxflib readline ]; buildInputs = [ qtbase qmakeHook cgal boost gmp mpfr flex bison dxflib readline mesa_glu ];
configurePhase = ''
runHook preConfigure
qmake
sed -e "s@/usr/@$out/@g" -i $(find . -name Makefile)
runHook postConfigure
'';
meta = { meta = {
license = stdenv.lib.licenses.gpl3; license = stdenv.lib.licenses.gpl3;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchgit, makeQtWrapper, qtbase, qtquick1, qmltermwidget, { stdenv, fetchgit, makeQtWrapper, qtbase, qtquick1, qmltermwidget,
qtquickcontrols, qtgraphicaleffects }: qtquickcontrols, qtgraphicaleffects, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.0.0"; version = "1.0.0";
@ -17,15 +17,9 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ]; buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ];
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper qmakeHook ];
configurePhase = '' installFlags = [ "INSTALL_ROOT=$(out)" ];
runHook preConfigure
qmake PREFIX=$out
runHook postConfigure
'';
installPhase = "make -j $NIX_BUILD_CORES INSTALL_ROOT=$out install";
preFixup = '' preFixup = ''
mv $out/usr/share $out/share mv $out/usr/share $out/share

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, poppler_qt4 }: { stdenv, fetchurl, qt4, poppler_qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.1.3"; version = "2.1.3";
@ -12,13 +12,12 @@ stdenv.mkDerivation rec {
patches = [ ./fix_path_poppler_qt4.patch ]; patches = [ ./fix_path_poppler_qt4.patch ];
buildInputs = [ qt4 poppler_qt4 ]; buildInputs = [ qt4 poppler_qt4 ];
nativeBuildInputs = [ qmake4Hook ];
preBuild = '' preConfigure = ''
substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4} substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4}
[ -e "*.qm" ] && make clean
lrelease diffpdf.pro lrelease diffpdf.pro
qmake -makefile PREFIX=\$out '';
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/man/man1 mkdir -p $out/bin $out/share/man/man1

View File

@ -1,4 +1,4 @@
{stdenv, fetchgit, bzip2, qt4, libX11}: { stdenv, fetchgit, bzip2, qt4, qmake4Hook, libX11 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "evopedia-${version}"; name = "evopedia-${version}";
@ -10,11 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "1biq9zaj8nhxx1pixidsn97iwp9qy1yslgl0znpa4d4p35jcg48g"; sha256 = "1biq9zaj8nhxx1pixidsn97iwp9qy1yslgl0znpa4d4p35jcg48g";
}; };
configurePhase = ''
qmake PREFIX=$out
'';
buildInputs = [ bzip2 qt4 libX11 ]; buildInputs = [ bzip2 qt4 libX11 ];
nativeBuildInputs = [ qmake4Hook ];
meta = { meta = {
description = "Offline Wikipedia Viewer"; description = "Offline Wikipedia Viewer";

View File

@ -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 { stdenv.mkDerivation rec {
version = "0.8.3-1"; version = "0.8.3-1";
@ -11,9 +11,7 @@ stdenv.mkDerivation rec {
# I think that openssl and zlib are required, but come through other # I think that openssl and zlib are required, but come through other
# packages # packages
buildInputs = [ db boost gmp mpfr miniupnpc qt4 unzip ]; buildInputs = [ db boost gmp mpfr miniupnpc qt4 unzip qmake4Hook ];
configurePhase = "qmake";
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -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 { stdenv.mkDerivation rec {
name = "goldendict-1.5.0.ec86515"; name = "goldendict-1.5.0.ec86515";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -8,10 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "070majwxbn15cy7sbgz7ljl8rkn7vcgkm10884v97csln7bfzwhr"; sha256 = "070majwxbn15cy7sbgz7ljl8rkn7vcgkm10884v97csln7bfzwhr";
}; };
buildInputs = [ pkgconfig qt4 libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff ]; buildInputs = [
configurePhase = '' pkgconfig qt4 libXtst libvorbis hunspell libao ffmpeg libeb
qmake PREFIX=$out 'CONFIG+=zim_support' lzo xz libtiff qmake4Hook
''; ];
qmakeFlags = [ "CONFIG+=zim_support" ];
meta = { meta = {
homepage = http://goldendict.org/; homepage = http://goldendict.org/;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qt4, gnuradio, boost, gnuradio-osmosdr { stdenv, fetchFromGitHub, qt4, qmake4Hook, gnuradio, boost, gnuradio-osmosdr
# drivers (optional): # drivers (optional):
, rtl-sdr, hackrf , rtl-sdr, hackrf
, pulseaudioSupport ? true, libpulseaudio , pulseaudioSupport ? true, libpulseaudio
@ -17,12 +17,12 @@ stdenv.mkDerivation rec {
sha256 = "02pavd1kc0gsnrl18bfa01r2f3j4j05zly4a8zwss9yrsgf8432x"; sha256 = "02pavd1kc0gsnrl18bfa01r2f3j4j05zly4a8zwss9yrsgf8432x";
}; };
nativeBuildInputs = [ qmake4Hook ];
buildInputs = [ buildInputs = [
qt4 gnuradio boost gnuradio-osmosdr rtl-sdr hackrf qt4 gnuradio boost gnuradio-osmosdr rtl-sdr hackrf
] ++ stdenv.lib.optionals pulseaudioSupport [ libpulseaudio ]; ] ++ stdenv.lib.optionals pulseaudioSupport [ libpulseaudio ];
configurePhase = ''qmake PREFIX="$out"'';
enableParallelBuilding = true; enableParallelBuilding = true;
postInstall = '' postInstall = ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, bzip2, qt4, libX11, xextproto, libXtst }: { stdenv, fetchurl, bzip2, qt4, qmake4Hook, libX11, xextproto, libXtst }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "keepassx-${version}"; name = "keepassx-${version}";
@ -9,14 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "1i5dq10x28mg7m4c0yacm32xfj4j7imir4ph8x9p0s2ym260c9ry"; sha256 = "1i5dq10x28mg7m4c0yacm32xfj4j7imir4ph8x9p0s2ym260c9ry";
}; };
configurePhase = ''
qmake PREFIX=$out
'';
patches = [ ./random.patch ]; patches = [ ./random.patch ];
buildInputs = [ bzip2 qt4 libX11 xextproto libXtst ]; buildInputs = [ bzip2 qt4 libX11 xextproto libXtst ];
nativeBuildInputs = [ qmake4Hook ];
meta = { meta = {
description = "Qt password manager compatible with its Win32 and Pocket PC versions"; description = "Qt password manager compatible with its Win32 and Pocket PC versions";
homepage = http://www.keepassx.org/; homepage = http://www.keepassx.org/;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, muparser, which, boost, pkgconfig }: { stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.0.9"; 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 sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
''; '';
configurePhase = '' qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];
qmake librecad.pro PREFIX=$out MUPARSER_DIR=${muparser} BOOST_DIR=${boost.dev}
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share mkdir -p $out/bin $out/share
@ -26,7 +24,7 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ qt4 muparser which boost ]; buildInputs = [ qt4 muparser which boost ];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig qmake4Hook ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, qt4, boost, proj, gdal_1_11}: { stdenv, fetchurl, qt4, qmake4Hook, boost, proj, gdal_1_11 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "merkaartor-0.18.1"; name = "merkaartor-0.18.1";
@ -7,12 +7,10 @@ stdenv.mkDerivation rec {
sha256 = "17qk45pmlxqigla1915dvn9pp91y85d2bkcaap4g3m8mk1crcsix"; sha256 = "17qk45pmlxqigla1915dvn9pp91y85d2bkcaap4g3m8mk1crcsix";
}; };
configurePhase = ''
qmake -makefile PREFIX=$out
'';
buildInputs = [ qt4 boost proj gdal_1_11 ]; buildInputs = [ qt4 boost proj gdal_1_11 ];
nativeBuildInputs = [ qmake4Hook ];
meta = { meta = {
description = "An openstreetmap editor"; description = "An openstreetmap editor";
homepage = http://merkaartor.org/; homepage = http://merkaartor.org/;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qt4, libpulseaudio }: { stdenv, fetchFromGitHub, qt4, qmake4Hook, libpulseaudio }:
let let
version = "1.0.0"; version = "1.0.0";
in in
@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ qt4 libpulseaudio ]; buildInputs = [ qt4 libpulseaudio ];
preBuild = "qmake multimon-ng.pro"; nativeBuildInputs = [ qmake4Hook ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4 }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "navipowm-0.2.4"; name = "navipowm-0.2.4";
@ -7,9 +7,8 @@ stdenv.mkDerivation rec {
sha256 = "1kdih8kwpgcgfh6l6njkr9gq2j5hv39xvzmzgvhip553kn6bss7b"; sha256 = "1kdih8kwpgcgfh6l6njkr9gq2j5hv39xvzmzgvhip553kn6bss7b";
}; };
configurePhase = '' preConfigure = ''
cd Qt/KDevelop cd Qt/KDevelop
qmake
''; '';
installPhase = '' installPhase = ''
@ -20,6 +19,7 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = [ qt4 ]; buildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
meta = { meta = {
homepage = http://navipowm.sourceforge.net/; homepage = http://navipowm.sourceforge.net/;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qt4, vcg, glew }: { stdenv, fetchFromGitHub, qt4, qmake4Hook, vcg, glew }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "openbrf-2016-01-09"; name = "openbrf-2016-01-09";
@ -10,18 +10,16 @@ stdenv.mkDerivation {
sha256 = "0laikpz0ljz7l5fgapwj09ygizmvj1iywnpfgfd0i14j46s134xb"; sha256 = "0laikpz0ljz7l5fgapwj09ygizmvj1iywnpfgfd0i14j46s134xb";
}; };
buildInputs = [ qt4 vcg glew ]; buildInputs = [ qt4 qmake4Hook vcg glew ];
enableParallelBuilding = true; enableParallelBuilding = true;
qmakeFlags = [ "openBrf.pro" ];
postPatch = '' postPatch = ''
sed -i 's,^VCGLIB .*,VCGLIB = ${vcg}/include,' openBrf.pro sed -i 's,^VCGLIB .*,VCGLIB = ${vcg}/include,' openBrf.pro
''; '';
configurePhase = ''
qmake PREFIX=$out openBrf.pro
'';
installPhase = '' installPhase = ''
install -Dm755 openBrf $out/bin/openBrf install -Dm755 openBrf $out/bin/openBrf
''; '';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qt }: { stdenv, fetchFromGitHub, qt4, qmake4Hook }:
let let
version = "1.08.03"; version = "1.08.03";
@ -13,23 +13,24 @@ stdenv.mkDerivation {
sha256 = "0kxb0n11agqid0nyqdspfndm03b8l0nl8x4yx2hsrizs6m5z08h4"; sha256 = "0kxb0n11agqid0nyqdspfndm03b8l0nl8x4yx2hsrizs6m5z08h4";
}; };
buildInputs = [ qt ]; buildInputs = [ qt4 ];
nativeBuildHooks = [ qmake4Hook ];
postUnpack = "sourceRoot=\${sourceRoot}/src"; postUnpack = "sourceRoot=\${sourceRoot}/src";
configurePhase = '' preConfigure = ''
qmake \ qmakeFlags="$qmakeFlags \
PREFIX=$out \
DESKTOPDIR=$out/share/applications \ DESKTOPDIR=$out/share/applications \
ICONDIR=$out/share/pixmaps \ ICONDIR=$out/share/pixmaps \
QtBitcoinTrader_Desktop.pro "
''; '';
meta = with stdenv.lib; meta = with stdenv.lib;
{ description = "Secure bitcoin trading client"; { description = "Secure bitcoin trading client";
homepage = https://centrabit.com/; homepage = https://centrabit.com/;
license = licenses.lgpl3; license = licenses.lgpl3;
platforms = qt.meta.platforms; platforms = qt4.meta.platforms;
maintainers = [ maintainers.ehmry ]; maintainers = [ maintainers.ehmry ];
}; };
} }

View File

@ -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 { stdenv.mkDerivation rec {
name = "qtpass-${version}"; name = "qtpass-${version}";
@ -9,12 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "60b458062f54184057e55dbd9c93958a8bf845244ffd70b9cb31bf58697f0dc6"; sha256 = "60b458062f54184057e55dbd9c93958a8bf845244ffd70b9cb31bf58697f0dc6";
}; };
buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools ]; buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools qmakeHook ];
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags CONFIG+=release DESTDIR=$out"
qmake CONFIG+=release PREFIX=$out DESTDIR=$out
runHook postConfigure
''; '';
installPhase = '' installPhase = ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, qt4, trousers }: { stdenv, fetchgit, qt4, qmake4Hook, trousers }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.8.1"; version = "0.8.1";
@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
sha256 = "24a606f88fed67ed0d0e61dc220295e9e1ab8db3ef3d028fa34b04ff30652d8e"; sha256 = "24a606f88fed67ed0d0e61dc220295e9e1ab8db3ef3d028fa34b04ff30652d8e";
}; };
buildInputs = [ qt4 trousers ]; nativeBuildInputs = [ qmake4Hook ];
preBuild = '' buildInputs = [ qt4 trousers ];
qmake -makefile PREFIX=\$out
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, pkgconfig, boost }: { fetchurl, stdenv, fetchgit, qtbase, qtx11extras, qmakeHook, pkgconfig, boost }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "twmn-git-2014-09-23"; name = "twmn-git-2014-09-23";
@ -9,13 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "9c91e9d3d6d7f9d90d34da6f1a4b9f3dee65605c1e43729417d6921c54dded6b"; sha256 = "9c91e9d3d6d7f9d90d34da6f1a4b9f3dee65605c1e43729417d6921c54dded6b";
}; };
buildInputs = [ qtbase qtx11extras pkgconfig boost ]; buildInputs = [ qtbase qtx11extras pkgconfig boost qmakeHook ];
configurePhase = '' postPatch = ''
runHook preConfigure
sed -i s/-Werror// twmnd/twmnd.pro sed -i s/-Werror// twmnd/twmnd.pro
qmake
runHook postConfigure
''; '';
installPhase = '' installPhase = ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, qt4 }: { stdenv, fetchurl, pkgconfig, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "vym-${version}"; name = "vym-${version}";
@ -9,11 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1x4qp6wpszscbbs4czkfvskm7qjglvxm813nqv281bpy4y1hhvgs"; sha256 = "1x4qp6wpszscbbs4czkfvskm7qjglvxm813nqv281bpy4y1hhvgs";
}; };
buildInputs = [ pkgconfig qt4 ]; buildInputs = [ pkgconfig qt4 qmake4Hook ];
configurePhase = ''
qmake PREFIX="$out"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A mind-mapping software"; description = "A mind-mapping software";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4 }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "arora-${version}"; name = "arora-${version}";
@ -10,8 +10,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qt4 ]; buildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
configurePhase = "qmake PREFIX=$out";
meta = with stdenv.lib; { meta = with stdenv.lib; {
platforms = qt4.meta.platforms; platforms = qt4.meta.platforms;

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, libtoxcore-dev, openal, opencv, { stdenv, fetchFromGitHub, pkgconfig, libtoxcore-dev, openal, opencv,
libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo, libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo,
pango, atk, qrencode, ffmpeg, filter-audio, makeWrapper, pango, atk, qrencode, ffmpeg, filter-audio, makeQtWrapper,
qtbase, qtsvg, qttools, qttranslations, sqlcipher }: qtbase, qtsvg, qttools, qmakeHook, qttranslations, sqlcipher }:
let let
version = "1.3.0"; version = "1.3.0";
@ -22,11 +22,11 @@ stdenv.mkDerivation rec {
[ [
libtoxcore-dev openal opencv libsodium filter-audio libtoxcore-dev openal opencv libsodium filter-audio
qtbase qttools qtsvg libXScrnSaver glib gtk2 cairo qtbase qttools qtsvg libXScrnSaver glib gtk2 cairo
pango atk qrencode ffmpeg qttranslations makeWrapper pango atk qrencode ffmpeg qttranslations makeQtWrapper
sqlcipher sqlcipher
]; ];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig qmakeHook ];
preConfigure = '' preConfigure = ''
# patch .pro file for proper set of the git hash # 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)" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags sqlcipher)"
''; '';
configurePhase = ''
runHook preConfigure
qmake
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp qtox $out/bin cp qtox $out/bin
wrapProgram $out/bin/qtox \ wrapQtProgram $out/bin/qtox
--prefix QT_PLUGIN_PATH : ${qtsvg}/lib/qt5/plugins
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, makeDesktopItem, unzip { stdenv, fetchurl, pkgconfig, makeDesktopItem, unzip
, qtbase, qttools, makeQtWrapper, qtmultimedia, qtquick1, qtquickcontrols , qtbase, qttools, makeQtWrapper, qtmultimedia, qtquick1, qtquickcontrols
, openssl, protobuf , openssl, protobuf, qmakeHook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -27,15 +27,13 @@ stdenv.mkDerivation rec {
openssl protobuf openssl protobuf
]; ];
nativeBuildInputs = [ pkgconfig makeQtWrapper ]; nativeBuildInputs = [ pkgconfig makeQtWrapper qmakeHook ];
preConfigure = '' preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)"
''; '';
configureScript = "qmake"; qmakeFlags = [ "DEFINES+=RICOCHET_NO_PORTABLE" ];
dontAddPrefix = true;
configureFlags = [ "PREFIX=$(out)" "DEFINES+=RICOCHET_NO_PORTABLE" ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -3,7 +3,7 @@
, qtimageformats, qtgraphicaleffects , qtimageformats, qtgraphicaleffects
, telegram-qml, libqtelegram-aseman-edition , telegram-qml, libqtelegram-aseman-edition
, gst_all_1 , gst_all_1
, makeQtWrapper }: , makeQtWrapper, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cutegram-${meta.version}"; name = "cutegram-${meta.version}";
@ -20,16 +20,10 @@ stdenv.mkDerivation rec {
telegram-qml libqtelegram-aseman-edition telegram-qml libqtelegram-aseman-edition
] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly ]); ] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly ]);
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper qmakeHook ];
enableParallelBuilding = true; enableParallelBuilding = true;
configurePhase = ''
runHook preConfigure
qmake -r PREFIX=$out
runHook postConfigure
'';
fixupPhase = '' fixupPhase = ''
wrapQtProgram $out/bin/cutegram \ wrapQtProgram $out/bin/cutegram \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub { stdenv, fetchFromGitHub
, qtbase, qtmultimedia, qtquick1 }: , qtbase, qtmultimedia, qtquick1, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libqtelegram-aseman-edition-${meta.version}"; name = "libqtelegram-aseman-edition-${meta.version}";
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qtbase qtmultimedia qtquick1 ]; buildInputs = [ qtbase qtmultimedia qtquick1 ];
nativeBuildInputs = [ qmakeHook ];
enableParallelBuilding = true; enableParallelBuilding = true;
patchPhase = '' patchPhase = ''
@ -19,12 +20,6 @@ stdenv.mkDerivation rec {
substituteInPlace libqtelegram-ae.pro --replace "/\$\$LIB_PATH" "" substituteInPlace libqtelegram-ae.pro --replace "/\$\$LIB_PATH" ""
''; '';
configurePhase = ''
runHook preConfigure
qmake -r PREFIX=$out
runHook postConfigure
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
version = "6.1"; version = "6.1";
description = "A fork of libqtelegram by Aseman, using qmake"; description = "A fork of libqtelegram by Aseman, using qmake";

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, fetchgit, qtbase, qtimageformats { stdenv, lib, fetchFromGitHub, fetchgit, qtbase, qtimageformats
, breakpad, ffmpeg, openalSoft, openssl, zlib, libexif, lzma, libopus , breakpad, ffmpeg, openalSoft, openssl, zlib, libexif, lzma, libopus
, gtk2, glib, cairo, pango, gdk_pixbuf, atk, libappindicator-gtk2 , 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 , pkgconfig, libxcb, xcbutilwm, xcbutilimage, xcbutilkeysyms
, libxkbcommon, libpng, libjpeg, freetype, harfbuzz, pcre16 , libxkbcommon, libpng, libjpeg, freetype, harfbuzz, pcre16
@ -31,7 +31,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
breakpad ffmpeg openalSoft openssl zlib libexif lzma libopus breakpad ffmpeg openalSoft openssl zlib libexif lzma libopus
gtk2 glib libappindicator-gtk2 libunity cairo pango gdk_pixbuf atk gtk2 glib libappindicator-gtk2 libunity cairo pango gdk_pixbuf atk
dee libdbusmenu-glib libva dee libdbusmenu-glib libva qmakeHook
# Qt dependencies # Qt dependencies
libxcb xcbutilwm xcbutilimage xcbutilkeysyms libxkbcommon libxcb xcbutilwm xcbutilimage xcbutilkeysyms libxkbcommon
libpng libjpeg freetype harfbuzz pcre16 xproto libX11 libpng libjpeg freetype harfbuzz pcre16 xproto libX11
@ -73,10 +73,9 @@ in stdenv.mkDerivation rec {
qtSrcs = qtbase.srcs ++ [ qtimageformats.src ]; qtSrcs = qtbase.srcs ++ [ qtimageformats.src ];
qtPatches = qtbase.patches; qtPatches = qtbase.patches;
buildCommand = '' dontUseQmakeConfigure = true;
# We don't use nativeBuildInputs to avoid adding system Qt 5 libraries to various paths.
export PATH="${qtbase}/bin:$PATH"
buildCommand = ''
unpackPhase unpackPhase
cd "$sourceRoot" cd "$sourceRoot"
patchPhase patchPhase

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub { stdenv, fetchFromGitHub
, qtbase, qtmultimedia, qtquick1 , qtbase, qtmultimedia, qtquick1, qmakeHook
, libqtelegram-aseman-edition }: , libqtelegram-aseman-edition }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
}; };
propagatedBuildInputs = [ qtbase qtmultimedia qtquick1 libqtelegram-aseman-edition ]; propagatedBuildInputs = [ qtbase qtmultimedia qtquick1 libqtelegram-aseman-edition ];
nativeBuildInputs = [ qmakeHook ];
enableParallelBuilding = true; enableParallelBuilding = true;
patchPhase = '' patchPhase = ''
@ -20,11 +21,7 @@ stdenv.mkDerivation rec {
substituteInPlace telegramqml.pro --replace "INSTALL_HEADERS_PREFIX/telegramqml" "INSTALL_HEADERS_PREFIX" substituteInPlace telegramqml.pro --replace "INSTALL_HEADERS_PREFIX/telegramqml" "INSTALL_HEADERS_PREFIX"
''; '';
configurePhase = '' qmakeFlags = [ "BUILD_MODE+=lib" ];
runHook preConfigure
qmake -r PREFIX=$out BUILD_MODE+=lib
runHook postConfigure
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
version = "0.9.2"; version = "0.9.2";

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl { stdenv, lib, fetchurl
, qt4, openssl , qt4, qmake4Hook, openssl
, xproto, libX11, libXScrnSaver, scrnsaverproto , xproto, libX11, libXScrnSaver, scrnsaverproto
, xz, zlib , xz, zlib
}: }:
@ -16,8 +16,10 @@ stdenv.mkDerivation rec {
qt4 openssl xproto libX11 libXScrnSaver scrnsaverproto xz zlib qt4 openssl xproto libX11 libXScrnSaver scrnsaverproto xz zlib
]; ];
configurePhase = '' nativeBuildInputs = [ qmake4Hook ];
qmake INSTALL_PREFIX=$out -recursive vacuum.pro
preConfigure = ''
qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ fetchgit, libcommuni, makeQtWrapper, qt5, stdenv }: { fetchgit, libcommuni, makeQtWrapper, qtbase, qmakeHook, stdenv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "communi-${version}"; name = "communi-${version}";
@ -10,23 +10,22 @@ stdenv.mkDerivation rec {
sha256 = "0gk6gck09zb44qfsal7bs4ln2vl9s9x3vfxh7jvfc7mmf7l3sspd"; sha256 = "0gk6gck09zb44qfsal7bs4ln2vl9s9x3vfxh7jvfc7mmf7l3sspd";
}; };
nativeBuildInputs = [ makeQtWrapper ]; nativeBuildInputs = [ makeQtWrapper qmakeHook ];
buildInputs = [ libcommuni qt5.qtbase ]; buildInputs = [ libcommuni qtbase ];
enableParallelBuild = true; enableParallelBuild = true;
configurePhase = '' preConfigure = ''
runHook preConfigure
export QMAKEFEATURES=${libcommuni}/features export QMAKEFEATURES=${libcommuni}/features
qmake -r \ qmakeFlags="$qmakeFlags \
COMMUNI_INSTALL_PREFIX=$out \ COMMUNI_INSTALL_PREFIX=$out \
COMMUNI_INSTALL_BINS=$out/bin \ COMMUNI_INSTALL_BINS=$out/bin \
COMMUNI_INSTALL_PLUGINS=$out/lib/communi/plugins \ COMMUNI_INSTALL_PLUGINS=$out/lib/communi/plugins \
COMMUNI_INSTALL_ICONS=$out/share/icons/hicolor \ COMMUNI_INSTALL_ICONS=$out/share/icons/hicolor \
COMMUNI_INSTALL_DESKTOP=$out/share/applications \ COMMUNI_INSTALL_DESKTOP=$out/share/applications \
COMMUNI_INSTALL_THEMES=$out/share/communi/themes COMMUNI_INSTALL_THEMES=$out/share/communi/themes
runHook postConfigure "
''; '';
postInstall = '' postInstall = ''

View File

@ -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 { stdenv.mkDerivation rec {
name = "linssid-${version}"; name = "linssid-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl"; sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl";
}; };
buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 ]; buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 qmakeHook ];
patches = [ ./0001-unbundled-qwt.patch ]; patches = [ ./0001-unbundled-qwt.patch ];
@ -27,12 +27,6 @@ stdenv.mkDerivation rec {
rm -fr qwt-lib rm -fr qwt-lib
''; '';
configurePhase = ''
runHook preConfigure
qmake linssid.pro
runHook postConfigure
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Graphical wireless scanning for Linux"; description = "Graphical wireless scanning for Linux";
homepage = http://sourceforge.net/projects/linssid/; homepage = http://sourceforge.net/projects/linssid/;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, fetchgit, pkgconfig { stdenv, fetchurl, fetchgit, pkgconfig
, qt4, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap , qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
, alsaLib , alsaLib
, jackSupport ? false, libjack2 ? null , jackSupport ? false, libjack2 ? null
, speechdSupport ? false, speechd ? null , speechdSupport ? false, speechd ? null
@ -20,13 +20,13 @@ let
patches = optional jackSupport ./mumble-jack-support.patch; patches = optional jackSupport ./mumble-jack-support.patch;
nativeBuildInputs = [ pkgconfig ] nativeBuildInputs = [ pkgconfig ]
++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}" ++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmakeHook ]; }."qt${toString source.qtVersion}"
++ (overrides.nativeBuildInputs or [ ]); ++ (overrides.nativeBuildInputs or [ ]);
buildInputs = [ boost protobuf avahi ] buildInputs = [ boost protobuf avahi ]
++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}" ++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}"
++ (overrides.buildInputs or [ ]); ++ (overrides.buildInputs or [ ]);
configureFlags = [ qmakeFlags = [
"CONFIG+=shared" "CONFIG+=shared"
"CONFIG+=no-g15" "CONFIG+=no-g15"
"CONFIG+=packaged" "CONFIG+=packaged"
@ -39,10 +39,8 @@ let
++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio"
++ (overrides.configureFlags or [ ]); ++ (overrides.configureFlags or [ ]);
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib"
qmake $configureFlags DEFINES+="PLUGIN_PATH=$out/lib"
runHook postConfigure
''; '';
makeFlags = [ "release" ]; makeFlags = [ "release" ];

View File

@ -1,5 +1,5 @@
{ stdenv, fetchgit, fetchurl, writeText { stdenv, fetchgit, fetchurl, writeText
, qt4, protobuf, libpcap , qt4, qmake4Hook, protobuf, libpcap
, wireshark, gzip, diffutils, gawk , wireshark, gzip, diffutils, gawk
}: }:
@ -18,10 +18,9 @@ stdenv.mkDerivation rec {
buildInputs = [ qt4 protobuf libpcap ]; buildInputs = [ qt4 protobuf libpcap ];
patches = [ ./drone_ini.patch ]; nativeBuildInputs = [ qmake4Hook ];
configurePhase = "qmake PREFIX=$out" patches = [ ./drone_ini.patch ];
+ stdenv.lib.optionalString stdenv.isDarwin " -spec macx-g++";
postInstall = '' postInstall = ''
cat > $out/bin/ostinato.ini <<EOF cat > $out/bin/ostinato.ini <<EOF

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, qt, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2 { stdenv, fetchFromGitHub, cmake, qt4, qmake4Hook, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2
, libXScrnSaver, speex, curl, libxml2, libxslt, sqlcipher, libmicrohttpd, opencv }: , libXScrnSaver, speex, curl, libxml2, libxslt, sqlcipher, libmicrohttpd, opencv }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -11,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "189qndkfq9kgv3qi3wx8ivla4j8fxr4iv7c8y9rjrjaz8jwdkn5x"; sha256 = "189qndkfq9kgv3qi3wx8ivla4j8fxr4iv7c8y9rjrjaz8jwdkn5x";
}; };
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2 -I${sqlcipher}/include/sqlcipher"; NIX_CFLAGS_COMPILE = [ "-I${glib.dev}/include/glib-2.0" "-I${glib.dev}/lib/glib-2.0/include" "-I${libxml2.dev}/include/libxml2" "-I${sqlcipher}/include/sqlcipher" ];
patchPhase = '' patchPhase = ''
# Fix build error # Fix build error
@ -29,11 +29,11 @@ stdenv.mkDerivation {
# retroshare-gui/src/retroshare-gui.pro \ # retroshare-gui/src/retroshare-gui.pro \
# retroshare-nogui/src/retroshare-nogui.pro # retroshare-nogui/src/retroshare-nogui.pro
buildInputs = [ speex qt libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig buildInputs = [ speex qt4 libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig qmake4Hook
protobuf bzip2 libXScrnSaver curl libxml2 libxslt sqlcipher libmicrohttpd opencv ]; protobuf bzip2 libXScrnSaver curl libxml2 libxslt sqlcipher libmicrohttpd opencv ];
configurePhase = '' preConfigure = ''
qmake PREFIX=$out DESTDIR=$out RetroShare.pro qmakeFlags="$qmakeFlags DESTDIR=$out"
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, qt, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2 { stdenv, fetchurl, cmake, qt4, qmake4Hook, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2
, libXScrnSaver, speex, curl, libxml2, libxslt }: , libXScrnSaver, speex, curl, libxml2, libxslt }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -9,7 +9,7 @@ stdenv.mkDerivation {
sha256 = "0l2n4pr1hq66q6qa073hrdx3s3d7iw54z8ay1zy82zhk2rwhsavp"; sha256 = "0l2n4pr1hq66q6qa073hrdx3s3d7iw54z8ay1zy82zhk2rwhsavp";
}; };
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2"; NIX_CFLAGS_COMPILE = [ "-I${glib.dev}/include/glib-2.0" "-I${glib.dev}/lib/glib-2.0/include" "-I${libxml2.dev}/include/libxml2" ];
patchPhase = '' patchPhase = ''
sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \ sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \
@ -22,13 +22,13 @@ stdenv.mkDerivation {
libretroshare/src/rsserver/rsinit.cc 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 ]; protobuf bzip2 libXScrnSaver curl libxml2 libxslt ];
sourceRoot = "retroshare-0.5.5/src"; sourceRoot = "retroshare-0.5.5/src";
configurePhase = '' preConfigure = ''
qmake PREFIX=$out DESTDIR=$out RetroShare.pro qmakeFlags="$qmakeFlags DESTDIR=$out"
''; '';
postInstall = '' postInstall = ''

View File

@ -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 { stdenv.mkDerivation rec {
name = "x2goclient-${version}"; name = "x2goclient-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ cups libssh libXpm nxproxy openldap qt4 ]; buildInputs = [ cups libssh libXpm nxproxy openldap qt4 ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper qmake4Hook ];
patchPhase = '' patchPhase = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
@ -19,7 +19,9 @@ stdenv.mkDerivation rec {
--replace "-o root -g root" "" --replace "-o root -g root" ""
''; '';
makeFlags = [ "PREFIX=$(out)" "ETCDIR=$(out)/etc" ]; preConfigure = ''
qmakeFlags="$qmakeFlags ETCDIR=$out/etc"
'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,7 +1,6 @@
{ stdenv, fetchurl, qtbase, qtsvg, boost }: { stdenv, fetchurl, qtbase, qtsvg, qmakeHook, boost }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.0b"; version = "0.9.0b";
name = "fritzing-${version}"; name = "fritzing-${version}";
@ -10,19 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "181qnknq1j5x075icpw2qk0sc4wcj9f2hym533vs936is0wxp2gk"; sha256 = "181qnknq1j5x075icpw2qk0sc4wcj9f2hym533vs936is0wxp2gk";
}; };
unpackPhase = '' buildInputs = [ qtbase qtsvg boost qmakeHook ];
tar xjf ${src}
'';
buildInputs = [ qtbase qtsvg boost ];
configurePhase = ''
runHook preConfigure
cd fritzing-${version}.source
echo $PATH
qmake PREFIX=$out phoenix.pro
runHook postConfigure
'';
meta = { meta = {
description = "An open source prototyping tool for Arduino-based projects"; description = "An open source prototyping tool for Arduino-based projects";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchgit, git, espeak, SDL, udev, doxygen, cmake, overrideCC#, gcc48 { stdenv, fetchgit, git, espeak, SDL, udev, doxygen, cmake, overrideCC#, gcc48
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns , qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects , qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmakeHook
, makeQtWrapper, lndir , makeQtWrapper, lndir
, gst_all_1, qt_gstreamer1, pkgconfig, glibc , gst_all_1, qt_gstreamer1, pkgconfig, glibc
, version ? "2.9.4" , version ? "2.9.4"
@ -23,21 +23,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig makeQtWrapper pkgconfig makeQtWrapper qmakeHook
] ++ qtInputs; ] ++ qtInputs;
patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ]; 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 = '' installPhase = ''
mkdir -p $out/share/applications mkdir -p $out/share/applications
cp -v qgroundcontrol.desktop $out/share/applications cp -v qgroundcontrol.desktop $out/share/applications

View File

@ -3,12 +3,7 @@
*/ */
args @ {pkgs}: with args; with pkgs; args @ {pkgs}: with args; with pkgs;
let let
inherit (pkgs) stdenv fetchgit fetchurl subversion; gitBase = callPackage ./git {
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;
texinfo = texinfo5; texinfo = texinfo5;
svnSupport = false; # for git-svn support svnSupport = false; # for git-svn support
guiSupport = false; # requires tcl/tk guiSupport = false; # requires tcl/tk
@ -64,44 +59,28 @@ rec {
git-stree = callPackage ./git-stree { }; git-stree = callPackage ./git-stree { };
git2cl = import ./git2cl { git2cl = callPackage ./git2cl { };
inherit fetchgit stdenv perl;
};
gitFastExport = import ./fast-export { gitFastExport = callPackage ./fast-export { };
inherit fetchgit stdenv mercurial coreutils git makeWrapper subversion;
};
gitRemoteGcrypt = callPackage ./git-remote-gcrypt { }; gitRemoteGcrypt = callPackage ./git-remote-gcrypt { };
gitflow = callPackage ./gitflow { }; gitflow = callPackage ./gitflow { };
hub = import ./hub { hub = callPackage ./hub {
inherit go;
inherit stdenv fetchgit;
inherit (darwin) Security; inherit (darwin) Security;
}; };
qgit = import ./qgit { qgit = callPackage ./qgit { };
inherit fetchurl stdenv;
inherit (xorg) libXext libX11;
qt = qt4;
};
qgitGit = import ./qgit/qgit-git.nix { qgitGit = callPackage ./qgit/qgit-git.nix { };
inherit fetchurl sourceFromHead stdenv;
inherit (xorg) libXext libX11;
qt = qt4;
};
stgit = import ./stgit { stgit = callPackage ./stgit {
inherit fetchurl stdenv python git;
}; };
subgit = callPackage ./subgit { }; subgit = callPackage ./subgit { };
svn2git = import ./svn2git { svn2git = callPackage ./svn2git {
inherit stdenv fetchurl ruby makeWrapper;
git = gitSVN; git = gitSVN;
}; };
@ -109,9 +88,7 @@ rec {
tig = callPackage ./tig { }; tig = callPackage ./tig { };
topGit = lib.makeOverridable (import ./topgit) { topGit = callPackage ./topgit { };
inherit stdenv fetchurl;
};
transcrypt = callPackage ./transcrypt { }; transcrypt = callPackage ./transcrypt { };
} }

View File

@ -1,21 +1,26 @@
{stdenv, fetchurl, qt, libXext, libX11}: { stdenv, fetchurl, qt4, qmake4Hook, libXext, libX11 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qgit-2.5"; name = "qgit-2.5";
meta = meta =
{ {
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
homepage = "http://libre.tibirna.org/projects/qgit/wiki/QGit"; homepage = "http://libre.tibirna.org/projects/qgit/wiki/QGit";
description = "Graphical front-end to Git"; description = "Graphical front-end to Git";
inherit (qt.meta) platforms; inherit (qt4.meta) platforms;
}; };
src = fetchurl src = fetchurl
{ {
url = "http://libre.tibirna.org/attachments/download/9/${name}.tar.gz"; url = "http://libre.tibirna.org/attachments/download/9/${name}.tar.gz";
sha256 = "25f1ca2860d840d87b9919d34fc3a1b05d4163671ed87d29c3e4a8a09e0b2499"; sha256 = "25f1ca2860d840d87b9919d34fc3a1b05d4163671ed87d29c3e4a8a09e0b2499";
}; };
buildInputs = [qt libXext libX11];
configurePhase = "qmake PREFIX=$out"; buildInputs = [ qt4 libXext libX11 ];
nativeBuildInputs = [ qmake4Hook ];
installPhase = '' installPhase = ''
install -s -D -m 755 bin/qgit "$out/bin/qgit" install -s -D -m 755 bin/qgit "$out/bin/qgit"
''; '';

View File

@ -1,20 +1,21 @@
{stdenv, fetchurl, qt, libXext, libX11, sourceFromHead}: { stdenv, fetchurl, qt4, qmake4Hook, libXext, libX11, sourceFromHead }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qgit-git"; name = "qgit-git";
meta = meta =
{ {
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
homepage = "http://digilander.libero.it/mcostalba/"; homepage = "http://digilander.libero.it/mcostalba/";
description = "Graphical front-end to Git"; description = "Graphical front-end to Git";
}; };
# REGION AUTO UPDATE: { name="qgit"; type="git"; url="git://git.kernel.org/pub/scm/qgit/qgit4.git"; } # REGION AUTO UPDATE: { name="qgit"; type="git"; url="git://git.kernel.org/pub/scm/qgit/qgit4.git"; }
src = sourceFromHead "qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz" src = sourceFromHead "qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz"
(fetchurl { url = "http://mawercer.de/~nix/repos/qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz"; sha256 = "17e4727ac68b4f2e8503289d5b6a2c042547e7be133e7f8195b79e33eab61b93"; }); (fetchurl { url = "http://mawercer.de/~nix/repos/qgit-a0252ed2a6a72b50e65d027adce8afa22e874277.tar.gz"; sha256 = "17e4727ac68b4f2e8503289d5b6a2c042547e7be133e7f8195b79e33eab61b93"; });
# END # END
buildInputs = [qt libXext libX11];
buildPhase = '' buildInputs = [ qt4 libXext libX11 ];
qmake PREFIX=$out
make nativeBuildInputs = [ qmake4Hook ];
'';
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, qt4, subversion, apr}: { stdenv, fetchgit, qt4, qmake4Hook, subversion, apr }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "svn2git-kde-1.0.5"; name = "svn2git-kde-1.0.5";
@ -9,10 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "818673fe751b00a42b6ed3e78a783549fb09b5245a01dee47b3dded667bfc582"; 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 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 = '' installPhase = ''
@ -22,5 +22,7 @@ stdenv.mkDerivation rec {
buildInputs = [ subversion apr qt4 ]; buildInputs = [ subversion apr qt4 ];
nativeBuildInputs = [ qmake4Hook ];
meta.broken = true; meta.broken = true;
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchmtn, qt4, pkgconfig, graphviz }: { stdenv, fetchurl, fetchmtn, qt4, qmake4Hook, pkgconfig, graphviz }:
let version = "1.0-mtn-head"; in let version = "1.0-mtn-head"; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,10 +16,7 @@ stdenv.mkDerivation rec {
branch = "net.venge.monotone.guitone"; branch = "net.venge.monotone.guitone";
}; };
buildInputs = [ qt4 pkgconfig graphviz ]; buildInputs = [ qt4 qmake4Hook pkgconfig graphviz ];
prefixKey="PREFIX=";
configureScript = "qmake guitone.pro";
meta = { meta = {
description = "Qt4 based GUI for monotone"; description = "Qt4 based GUI for monotone";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeQtWrapper { stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeQtWrapper
, libX11, libxcb, mesa , libX11, libxcb, mesa
, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras , qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmakeHook
, ffmpeg , ffmpeg
, libchardet , libchardet
, mpg123 , mpg123
@ -76,6 +76,8 @@ stdenv.mkDerivation rec {
${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"} ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"}
''; '';
dontUseQmakeConfigure = true;
configureFlags = with stdenv.lib; configureFlags = with stdenv.lib;
[ "--qmake=qmake" ] [ "--qmake=qmake" ]
++ optional jackSupport "--enable-jack" ++ optional jackSupport "--enable-jack"
@ -84,7 +86,7 @@ stdenv.mkDerivation rec {
++ optional cddaSupport "--enable-cdda" ++ optional cddaSupport "--enable-cdda"
; ;
nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper ]; nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper qmakeHook ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeDesktopItem, ffmpeg, qt4 }: { stdenv, fetchurl, makeDesktopItem, ffmpeg, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "clipgrab-${version}"; name = "clipgrab-${version}";
@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ ffmpeg qt4 ]; buildInputs = [ ffmpeg qt4 ];
nativeBuildInputs = [ qmake4Hook ];
postPatch = stdenv.lib.optionalString (ffmpeg != null) '' postPatch = stdenv.lib.optionalString (ffmpeg != null) ''
substituteInPlace converter_ffmpeg.cpp \ substituteInPlace converter_ffmpeg.cpp \
@ -18,9 +19,7 @@ stdenv.mkDerivation rec {
--replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg ' --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg '
''; '';
configurePhase = '' qmakeFlags = [ "clipgrab.pro" ];
qmake clipgrab.pro
'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2 { stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2
, gamin , gamin, qmake4Hook
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -12,14 +12,10 @@ stdenv.mkDerivation rec {
sha256 = "1xkkrhllgy2d7k0vrdj794ya7y3g3n7xh8c2qgnb26yrarz79dqj"; 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 ]; patches = [ ./linuxstopmotion-fix-wrong-isProcess-logic.patch ];
configurePhase = ''
qmake PREFIX="$out"
'';
# Installation breaks without this # Installation breaks without this
preInstall = '' preInstall = ''
mkdir -p "$out/share/stopmotion/translations/" mkdir -p "$out/share/stopmotion/translations/"

View File

@ -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 <tobias.geerinckx.rice@gmail.com> # "Free" API key generated by nckx <tobias.geerinckx.rice@gmail.com>
, withAPIKey ? "AIzaSyBtFgbln3bu1swQC-naMxMtKh384D3xJZE" }: , withAPIKey ? "AIzaSyBtFgbln3bu1swQC-naMxMtKh384D3xJZE" }:
@ -14,11 +14,9 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ phonon phonon_backend_vlc qt4 ]; buildInputs = [ phonon phonon_backend_vlc qt4 ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper qmake4Hook ];
configurePhase = '' qmakeFlags = [ "DEFINES+=APP_GOOGLE_API_KEY=${withAPIKey}" ];
qmake PREFIX=$out "DEFINES += APP_GOOGLE_API_KEY=${withAPIKey}"
'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchsvn, cmake, opencv, qt, giflib }: { stdenv, fetchsvn, cmake, opencv, qt4, giflib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qgifer-${version}"; name = "qgifer-${version}";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
substituteInPlace CMakeLists.txt --replace "SET(CMAKE_INSTALL_PREFIX" "#" substituteInPlace CMakeLists.txt --replace "SET(CMAKE_INSTALL_PREFIX" "#"
''; '';
buildInputs = [ cmake opencv qt giflib ]; buildInputs = [ cmake opencv qt4 giflib ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Video-based animated GIF creator"; description = "Video-based animated GIF creator";

View File

@ -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 { stdenv.mkDerivation rec {
name = "shotcut-${version}"; name = "shotcut-${version}";
@ -9,13 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1504ds3ppqmpg84nb2gb74qndqysjwn3xw7n8xv19kd1pppnr10f"; sha256 = "1504ds3ppqmpg84nb2gb74qndqysjwn3xw7n8xv19kd1pppnr10f";
}; };
buildInputs = [ SDL frei0r gettext makeWrapper mlt pkgconfig qtbase ]; buildInputs = [ SDL frei0r gettext makeWrapper mlt pkgconfig qtbase qmakeHook ];
configurePhase = ''
runHook preConfigure
qmake PREFIX=$out
runHook postConfigure
'';
postInstall = '' postInstall = ''
mkdir -p $out/share/shotcut mkdir -p $out/share/shotcut

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, libarchive, pkgconfig, qtbase { stdenv, fetchFromGitHub, libarchive, pkgconfig, qtbase
, qtimageformats, qtwebkit, qtx11extras, xorg }: , qtimageformats, qtwebkit, qtx11extras, xcbutilkeysyms, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.2.1"; version = "0.2.1";
@ -13,18 +13,12 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ buildInputs = [
xorg.xcbutilkeysyms pkgconfig qtbase qtimageformats qtwebkit qtx11extras libarchive xcbutilkeysyms pkgconfig qtbase qtimageformats qtwebkit qtx11extras libarchive qmakeHook
]; ];
configurePhase = '' qmakeFlags = [ "PREFIX=/" ];
runHook preConfigure
qmake PREFIX=/
runHook postConfigure
'';
installPhase = '' installFlags = [ "INSTALL_ROOT=$(out)" ];
make INSTALL_ROOT=$out install
'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ]; buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
NIX_CFLAGS_COMPILE = "-fPIC"; NIX_CFLAGS_COMPILE = [ "-fPIC" ];
postPatch = '' postPatch = ''
sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, boost, gmp, mpfr }: { stdenv, fetchurl, cmake, boost, gmp, mpfr, mesa_glu }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "4.7"; version = "4.7";
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
# note: optional component libCGAL_ImageIO would need zlib and opengl; # note: optional component libCGAL_ImageIO would need zlib and opengl;
# there are also libCGAL_Qt{3,4} omitted ATM # there are also libCGAL_Qt{3,4} omitted ATM
buildInputs = [ cmake boost gmp mpfr ]; buildInputs = [ cmake boost gmp mpfr ];
#propagatedBuildInputs = [ mesa_glu ];
doCheck = false; doCheck = false;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase }: { stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "accounts-qt-${version}"; name = "accounts-qt-${version}";
@ -12,12 +12,10 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ glib libaccounts-glib qtbase ]; buildInputs = [ glib libaccounts-glib qtbase ];
nativeBuildInputs = [ doxygen pkgconfig ]; nativeBuildInputs = [ doxygen pkgconfig qmakeHook ];
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake"
qmake PREFIX=$out LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake
runHook postConfigure
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,11 +1,9 @@
{ stdenv, fetchurl, qt4, unzip }: { stdenv, fetchurl, qt4, qmake4Hook, unzip }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "herqq-1.0.0"; name = "herqq-1.0.0";
buildInputs = [ qt4 unzip ]; buildInputs = [ qt4 unzip qmake4Hook ];
configurePhase = "qmake PREFIX=$out herqq.pro";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/hupnp/${name}.zip"; url = "mirror://sourceforge/hupnp/${name}.zip";

View File

@ -1,4 +1,4 @@
{ fetchgit, qt5, stdenv { fetchgit, qtbase, qmakeHook, stdenv
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -11,16 +11,16 @@ stdenv.mkDerivation rec {
sha256 = "15sb7vinaaz1v5nclxpnp5p9a0kmfmlgiqibkipnyydizclidpfx"; sha256 = "15sb7vinaaz1v5nclxpnp5p9a0kmfmlgiqibkipnyydizclidpfx";
}; };
buildInputs = [ qt5.qtbase ]; buildInputs = [ qtbase ];
nativeBuildInputs = [ qmakeHook ];
enableParallelBuild = true; enableParallelBuild = true;
postPatch = '' configurePhase = ''
sed -i -e 's|/bin/pwd|pwd|g' -e 's/which/type -P/' configure sed -i -e 's|/bin/pwd|pwd|g' configure
./configure -config release -prefix $out -qmake $QMAKE
''; '';
configureFlags = [ "-config release" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A cross-platform IRC framework written with Qt"; description = "A cross-platform IRC framework written with Qt";
homepage = https://communi.github.io; homepage = https://communi.github.io;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fftw, qtbase }: { stdenv, fetchFromGitHub, fftw, qtbase, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libkeyfinder-${version}"; name = "libkeyfinder-${version}";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
owner = "ibsh"; owner = "ibsh";
}; };
buildInputs = [ fftw qtbase ]; buildInputs = [ fftw qtbase qmakeHook ];
postPatch = '' postPatch = ''
substituteInPlace LibKeyFinder.pro \ substituteInPlace LibKeyFinder.pro \
@ -19,12 +19,6 @@ stdenv.mkDerivation rec {
--replace "-stdlib=libc++" "" --replace "-stdlib=libc++" ""
''; '';
configurePhase = ''
runHook preConfigure
qmake
runHook postConfigure
'';
enableParallelBuilding = true; enableParallelBuilding = true;
postInstall = '' postInstall = ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4 }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libqglviewer-2.6.3"; name = "libqglviewer-2.6.3";
@ -9,13 +9,11 @@ stdenv.mkDerivation rec {
sha256 = "00jdkyk4wg1356c3ar6nk3hyp494ya3yvshq9m57kfmqpn3inqdy"; sha256 = "00jdkyk4wg1356c3ar6nk3hyp494ya3yvshq9m57kfmqpn3inqdy";
}; };
buildInputs = [ qt4 ]; buildInputs = [ qt4 qmake4Hook ];
buildPhase = postPatch =
'' ''
cd QGLViewer cd QGLViewer
qmake PREFIX=$out
make
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, qtbase, qtquick1 }: { stdenv, fetchgit, qtbase, qtquick1, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.1.0"; version = "0.1.0";
@ -11,19 +11,14 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qtbase qtquick1 ]; buildInputs = [ qtbase qtquick1 ];
nativeBuildInputs = [ qmakeHook ];
patchPhase = '' patchPhase = ''
substituteInPlace qmltermwidget.pro \ substituteInPlace qmltermwidget.pro \
--replace '$$[QT_INSTALL_QML]' "/lib/qt5/qml/" --replace '$$[QT_INSTALL_QML]' "/lib/qt5/qml/"
''; '';
configurePhase = '' installFlags = [ "INSTALL_ROOT=$(out)" ];
runHook preConfigure
qmake PREFIX=$out
runHook postConfigure
'';
installPhase=''make INSTALL_ROOT="$out" install'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, qca2 }: { stdenv, fetchurl, qt4, qca2, qmake4Hook }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "qoauth-1.0.1"; name = "qoauth-1.0.1";
@ -9,13 +9,13 @@ stdenv.mkDerivation {
sha256 = "1ax0g4dd49a3a1699ams13bkhz690xfwqg8rxp1capbdpf2aa8cp"; sha256 = "1ax0g4dd49a3a1699ams13bkhz690xfwqg8rxp1capbdpf2aa8cp";
}; };
configurePhase = "qmake PREFIX=$prefix";
patchPhase = "sed -e 's/lib64/lib/g' -i src/src.pro"; patchPhase = "sed -e 's/lib64/lib/g' -i src/src.pro";
buildInputs = [ qt4 qca2 ]; buildInputs = [ qt4 qca2 ];
nativeBuildInputs = [ qmake4Hook ];
NIX_CFLAGS_COMPILE="-I${qca2}/include/QtCrypto"; NIX_CFLAGS_COMPILE = [ "-I${qca2}/include/QtCrypto" ];
NIX_LDFLAGS = "-lqca"; NIX_LDFLAGS = [ "-lqca" ];
meta = { meta = {
description = "Qt library for OAuth authentication"; description = "Qt library for OAuth authentication";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "qscintilla"; pname = "qscintilla";
@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "d7c32e32582f93779de861006d87467b38b9ebc06e3d0b32e981cb24369fa417"; sha256 = "d7c32e32582f93779de861006d87467b38b9ebc06e3d0b32e981cb24369fa417";
}; };
buildInputs = [ qt ]; buildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
preConfigure = '' preConfigure = ''
cd Qt4Qt5 cd Qt4Qt5
@ -20,7 +21,6 @@ stdenv.mkDerivation rec {
-e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \ -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/share/qt/translations," \
-e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \ -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," \
qscintilla.pro qscintilla.pro
qmake qscintilla.pro
''; '';
meta = { meta = {

View File

@ -0,0 +1,11 @@
qmakeConfigurePhase() {
runHook preConfigure
$QMAKE PREFIX=$out $qmakeFlags
runHook postConfigure
}
export QMAKE=@qt4@/bin/qmake
configurePhase=qmakeConfigurePhase

View File

@ -37,12 +37,10 @@ let
inherit src; inherit src;
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); 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; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
dontAddPrefix = args.dontAddPrefix or true;
dontFixLibtool = args.dontFixLibtool or true; dontFixLibtool = args.dontFixLibtool or true;
configureScript = args.configureScript or "qmake";
outputs = args.outputs or [ "dev" "out" ]; outputs = args.outputs or [ "dev" "out" ];
setOutputFlags = false; setOutputFlags = false;
@ -109,6 +107,7 @@ let
makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh;
fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh; fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh;
qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh;
}; };

View File

@ -0,0 +1,120 @@
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"
}
_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
addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins"
addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports"
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}"
}
_qtMultioutDevs() {
# This is necessary whether the package is a Qt module or not
moveToOutput "mkspecs" "${!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" <<EOF
[Paths]
Prefix = $qtOut
Plugins = lib/qt5/plugins
Imports = lib/qt5/imports
Qml2Imports = lib/qt5/qml
Documentation = share/doc/qt5
EOF
export QMAKE="$qtOut/bin/qmake"
envHooks+=(_qtLinkModule _qtPropagateRuntimeDependencies)
# Set PATH to find qmake first in a preConfigure hook
# It must run after all the envHooks!
postHooks+=(_qtSetQmakePath)
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
configurePhase=qmakeConfigurePhase
fi
preFixupHooks+=(_qtMultioutDevs)
if [ -n "$NIX_QT_SUBMODULE" ]; then
postInstallHooks+=(_qtRmQmake _qtRmModules)
preFixupHooks+=(_qtMultioutModuleDevs)
fi
fi

View File

@ -239,7 +239,6 @@ stdenv.mkDerivation {
fixQtModuleCMakeConfig "Xml" fixQtModuleCMakeConfig "Xml"
''; '';
inherit lndir;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -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() { addToSearchPathOnceWithCustomDelimiter() {
local delim="$1" local delim="$1"
local search="$2" local search="$2"
@ -43,11 +5,14 @@ addToSearchPathOnceWithCustomDelimiter() {
local dirs local dirs
local exported local exported
IFS="$delim" read -a dirs <<< "${!search}" IFS="$delim" read -a dirs <<< "${!search}"
for dir in ${dirs[@]}; do local canonical
if [ "z$dir" == "z$target" ]; then exported=1; fi if canonical=$(readlink -e "$target"); then
done for dir in ${dirs[@]}; do
if [ -z $exported ]; then if [ "z$dir" == "z$canonical" ]; then exported=1; fi
eval "export ${search}=\"${!search}${!search:+$delim}$target\"" done
if [ -z $exported ]; then
eval "export ${search}=\"${!search}${!search:+$delim}$canonical\""
fi
fi fi
} }
@ -59,76 +24,6 @@ propagateOnce() {
addToSearchPathOnceWithCustomDelimiter ' ' "$@" addToSearchPathOnceWithCustomDelimiter ' ' "$@"
} }
_qtPropagateRuntimeDependencies() {
for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do
if [ -d "$1/$dir" ]; then
propagateOnce propagatedBuildInputs "$1"
break
fi
done
addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins"
addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports"
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}"
}
_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" <<EOF
[Paths]
Prefix = $qtOut
Plugins = lib/qt5/plugins
Imports = lib/qt5/imports
Qml2Imports = lib/qt5/qml
Documentation = share/doc/qt5
EOF
export QMAKE="$qtOut/bin/qmake"
envHooks+=(_qtLinkModule _qtPropagateRuntimeDependencies)
# Set PATH to find qmake first in a preConfigure hook
# It must run after all the envHooks!
preConfigureHooks+=(_qtSetQmakePath)
preFixupHooks+=(_qtMultioutDevs)
if [[ -n "$NIX_QT_SUBMODULE" ]]; then
postInstallHooks+=(_qtRmQmake _qtRmModules)
preFixupHooks+=(_qtMultioutModuleDevs)
fi
fi
if [[ -z "$NIX_QT_PIC" ]]; then if [[ -z "$NIX_QT_PIC" ]]; then
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE${NIX_CFLAGS_COMPILE:+ }-fPIC" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE${NIX_CFLAGS_COMPILE:+ }-fPIC"
export NIX_QT_PIC=1 export NIX_QT_PIC=1

View File

@ -8,7 +8,7 @@ qtSubmodule {
buildInputs = [ buildInputs = [
pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio
]; ];
configureFlags = "GST_VERSION=1.0"; qmakeFlags = [ "GST_VERSION=1.0" ];
postFixup = '' postFixup = ''
fixQtModuleCMakeConfig "Multimedia" fixQtModuleCMakeConfig "Multimedia"
fixQtModuleCMakeConfig "MultimediaWidgets" fixQtModuleCMakeConfig "MultimediaWidgets"

View File

@ -42,12 +42,10 @@ let
inherit src; inherit src;
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); 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; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
dontAddPrefix = args.dontAddPrefix or true;
dontFixLibtool = args.dontFixLibtool or true; dontFixLibtool = args.dontFixLibtool or true;
configureScript = args.configureScript or "qmake";
outputs = args.outputs or [ "dev" "out" ]; outputs = args.outputs or [ "dev" "out" ];
setOutputFlags = args.setOutputFlags or false; setOutputFlags = args.setOutputFlags or false;
@ -115,6 +113,7 @@ let
makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh;
fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh; fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh;
qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh;
}; };

View File

@ -0,0 +1,120 @@
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"
}
_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
addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins"
addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports"
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}"
}
_qtMultioutDevs() {
# This is necessary whether the package is a Qt module or not
moveToOutput "mkspecs" "${!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" <<EOF
[Paths]
Prefix = $qtOut
Plugins = lib/qt5/plugins
Imports = lib/qt5/imports
Qml2Imports = lib/qt5/qml
Documentation = share/doc/qt5
EOF
export QMAKE="$qtOut/bin/qmake"
envHooks+=(_qtLinkModule _qtPropagateRuntimeDependencies)
# Set PATH to find qmake first in a preConfigure hook
# It must run after all the envHooks!
postHooks+=(_qtSetQmakePath)
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
configurePhase=qmakeConfigurePhase
fi
preFixupHooks+=(_qtMultioutDevs)
if [ -n "$NIX_QT_SUBMODULE" ]; then
postInstallHooks+=(_qtRmQmake _qtRmModules)
preFixupHooks+=(_qtMultioutModuleDevs)
fi
fi

View File

@ -254,7 +254,6 @@ stdenv.mkDerivation {
fixQtModuleCMakeConfig "Xml" fixQtModuleCMakeConfig "Xml"
''; '';
inherit lndir;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -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() { addToSearchPathOnceWithCustomDelimiter() {
local delim="$1" local delim="$1"
local search="$2" local search="$2"
@ -62,77 +24,6 @@ propagateOnce() {
addToSearchPathOnceWithCustomDelimiter ' ' "$@" addToSearchPathOnceWithCustomDelimiter ' ' "$@"
} }
_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
addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins"
addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports"
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}"
}
_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" <<EOF
[Paths]
Prefix = $qtOut
Plugins = lib/qt5/plugins
Imports = lib/qt5/imports
Qml2Imports = lib/qt5/qml
Documentation = share/doc/qt5
EOF
export QMAKE="$qtOut/bin/qmake"
envHooks+=(_qtLinkModule _qtPropagateRuntimeDependencies)
# Set PATH to find qmake first in a preConfigure hook
# It must run after all the envHooks!
preConfigureHooks+=(_qtSetQmakePath)
preFixupHooks+=(_qtMultioutDevs)
if [[ -n "$NIX_QT_SUBMODULE" ]]; then
postInstallHooks+=(_qtRmQmake _qtRmModules)
preFixupHooks+=(_qtMultioutModuleDevs)
fi
fi
if [[ -z "$NIX_QT_PIC" ]]; then if [[ -z "$NIX_QT_PIC" ]]; then
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE${NIX_CFLAGS_COMPILE:+ }-fPIC" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE${NIX_CFLAGS_COMPILE:+ }-fPIC"
export NIX_QT_PIC=1 export NIX_QT_PIC=1

View File

@ -8,7 +8,7 @@ qtSubmodule {
buildInputs = [ buildInputs = [
pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio
]; ];
configureFlags = "GST_VERSION=1.0"; qmakeFlags = [ "GST_VERSION=1.0" ];
postFixup = '' postFixup = ''
fixQtModuleCMakeConfig "Multimedia" fixQtModuleCMakeConfig "Multimedia"
fixQtModuleCMakeConfig "MultimediaWidgets" fixQtModuleCMakeConfig "MultimediaWidgets"

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, qt4}: { stdenv, fetchurl, qt4 }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "qtscriptgenerator-0.1.0"; name = "qtscriptgenerator-0.1.0";

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, zip, zlib, qt }: { fetchurl, stdenv, zip, zlib, qt, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "quazip-0.7.1"; name = "quazip-0.7.1";
@ -8,15 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "1pijy6zn8kdx9m6wrckid24vkgp250hklbpmgrpixiam6l889jbq"; sha256 = "1pijy6zn8kdx9m6wrckid24vkgp250hklbpmgrpixiam6l889jbq";
}; };
configurePhase = '' preConfigure = "cd quazip";
runHook preConfigure
cd quazip && qmake quazip.pro
runHook postConfigure
'';
installFlags = "INSTALL_ROOT=$(out)";
buildInputs = [ zlib qt ]; buildInputs = [ zlib qt ];
nativeBuildInputs = [ qmakeHook ];
meta = { meta = {
description = "Provides access to ZIP archives from Qt programs"; description = "Provides access to ZIP archives from Qt programs";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qtbase, qtsvg, qttools }: { stdenv, fetchurl, qtbase, qtsvg, qttools, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qwt-6.1.2"; name = "qwt-6.1.2";
@ -9,16 +9,13 @@ stdenv.mkDerivation rec {
}; };
propagatedBuildInputs = [ qtbase qtsvg qttools ]; propagatedBuildInputs = [ qtbase qtsvg qttools ];
nativeBuildInputs = [ qmakeHook ];
postPatch = '' postPatch = ''
sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri
''; '';
configurePhase = '' qmakeFlags = [ "-after doc.path=$out/share/doc/${name}" ];
runHook preConfigure
qmake -after doc.path=$out/share/doc/${name} -r
runHook postConfigure
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Qt widgets for technical applications"; description = "Qt widgets for technical applications";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4 }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qwt-5.2.3"; name = "qwt-5.2.3";
@ -9,16 +9,15 @@ stdenv.mkDerivation rec {
}; };
propagatedBuildInputs = [ qt4 ]; propagatedBuildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
postPatch = '' postPatch = ''
sed -e "s@\$\$\[QT_INSTALL_PLUGINS\]@$out/lib/qt4/plugins@" -i designer/designer.pro sed -e "s@\$\$\[QT_INSTALL_PLUGINS\]@$out/lib/qt4/plugins@" -i designer/designer.pro
sed -e "s|INSTALLBASE.*=.*|INSTALLBASE = $out|g" -i qwtconfig.pri sed -e "s|INSTALLBASE.*=.*|INSTALLBASE = $out|g" -i qwtconfig.pri
''; '';
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags INSTALLBASE=$out -after doc.path=$out/share/doc/${name}"
qmake INSTALLBASE=$out -after doc.path=$out/share/doc/${name} -r
runHook postConfigure
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, doxygen, qtbase }: { stdenv, fetchurl, doxygen, qtbase, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "signon-${version}"; name = "signon-${version}";
@ -9,12 +9,10 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qtbase ]; buildInputs = [ qtbase ];
nativeBuildInputs = [ doxygen ]; nativeBuildInputs = [ doxygen qmakeHook ];
configurePhase = '' preConfigure = ''
runHook preConfigure qmakeFlags="$qmakeFlags LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake/SignOnQt5"
qmake PREFIX=$out LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake/SignOnQt5
runHook postConfigure
''; '';
} }

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, python, pkgconfig, qtbase, qtsvg, qtwebkit, sip, pythonDBus { stdenv, fetchurl, python, pkgconfig, qtbase, qtsvg, qtwebkit, sip, pythonDBus
, lndir, makeWrapper }: , lndir, makeWrapper, qmakeHook }:
let let
version = "5.5.1"; version = "5.5.1";
@ -21,13 +21,12 @@ in stdenv.mkDerivation {
buildInputs = [ buildInputs = [
python pkgconfig makeWrapper lndir python pkgconfig makeWrapper lndir
qtbase qtsvg qtwebkit qtbase qtsvg qtwebkit qmakeHook
]; ];
propagatedBuildInputs = [ sip ]; propagatedBuildInputs = [ sip ];
configurePhase = '' configurePhase = ''
runHook preConfigure
mkdir -p $out mkdir -p $out
lndir ${pythonDBus} $out lndir ${pythonDBus} $out
@ -45,7 +44,6 @@ in stdenv.mkDerivation {
--destdir=$out/lib/${python.libPrefix}/site-packages \ --destdir=$out/lib/${python.libPrefix}/site-packages \
--sipdir=$out/share/sip \ --sipdir=$out/share/sip \
--designer-plugindir=$out/plugins/designer --designer-plugindir=$out/plugins/designer
runHook postConfigure
''; '';
postInstall = '' postInstall = ''

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, makeWrapper { stdenv, fetchurl, makeWrapper
, qtbase, qtquickcontrols, qtscript, qtdeclarative , qtbase, makeQtWrapper, qtquickcontrols, qtscript, qtdeclarative, qmakeHook
, withDocumentation ? false , withDocumentation ? false
}: }:
@ -21,18 +21,15 @@ stdenv.mkDerivation rec {
buildInputs = [ makeWrapper qtbase qtscript qtquickcontrols qtdeclarative ]; buildInputs = [ makeWrapper qtbase qtscript qtquickcontrols qtdeclarative ];
nativeBuildInputs = [ qmakeHook makeQtWrapper ];
doCheck = false; doCheck = false;
enableParallelBuilding = true; enableParallelBuilding = true;
preConfigure = '' buildFlags = optional withDocumentation "docs";
qmake -spec linux-g++ qtcreator.pro
'';
buildFlags = optionalString withDocumentation " docs"; installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
installFlags = "INSTALL_ROOT=$(out)"
+ optionalString withDocumentation " install_docs";
postInstall = '' postInstall = ''
# Install desktop file # Install desktop file
@ -47,13 +44,7 @@ stdenv.mkDerivation rec {
Type=Application Type=Application
Categories=Qt;Development;IDE; Categories=Qt;Development;IDE;
__EOF__ __EOF__
# Wrap the qtcreator binary wrapQtProgram $out/bin/qtcreator
addToSearchPath QML2_IMPORT_PATH "${qtquickcontrols}/lib/qt5/qml"
addToSearchPath QML2_IMPORT_PATH "${qtdeclarative}/lib/qt5/qml"
wrapProgram $out/bin/qtcreator \
--prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
--prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
--prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH"
''; '';
meta = { meta = {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4 }: { stdenv, fetchurl, qt4, qmake4Hook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "valkyrie-2.0.0"; name = "valkyrie-2.0.0";
@ -9,8 +9,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ qt4 ]; buildInputs = [ qt4 ];
nativeBuildInputs = [ qmake4Hook ];
configurePhase = "qmake PREFIX=$out";
meta = { meta = {
homepage = http://www.valgrind.org/; homepage = http://www.valgrind.org/;

View File

@ -1,4 +1,4 @@
{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, fetchurl }: { stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmakeHook, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "chessx-${version}"; name = "chessx-${version}";
version = "1.3.2"; version = "1.3.2";
@ -6,9 +6,6 @@ stdenv.mkDerivation rec {
url = "mirror://sourceforge/chessx/chessx-${version}.tgz"; url = "mirror://sourceforge/chessx/chessx-${version}.tgz";
sha256 = "b136cf56d37d34867cdb9538176e1703b14f61b3384885b6f100580d0af0a3ff"; sha256 = "b136cf56d37d34867cdb9538176e1703b14f61b3384885b6f100580d0af0a3ff";
}; };
preConfigure = ''
qmake -spec linux-g++ chessx.pro
'';
buildInputs = [ buildInputs = [
stdenv stdenv
pkgconfig pkgconfig
@ -17,6 +14,7 @@ stdenv.mkDerivation rec {
qttools qttools
qtmultimedia qtmultimedia
zlib zlib
qmakeHook
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,5 +1,5 @@
{ fetchurl, pkgs, stdenv, makeWrapper, qtbase, yajl, libzip, hunspell { fetchurl, unzip, stdenv, makeWrapper, qtbase, yajl, libzip, hunspell
, boost, lua5_1, luafilesystem, luazip, lrexlib, luasqlite3 }: , boost, lua5_1, luafilesystem, luazip, lrexlib, luasqlite3, qmakeHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mudlet-${version}"; name = "mudlet-${version}";
@ -11,11 +11,11 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ buildInputs = [
pkgs.unzip qtbase lua5_1 hunspell libzip yajl boost makeWrapper unzip qtbase lua5_1 hunspell libzip yajl boost makeWrapper
luafilesystem luazip lrexlib luasqlite3 luafilesystem luazip lrexlib luasqlite3 qmakeHook
]; ];
configurePhase = "cd src && qmake"; preConfigure = "cd src";
installPhase = let installPhase = let
luaZipPath = "${luazip}/lib/lua/5.1/?.so"; luaZipPath = "${luazip}/lib/lua/5.1/?.so";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, zlib, libpng, qt4, pkgconfig { stdenv, fetchgit, zlib, libpng, qt4, qmake4Hook, pkgconfig
, withGamepads ? true, SDL # SDL is used for gamepad functionality , withGamepads ? true, SDL # SDL is used for gamepad functionality
}: }:
@ -19,10 +19,10 @@ stdenv.mkDerivation rec{
sha256 = "71dfa0be045f31969b1d6ab4f1adf6a208f9ef4834d708bc7bf6d9195efb5f80"; sha256 = "71dfa0be045f31969b1d6ab4f1adf6a208f9ef4834d708bc7bf6d9195efb5f80";
}; };
buildInputs = [ zlib libpng pkgconfig qt4 ] buildInputs = [ zlib libpng pkgconfig qt4 qmake4Hook ]
++ (if withGamepads then [ SDL ] else [ ]); ++ (if withGamepads then [ SDL ] else [ ]);
configurePhase = "cd Qt && qmake PPSSPPQt.pro"; preConfigure = "cd Qt";
installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin"; installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin";
meta = { meta = {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, ncurses}: { stdenv, fetchurl, qt4, ncurses }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "i7z-0.27.2"; name = "i7z-0.27.2";
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1wa7ix6m75wl3k2n88sz0x8cckvlzqklja2gvzqfw5rcfdjjvxx7"; sha256 = "1wa7ix6m75wl3k2n88sz0x8cckvlzqklja2gvzqfw5rcfdjjvxx7";
}; };
buildInputs = [qt4 ncurses]; buildInputs = [ qt4 ncurses ];
buildPhase = '' buildPhase = ''
make make

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