2015-08-06 07:10:15 +02:00
|
|
|
# FIXME: upgrading qt5Full (Qt 5.3) to qt5.{base,multimedia} (Qt 5.4) breaks
|
|
|
|
# the default Qt audio capture source!
|
2015-08-06 07:20:12 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fftw, freeglut, qt5Full
|
|
|
|
, alsaSupport ? false, alsaLib ? null
|
|
|
|
, jackSupport ? false, libjack2 ? null }:
|
|
|
|
|
|
|
|
assert alsaSupport -> alsaLib != null;
|
|
|
|
assert jackSupport -> libjack2 != null;
|
2015-01-11 03:19:40 +01:00
|
|
|
|
2015-08-12 11:40:32 +02:00
|
|
|
let version = "1.0.7"; in
|
2015-06-15 21:34:30 +02:00
|
|
|
stdenv.mkDerivation {
|
2015-01-11 03:19:40 +01:00
|
|
|
name = "fmit-${version}";
|
|
|
|
|
2015-06-15 21:34:30 +02:00
|
|
|
src = fetchFromGitHub {
|
2015-08-12 11:40:32 +02:00
|
|
|
sha256 = "14dzrrxjskhqamhfqhzp6napvc1vyjxcc0v8id1iqzsfdn86xqm9";
|
2015-06-15 21:34:30 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
repo = "fmit";
|
|
|
|
owner = "gillesdegottex";
|
2015-01-11 03:19:40 +01:00
|
|
|
};
|
|
|
|
|
2015-08-06 07:20:12 +02:00
|
|
|
buildInputs = [ fftw freeglut qt5Full ]
|
|
|
|
++ stdenv.lib.optional alsaSupport [ alsaLib ]
|
|
|
|
++ stdenv.lib.optional jackSupport [ libjack2 ];
|
2015-08-06 07:10:15 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
2015-08-11 20:38:19 +02:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2015-08-06 07:20:12 +02:00
|
|
|
qmake \
|
|
|
|
CONFIG+=${stdenv.lib.optionalString alsaSupport "acs_alsa"} \
|
|
|
|
CONFIG+=${stdenv.lib.optionalString jackSupport "acs_jack"} \
|
2015-08-11 20:38:19 +02:00
|
|
|
PREFIX="$out" PREFIXSHORTCUT="$out" \
|
|
|
|
../fmit.pro
|
2015-08-06 07:10:15 +02:00
|
|
|
'';
|
2015-01-11 03:19:40 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-06-15 21:34:30 +02:00
|
|
|
inherit version;
|
2015-01-11 03:19:40 +01:00
|
|
|
description = "Free Musical Instrument Tuner";
|
|
|
|
longDescription = ''
|
2015-08-06 07:10:15 +02:00
|
|
|
FMIT is a graphical utility for tuning musical instruments, with error
|
|
|
|
and volume history, and advanced features.
|
2015-01-11 03:19:40 +01:00
|
|
|
'';
|
2015-06-15 21:34:30 +02:00
|
|
|
homepage = http://gillesdegottex.github.io/fmit/;
|
2015-05-28 19:20:29 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2015-08-06 07:10:15 +02:00
|
|
|
platforms = platforms.linux;
|
2015-01-11 03:19:40 +01:00
|
|
|
maintainers = with maintainers; [ nckx ];
|
|
|
|
};
|
|
|
|
}
|