From 828f9ea8ccca208eb949d0f062ecc23717739510 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 15 Jul 2015 03:12:11 +0200 Subject: [PATCH] keyfinder-cli: use old libkeyfinder 0.11 "for now" The tool doesn't compile against versions 2.x. Also, fix the incorrect version number & use src.meta.homepage. --- .../audio/keyfinder-cli/default.nix | 9 +++-- .../libraries/libkeyfinder/0.11.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/libkeyfinder/0.11.nix diff --git a/pkgs/applications/audio/keyfinder-cli/default.nix b/pkgs/applications/audio/keyfinder-cli/default.nix index 1f008e56c151..d5de42f6a6ef 100644 --- a/pkgs/applications/audio/keyfinder-cli/default.nix +++ b/pkgs/applications/audio/keyfinder-cli/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, libav, libkeyfinder }: +{ stdenv, fetchFromGitHub, libav, libkeyfinder_0_11 }: -let version = "20150130"; in +let version = "20150201"; in stdenv.mkDerivation rec { name = "keyfinder-cli-${version}"; @@ -12,19 +12,20 @@ stdenv.mkDerivation rec { }; meta = with stdenv.lib; { + inherit version; + inherit (src.meta) homepage; description = "Musical key detection for digital audio (command-line tool)"; longDescription = '' This small utility is the automation-oriented DJ's best friend. By making use of Ibrahim Sha'ath's high quality libKeyFinder library, it can be used to estimate the musical key of many different audio formats. ''; - homepage = https://github.com/EvanPurkhiser/keyfinder-cli; license = licenses.gpl3Plus; platforms = with platforms; linux; maintainers = with maintainers; [ nckx ]; }; - buildInputs = [ libav libkeyfinder ]; + buildInputs = [ libav libkeyfinder_0_11 ]; makeFlagsArray = "PREFIX=$(out)"; diff --git a/pkgs/development/libraries/libkeyfinder/0.11.nix b/pkgs/development/libraries/libkeyfinder/0.11.nix new file mode 100644 index 000000000000..f0e75b340592 --- /dev/null +++ b/pkgs/development/libraries/libkeyfinder/0.11.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, boost, fftw, qt5 }: + +let version = "0.11"; in +stdenv.mkDerivation { + name = "libkeyfinder-${version}"; + + src = fetchFromGitHub { + sha256 = "0674gykdi1nffvba5rv6fsp0zw02w1gkpn9grh8w983xf13ykbz9"; + rev = "v${version}"; + repo = "libKeyFinder"; + owner = "ibsh"; + }; + + meta = with stdenv.lib; { + inherit version; + description = "Musical key detection for digital audio (C++ library)"; + homepage = http://www.ibrahimshaath.co.uk/keyfinder/; + license = licenses.gpl3Plus; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; + }; + + buildInputs = [ fftw qt5.base ]; + propagatedBuildInputs = [ boost ]; + + patchPhase = '' + substituteInPlace LibKeyFinder.pro --replace "/usr/local" "$out" + ''; + + configurePhase = '' + qmake + ''; + + enableParallelBuilding = true; + + postInstall = '' + mkdir -p $out/include/keyfinder + cp *.h $out/include/keyfinder + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b294e259290..dca528a4fdd9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7098,6 +7098,7 @@ let libkate = callPackage ../development/libraries/libkate { }; + libkeyfinder_0_11 = callPackage ../development/libraries/libkeyfinder/0.11.nix { }; libkeyfinder = callPackage ../development/libraries/libkeyfinder { }; libksba = callPackage ../development/libraries/libksba { };