From 4430bf64986f195a387ee706a56ab565b26b9190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 2 Feb 2021 09:41:08 +0100 Subject: [PATCH] libkeyfinder: 2.1 -> 2.2.4 Also move to all-packages.nix since it does not use qmake anymore. --- .../libraries/libkeyfinder/default.nix | 35 ++++++++----------- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/qt5-packages.nix | 2 -- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/libkeyfinder/default.nix b/pkgs/development/libraries/libkeyfinder/default.nix index d2aecccdedff..85747f2f38df 100644 --- a/pkgs/development/libraries/libkeyfinder/default.nix +++ b/pkgs/development/libraries/libkeyfinder/default.nix @@ -1,37 +1,32 @@ -{ lib, stdenv, fetchFromGitHub, fftw, qtbase, qmake }: +{ lib, stdenv, fetchFromGitHub, cmake, fftw, catch2 }: stdenv.mkDerivation rec { pname = "libkeyfinder"; - version = "2.1"; + version = "2.2.4"; src = fetchFromGitHub { - sha256 = "07kc0cl6kirgmpdgkgmp6r3yvyf7b1w569z01g8rfl1cig80qdc7"; + owner = "mixxxdj"; + repo = "libkeyfinder"; rev = "v${version}"; - repo = "libKeyFinder"; - owner = "ibsh"; + sha256 = "005qq81xfzi1iifvpgkqpizxcrfisafq2r0cjp4fxqh1ih7bfimv"; }; - nativeBuildInputs = [ qmake ]; - buildInputs = [ fftw qtbase ]; - - postPatch = '' - substituteInPlace LibKeyFinder.pro \ - --replace "/usr/local" "$out" \ - --replace "-stdlib=libc++" "" + # needed for linking libkeyfinder.so into keyfinder-tests executable + preBuild = '' + export LD_LIBRARY_PATH=$(pwd) ''; - enableParallelBuilding = true; + nativeBuildInputs = [ cmake ]; - postInstall = '' - mkdir -p $out/include/keyfinder - install -m644 *.h $out/include/keyfinder - mkdir -p $out/lib - cp -a lib*.so* $out/lib - ''; + buildInputs = [ fftw ]; + + checkInputs = [ catch2 ]; + + doCheck = true; meta = with lib; { description = "Musical key detection for digital audio (C++ library)"; - homepage = "http://www.ibrahimshaath.co.uk/keyfinder/"; + homepage = "https://mixxxdj.github.io/libkeyfinder/"; license = licenses.gpl3Plus; platforms = platforms.linux; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7cca1c93fc1..465701d0ceae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15108,6 +15108,8 @@ in libkate = callPackage ../development/libraries/libkate { }; + libkeyfinder = callPackage ../development/libraries/libkeyfinder { }; + libkml = callPackage ../development/libraries/libkml { }; libksba = callPackage ../development/libraries/libksba { }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index f3708f0ab45f..223132217a5d 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -95,8 +95,6 @@ in (kdeFrameworks // plasma5 // plasma5.thirdParty // kdeApplications // qt5 // libdbusmenu = callPackage ../development/libraries/libdbusmenu-qt/qt-5.5.nix { }; - libkeyfinder = callPackage ../development/libraries/libkeyfinder { }; - libktorrent = callPackage ../development/libraries/libktorrent { }; liblastfm = callPackage ../development/libraries/liblastfm { };