Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from qt4 to qt5 [WIP] #33239

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions pkgs/applications/audio/cantata/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, vlc
, withQt4 ? false, qt4
, withQt5 ? true, qtbase, qtmultimedia, qtsvg, qttools
, qtbase, qtmultimedia, qtsvg, qttools

# Cantata doesn't build with cdparanoia enabled so we disable that
# default for now until I (or someone else) figure it out.
Expand All @@ -19,11 +18,6 @@
, withStreams ? true
}:

# One and only one front-end.
assert withQt5 -> withQt4 == false;
assert withQt4 -> withQt5 == false;
assert withQt4 || withQt5;

# Inter-dependencies.
assert withCddb -> withCdda && withTaglib;
assert withCdda -> withCddb && withMusicbrainz;
Expand Down Expand Up @@ -51,9 +45,7 @@ in stdenv.mkDerivation rec {
sha256 = "1b633chgfs8rya78bzzck5zijna15d1y4nmrz4dcjp862ks5y5q6";
};

buildInputs = [ vlc ]
++ stdenv.lib.optional withQt4 qt4
++ stdenv.lib.optionals withQt5 [ qtbase qtmultimedia qtsvg qttools ]
buildInputs = [ vlc qtbase qtmultimedia qtsvg ]
++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
++ stdenv.lib.optional withCdda cdparanoia
Expand All @@ -63,12 +55,11 @@ in stdenv.mkDerivation rec {
++ stdenv.lib.optional withMusicbrainz libmusicbrainz5
++ stdenv.lib.optional withUdisks udisks2;

nativeBuildInputs = [ cmake pkgconfig ];
nativeBuildInputs = [ cmake pkgconfig qttools ];

enableParallelBuilding = true;

cmakeFlags = stdenv.lib.flatten [
(fstat withQt5 "QT5")
(fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
(fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
(fstat withCdda "CDPARANOIA")
Expand Down
37 changes: 26 additions & 11 deletions pkgs/applications/audio/mixxx/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{ stdenv, fetchurl, chromaprint, fetchpatch, fftw, flac, libid3tag, libmad
, libopus, libshout, libsndfile, libusb1, libvorbis, pkgconfig
, portaudio, portmidi, protobuf, qt4, rubberband, scons, sqlite
{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, scons
, qtbase, qttools, qtscript, qtsvg, qtxmlpatterns
, chromaprint, fftw, flac, libid3tag, libmad
, libopus, libshout, libsndfile, libusb1, libvorbis, mesa
, portaudio, portmidi, protobuf, rubberband, sqlite
, taglib, vampSDK
}:

stdenv.mkDerivation rec {
name = "mixxx-${version}";
version = "2.0.0";

src = fetchurl {
url = "http://downloads.mixxx.org/${name}/${name}-src.tar.gz";
sha256 = "0vb71w1yq0xwwsclrn2jj9bk8w4n14rfv5c0aw46c11mp8xz7f71";
src = fetchFromGitHub {
owner = "mixxxdj";
repo = "mixxx";
rev = "release-${version}";
sha256 = "0pipmkv5fig2pajlh5nnmxyfil7mv5l86cw6rh8jbkcr9hman9bp";
};

patches = [
Expand All @@ -27,35 +31,46 @@ stdenv.mkDerivation rec {

buildInputs = [
chromaprint fftw flac libid3tag libmad libopus libshout libsndfile
libusb1 libvorbis pkgconfig portaudio portmidi protobuf qt4
rubberband scons sqlite taglib vampSDK
libusb1 libvorbis mesa portaudio portmidi protobuf
rubberband sqlite taglib vampSDK
qtbase qtscript qtsvg qtxmlpatterns
];

nativeBuildInputs = [
pkgconfig qttools scons
];

enableParallelBuilding = true;

sconsFlags = [
"build=release"
"qtdir=${qt4}"
"qt5=1"
];

buildPhase = ''
runHook preBuild

mkdir -p "$out"
scons \
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
$sconsFlags "prefix=$out"

runHook postBuild
'';

installPhase = ''
runHook preInstall

scons $sconsFlags "prefix=$out" install

runHook postInstall
'';

meta = with stdenv.lib; {
homepage = https://mixxx.org;
description = "Digital DJ mixing software";
homepage = https://mixxx.org;
license = licenses.gpl2Plus;
maintainers = [ maintainers.aszlig maintainers.goibhniu ];
maintainers = with maintainers; [ aszlig goibhniu ];
platforms = platforms.linux;
};
}
44 changes: 25 additions & 19 deletions pkgs/development/libraries/openscenegraph/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
{ stdenv, lib, fetchurl, cmake, pkgconfig, doxygen, unzip
, freetype, libjpeg, jasper, libxml2, zlib, gdal, curl, libX11
, cairo, poppler, librsvg, libpng, libtiff, libXrandr
, xineLib, boost
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, doxygen
, freetype, libjpeg, jasper, libxml2, zlib, gdal, curl, libX11, libpthreadstubs
, cairo, poppler, librsvg, libpng, libtiff, libXrandr, libXdmcp
, pcre, xineLib, boost
, withApps ? false
, withSDL ? false, SDL
, withQt4 ? false, qt4
, withSDL ? false, SDL
, withQt ? false, qtbase
}:

stdenv.mkDerivation rec {
name = "openscenegraph-${version}";
version = "3.4.0";
version = "3.4.1";

src = fetchurl {
url = "http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-${version}.zip";
sha256 = "03h4wfqqk7rf3mpz0sa99gy715cwpala7964z2npd8jxfn27swjw";
src = fetchFromGitHub rec {
owner = "openscenegraph";
repo = "OpenSceneGraph";
rev = "${repo}-${version}";
sha256 = "1fbzg1ihjpxk6smlq80p3h3ggllbr16ihd2fxpfwzam8yr8yxip9";
};

nativeBuildInputs = [ pkgconfig cmake doxygen unzip ];
# The Qt OpenGL module is deprecated and now part of Qt GUI
postPatch = "substituteInPlace src/osgQt/CMakeLists.txt --replace OpenGL ''";

nativeBuildInputs = [ cmake doxygen pkgconfig ];

buildInputs = [
freetype libjpeg jasper libxml2 zlib gdal curl libX11
cairo poppler librsvg libpng libtiff libXrandr boost
xineLib
freetype libjpeg jasper libxml2 zlib gdal curl
cairo poppler librsvg libpng libtiff boost
pcre xineLib
libpthreadstubs libX11 libXdmcp libXrandr
] ++ lib.optional withSDL SDL
++ lib.optional withQt4 qt4;
++ lib.optional withQt qtbase;

enableParallelBuilding = true;

cmakeFlags = lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF";

meta = with stdenv.lib; {
description = "A 3D graphics toolkit";
homepage = http://www.openscenegraph.org/;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
license = "OpenSceneGraph Public License - free LGPL-based license";
homepage = http://www.openscenegraph.org/;
license = "OpenSceneGraph Public License - free LGPL-based license";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
};
}
28 changes: 16 additions & 12 deletions pkgs/development/libraries/simgear/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{ stdenv, fetchurl, plib, freeglut, xproto, libX11, libXext, xextproto, libXi
{ stdenv, fetchFromGitHub, cmake
, plib, freeglut, xproto, libX11, libXext, xextproto, libXi
, inputproto, libICE, libSM, libXt, libXmu, mesa, boost, zlib, libjpeg, freealut
, openscenegraph, openal, expat, cmake, apr
, curl
, openscenegraph, openal, expat, curl, apr
}:

stdenv.mkDerivation rec {
name = "simgear-${version}";
version = "2017.3.1";
shortVersion = "2017.3";
version = "2017.4.0";

src = fetchurl {
url = "mirror://sourceforge/flightgear/release-${shortVersion}/${name}.tar.bz2";
sha256 = "1x71wvycs2bjgmmacswgk6091p65p46fr40mr7f4kcipnx88bq0f";
src = fetchFromGitHub {
owner = "FlightGear";
repo = "simgear";
rev = "version/${version}";
sha256 = "0p2ww4iadafz95wqjh8l8lvhzx6jbz85nw6kfaqi8j1sif0m9vwm";
};

buildInputs = [ plib freeglut xproto libX11 libXext xextproto libXi inputproto
libICE libSM libXt libXmu mesa boost zlib libjpeg freealut
openscenegraph openal expat cmake apr curl ];
buildInputs = [
plib freeglut xproto libX11 libXext xextproto libXi inputproto
libICE libSM libXt libXmu mesa boost zlib libjpeg freealut
openscenegraph openal expat apr curl
];

nativeBuildInputs = [ cmake ];

enableParallelBuilding = true;

Expand All @@ -28,4 +33,3 @@ stdenv.mkDerivation rec {
license = licenses.lgpl2;
};
}

29 changes: 18 additions & 11 deletions pkgs/development/tools/misc/xxdiff/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
{ stdenv, fetchurl, qt4, flex, bison, docutils }:
{ stdenv, fetchFromBitbucket, qtbase, flex, bison, docutils }:

stdenv.mkDerivation rec {
name = "xxdiff-4.0.1";
name = "xxdiff-4.0.1.20170623";

src = fetchurl {
url = "mirror://sourceforge/xxdiff/${name}.tar.bz2";
sha256 = "0050qd12fvlcfdh0iwjsaxgxdq7jsl70f85fbi7pz23skpddsn5z";
src = fetchFromBitbucket {
owner = "blais";
repo = "xxdiff";
rev = "5e5f885dfc43559549a81c59e9e8c9525306356a";
sha256 = "0gbvxrkwkbvag3298j89smszghpr8ilxxfb0cvsknfqdf15b296w";
};

nativeBuildInputs = [ flex bison qt4 docutils ];
nativeBuildInputs = [ flex bison docutils ];

buildInputs = [ qt4 ];
buildInputs = [ qtbase ];

QMAKE = "qmake";
NIX_CFLAGS_COMPILE = "-std=c++11";

configurePhase = "cd src; make -f Makefile.bootstrap";
preConfigure = ''
cd src
make -f Makefile.bootstrap
'';

installPhase = "mkdir -pv $out/bin; cp -v ../bin/xxdiff $out/bin";
postInstall = ''
install -Dm755 ../bin/xxdiff $out/bin/xxdiff
'';

meta = with stdenv.lib; {
homepage = http://furius.ca/xxdiff/;
description = "Graphical file and directories comparator and merge tool";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
maintainers = with maintainers; [ pSub raskin ];
};
}
33 changes: 0 additions & 33 deletions pkgs/development/tools/misc/xxdiff/tip.nix

This file was deleted.

44 changes: 28 additions & 16 deletions pkgs/games/openmw/default.nix
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
{ stdenv, fetchFromGitHub, qt4, openscenegraph, mygui, bullet, ffmpeg, boost, cmake, SDL2, unshield, openal
, giflib, libXt, pkgconfig }:
{ stdenv, fetchFromGitHub, cmake, doxygen, pkgconfig
, qtbase, openscenegraph, mygui, bullet, ffmpeg, boost, SDL2, unshield, openal
, giflib, libXt }:

let
openscenegraph_ = openscenegraph.overrideDerivation (self: {
name = "openmw-openscenegraph";

src = fetchFromGitHub {
owner = "OpenMW";
repo = "osg";
rev = "35f1a459a4ab6da9d70427e6539bdf4faae4cc91";
sha256 = "1s3a9dpbcc6v8d05pqin4xfv36i2031xpdja1vl8x11cw05fln91";
owner = "OpenMW";
repo = "osg";
rev = "b6ec7bb7a4cd06ae95bda087d48c0fb7d5ca0abf";
sha256 = "0j33wvrmy1ncrn4s7xznpy6qbarlaninil8da9xgpkh9lr7hj2bw";
};
});

in stdenv.mkDerivation rec {
version = "0.42.0";
version = "0.43.0";
name = "openmw-${version}";

src = fetchFromGitHub {
owner = "OpenMW";
repo = "openmw";
rev = name;
sha256 = "0lj8v81hk807dy0wcdhfp0iyn4l5yag53hx1a6xm44gh2dpyil43";
owner = "OpenMW";
repo = "openmw";
rev = name;
sha256 = "1nybxwp77qswjayf0g9xayp4x1xxq799681rhjlggch127r07ifi";
};

enableParallelBuilding = true;

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake boost ffmpeg qt4 bullet mygui openscenegraph_ SDL2 unshield openal libXt ];
nativeBuildInputs = [ cmake doxygen pkgconfig ];

buildInputs = [
qtbase
boost bullet ffmpeg libXt mygui openal openscenegraph_ SDL2 unshield
];

cmakeFlags = [
"-DDESIRED_QT_VERSION=5"
];

meta = with stdenv.lib; {
description = "An unofficial open source engine reimplementation of the game Morrowind";
homepage = http://openmw.org;
license = licenses.gpl3;
platforms = platforms.linux;
homepage = http://openmw.org;
license = licenses.gpl3;
maintainers = with maintainers; [ abbradar ];
platforms = platforms.linux;
};
}
Loading