nixpkgs/pkgs/applications/audio/fmit/default.nix
aszlig 97d89ad7ee
fmit: Fix running of {pre,post}Configure
Commit 0055c6a introduced a new preConfigure hook that sets the right
qmake path. Unfortunately the mkDerivation attributes of fmit override
the whole configurePhase, so this hook isn't run at all.

This doesn't fix the build of fmit, because it's unable to find
GL/glu.h. However I think this isn't an issue of the fmit package but
rather rooted in propagating the wrong output paths from freeglut.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-04-15 05:26:02 +02:00

53 lines
1.6 KiB
Nix

{ stdenv, fetchFromGitHub, fftw, freeglut, qtbase, qtmultimedia
, alsaSupport ? true, alsaLib ? null
, jackSupport ? false, libjack2 ? null
, portaudioSupport ? false, portaudio ? null }:
assert alsaSupport -> alsaLib != null;
assert jackSupport -> libjack2 != null;
assert portaudioSupport -> portaudio != null;
stdenv.mkDerivation rec {
name = "fmit-${version}";
version = "1.0.8";
src = fetchFromGitHub {
sha256 = "04s7xcgmi5g58lirr48vf203n1jwdxf981x1p6ysbax24qwhs2kd";
rev = "v${version}";
repo = "fmit";
owner = "gillesdegottex";
};
buildInputs = [ fftw freeglut qtbase qtmultimedia ]
++ stdenv.lib.optionals alsaSupport [ alsaLib ]
++ stdenv.lib.optionals jackSupport [ libjack2 ]
++ stdenv.lib.optionals portaudioSupport [ portaudio ];
configurePhase = ''
runHook preConfigure
mkdir build
cd build
qmake \
CONFIG+=${stdenv.lib.optionalString alsaSupport "acs_alsa"} \
CONFIG+=${stdenv.lib.optionalString jackSupport "acs_jack"} \
CONFIG+=${stdenv.lib.optionalString portaudioSupport "acs_portaudio"} \
PREFIX="$out" PREFIXSHORTCUT="$out" \
../fmit.pro
runHook postConfigure
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Free Musical Instrument Tuner";
longDescription = ''
FMIT is a graphical utility for tuning musical instruments, with error
and volume history, and advanced features.
'';
homepage = http://gillesdegottex.github.io/fmit/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}