summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-10-30 15:01:33 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-10-30 15:01:33 +0100
commit0814b7f9f55c07a087fed96fe946b526aabfbf22 (patch)
treedd69012d213e79773dbda4d00b6f6c92109b4a37
parent407c9d9f701d54bdd20eab08fdcfe47e56173287 (diff)
Add libkeyfinder to shell.nixworking-libdjinterop-engineprime-export
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--shell.nix42
1 files changed, 41 insertions, 1 deletions
diff --git a/shell.nix b/shell.nix
index 9ebea950b1..8ec1810dcc 100644
--- a/shell.nix
+++ b/shell.nix
@@ -20,7 +20,9 @@ let inherit (nixroot) stdenv pkgs lib
python3
python37Packages
wavpack
- libsecret;
+ libsecret
+ fetchFromGitHub
+ ;
libdjinterop = stdenv.mkDerivation rec {
name = "libdjinterop";
@@ -43,6 +45,43 @@ let inherit (nixroot) stdenv pkgs lib
outputs = [ "out" "dev" ];
};
+ libkeyfinder = stdenv.mkDerivation rec {
+ pname = "libkeyfinder";
+ version = "2.1";
+
+ src = fetchFromGitHub {
+ sha256 = "07kc0cl6kirgmpdgkgmp6r3yvyf7b1w569z01g8rfl1cig80qdc7";
+ rev = "v${version}";
+ repo = "libKeyFinder";
+ owner = "ibsh";
+ };
+
+ nativeBuildInputs = with qt5; [ qmake ];
+ buildInputs = with qt5; [ fftw qtbase ];
+
+ postPatch = ''
+ substituteInPlace LibKeyFinder.pro \
+ --replace "/usr/local" "$out" \
+ --replace "-stdlib=libc++" ""
+ '';
+
+ enableParallelBuilding = true;
+
+ postInstall = ''
+ mkdir -p $out/include/keyfinder
+ install -m644 *.h $out/include/keyfinder
+ mkdir -p $out/lib
+ cp -a lib*.so* $out/lib
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Musical key detection for digital audio (C++ library)";
+ homepage = "http://www.ibrahimshaath.co.uk/keyfinder/";
+ license = licenses.gpl3Plus;
+ platforms = platforms.linux;
+ };
+ };
+
qtkeychain = pkgs.qtkeychain.override {
withQt5 = true;
qtbase = qt5.qtbase;
@@ -173,6 +212,7 @@ in stdenv.mkDerivation rec {
libsecret
qtkeychain
libdjinterop
+ libkeyfinder
] ++ allLv2Plugins;
postInstall = (if releaseMode then ''