From 9704396f09f1554e2c3f4762639bc766f3070d19 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 6 Aug 2015 07:10:15 +0200 Subject: [PATCH] fmit: 1.0.0 -> 1.0.5 Now with Qt 5 and a new build system. Who uses "make install" anyway? --- pkgs/applications/audio/fmit/default.nix | 37 ++++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix index 712b3df9f25e..72797d7628fa 100644 --- a/pkgs/applications/audio/fmit/default.nix +++ b/pkgs/applications/audio/fmit/default.nix @@ -1,32 +1,51 @@ -{ stdenv, fetchFromGitHub, alsaLib, cmake, fftw -, freeglut, libjack2, libXmu, qt4 }: +# FIXME: upgrading qt5Full (Qt 5.3) to qt5.{base,multimedia} (Qt 5.4) breaks +# the default Qt audio capture source! +{ stdenv, fetchFromGitHub, alsaLib, fftw, freeglut, libjack2, qt5Full }: -let version = "1.0.0"; in +let version = "1.0.5"; in stdenv.mkDerivation { name = "fmit-${version}"; src = fetchFromGitHub { - sha256 = "13y9csv34flz7065kg69h99hd7d9zskq12inmkf34l4qjyk7c185"; + sha256 = "1p49ykg7mf62xrn08fqss8yr1nf53mm8w9zp2sgcy48bfsa9xbpy"; rev = "v${version}"; repo = "fmit"; owner = "gillesdegottex"; }; - buildInputs = [ alsaLib fftw freeglut libjack2 libXmu qt4 ]; - nativeBuildInputs = [ cmake ]; + buildInputs = [ alsaLib fftw freeglut libjack2 qt5Full ]; + + postPatch = '' + substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}' + substituteInPlace distrib/fmit.desktop \ + --replace "Icon=fmit" "Icon=$out/share/pixmaps/fmit.svg" + substituteInPlace src/main.cpp --replace "PREFIX" "\"$out\"" + ''; + + configurePhase = '' + qmake CONFIG+="acs_alsa acs_jack" fmit.pro + ''; enableParallelBuilding = true; + installPhase = '' + install -D fmit $out/bin/fmit + install -Dm644 distrib/fmit.desktop $out/share/applications/fmit.desktop + install -Dm644 ui/images/fmit.svg $out/share/pixmaps/fmit.svg + mkdir -p $out/share/fmit + cp -R tr $out/share/fmit + ''; + meta = with stdenv.lib; { inherit version; description = "Free Musical Instrument Tuner"; longDescription = '' - FMIT is a graphical utility for tuning your musical instruments, with - error and volume history and advanced features. + 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 = with platforms; linux; + platforms = platforms.linux; maintainers = with maintainers; [ nckx ]; }; }