Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 boost, 6 libmpdclient, 7 ncurses, 8 pkg-config, 9 readline, 10 libiconv, 11 icu, 12 curl, 13 autoconf, 14 automake, 15 libtool, 16 outputsSupport ? true, # outputs screen 17 visualizerSupport ? false, 18 fftw, # visualizer screen 19 clockSupport ? true, # clock screen 20 taglibSupport ? true, 21 taglib, # tag editor 22}: 23 24stdenv.mkDerivation rec { 25 pname = "ncmpcpp"; 26 version = "0.10.1"; 27 28 src = fetchFromGitHub { 29 owner = "ncmpcpp"; 30 repo = "ncmpcpp"; 31 tag = version; 32 hash = "sha256-w3deSy71SWWD2kZKREowZh3KMNCBfBJbrjM0vW4/GrI="; 33 }; 34 35 enableParallelBuilding = true; 36 37 strictDeps = true; 38 39 configureFlags = [ 40 "BOOST_LIB_SUFFIX=" 41 (lib.enableFeature outputsSupport "outputs") 42 (lib.enableFeature visualizerSupport "visualizer") 43 (lib.withFeature visualizerSupport "fftw") 44 (lib.enableFeature clockSupport "clock") 45 (lib.withFeature taglibSupport "taglib") 46 (lib.withFeatureAs true "boost" boost.dev) 47 ]; 48 49 nativeBuildInputs = [ 50 autoconf 51 automake 52 libtool 53 pkg-config 54 ]; 55 56 buildInputs = [ 57 boost 58 libmpdclient 59 ncurses 60 readline 61 libiconv 62 icu 63 curl 64 ] 65 ++ lib.optional visualizerSupport fftw 66 ++ lib.optional taglibSupport taglib; 67 68 preConfigure = '' 69 autoreconf -fiv 70 '' 71 + lib.optionalString stdenv.hostPlatform.isDarwin '' 72 # std::result_of was removed in c++20 and unusable for clang16 73 substituteInPlace ./configure \ 74 --replace-fail "std=c++20" "std=c++17" 75 ''; 76 77 meta = { 78 description = "Featureful ncurses based MPD client inspired by ncmpc"; 79 homepage = "https://rybczak.net/ncmpcpp/"; 80 changelog = "https://github.com/ncmpcpp/ncmpcpp/blob/${version}/CHANGELOG.md"; 81 license = lib.licenses.gpl2Plus; 82 maintainers = with lib.maintainers; [ 83 koral 84 lovek323 85 ]; 86 platforms = lib.platforms.all; 87 mainProgram = "ncmpcpp"; 88 }; 89}