nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 72 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 ninja, 7 pkg-config, 8 eigen, 9 ffmpeg, 10 libresample, 11 kissfft, 12}: 13 14stdenv.mkDerivation { 15 pname = "musly"; 16 version = "0.1-unstable-2019-09-05"; 17 18 outputs = [ 19 "bin" 20 "dev" 21 "out" 22 "doc" 23 ]; 24 25 src = fetchFromGitHub { 26 owner = "dominikschnitzer"; 27 repo = "musly"; 28 rev = "7a0c6a9a2782e6fca84fb86fce5232a8c8a104ed"; 29 hash = "sha256-DOvGGx3pCcvPPsT97sQlINjT1sJy8ZWvxLsFGGZbgzE="; 30 }; 31 32 patches = [ 33 # Fix build with FFmpeg 7, C++17, and external libresample and kissfft 34 # https://github.com/dominikschnitzer/musly/pull/53 35 # Last commit omitted, as it is a large non‐functional removal 36 ./0001-Fix-build-with-FFmpeg-7.patch 37 ./0002-Fix-build-with-C-17.patch 38 ./0003-Modernize-CMake-build-system.patch 39 ./0004-Use-pkg-config-to-find-libresample-and-kissfft.patch 40 ]; 41 42 nativeBuildInputs = [ 43 cmake 44 ninja 45 pkg-config 46 ]; 47 48 buildInputs = [ 49 eigen 50 ffmpeg 51 libresample 52 kissfft 53 ]; 54 55 doCheck = true; 56 57 meta = { 58 homepage = "https://www.musly.org"; 59 description = "Fast and high-quality audio music similarity library written in C/C++"; 60 longDescription = '' 61 Musly analyzes the the audio signal of music pieces to estimate their similarity. 62 No meta-data about the music piece is included in the similarity estimation. 63 To use Musly in your application, have a look at the library documentation 64 or try the command line application included in the package and start generating 65 some automatic music playlists right away. 66 ''; 67 license = lib.licenses.mpl20; 68 maintainers = with lib.maintainers; [ ggpeti ]; 69 platforms = lib.platforms.unix; 70 mainProgram = "musly"; 71 }; 72}