Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 163 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 chromaprint, 6 cmake, 7 faad2, 8 ffmpeg, 9 fftw, 10 flac, 11 gbenchmark, 12 glibcLocales, 13 gtest, 14 hidapi, 15 lame, 16 libebur128, 17 libdjinterop, 18 libGLU, 19 libid3tag, 20 libkeyfinder, 21 libmad, 22 libmodplug, 23 libopus, 24 libsecret, 25 libshout, 26 libsndfile, 27 libusb1, 28 libvorbis, 29 libxcb, 30 lilv, 31 lv2, 32 microsoft-gsl, 33 mp4v2, 34 opusfile, 35 pkg-config, 36 portaudio, 37 portmidi, 38 protobuf, 39 qt5compat, 40 qtbase, 41 qtdeclarative, 42 qtkeychain, 43 qtsvg, 44 rubberband, 45 serd, 46 sord, 47 soundtouch, 48 sratom, 49 sqlite, 50 taglib, 51 upower, 52 vamp-plugin-sdk, 53 wavpack, 54 wrapQtAppsHook, 55}: 56 57stdenv.mkDerivation rec { 58 pname = "mixxx"; 59 version = "2.5.2"; 60 61 src = fetchFromGitHub { 62 owner = "mixxxdj"; 63 repo = "mixxx"; 64 rev = version; 65 hash = "sha256-dKk3n3KDindnLbON52SW5h4cz96WVi0OPjwA27HqQCI="; 66 }; 67 68 # Should be removed when bumping to 2.6.x 69 postPatch = '' 70 substituteInPlace CMakeLists.txt \ 71 --replace-warn "LIBDJINTEROP_VERSION 0.24.3" "LIBDJINTEROP_VERSION 0.26.1" 72 ''; 73 74 nativeBuildInputs = [ 75 cmake 76 pkg-config 77 wrapQtAppsHook 78 ]; 79 80 buildInputs = [ 81 chromaprint 82 faad2 83 ffmpeg 84 fftw 85 flac 86 gbenchmark 87 glibcLocales 88 gtest 89 hidapi 90 lame 91 libebur128 92 libGLU 93 libid3tag 94 libdjinterop 95 libkeyfinder 96 libmad 97 libmodplug 98 libopus 99 libsecret 100 libshout 101 libsndfile 102 libusb1 103 libvorbis 104 libxcb 105 lilv 106 lv2 107 microsoft-gsl 108 mp4v2 109 opusfile 110 portaudio 111 portmidi 112 protobuf 113 qt5compat 114 qtbase 115 qtdeclarative 116 qtkeychain 117 qtsvg 118 rubberband 119 serd 120 sord 121 soundtouch 122 sratom 123 sqlite 124 taglib 125 upower 126 vamp-plugin-sdk 127 wavpack 128 ]; 129 130 qtWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" ]; 131 132 # mixxx installs udev rules to DATADIR instead of SYSCONFDIR 133 # let's disable this and install udev rules manually via postInstall 134 # see https://github.com/mixxxdj/mixxx/blob/2.3.5/CMakeLists.txt#L1381-L1392 135 cmakeFlags = [ 136 "-DINSTALL_USER_UDEV_RULES=OFF" 137 # "BUILD_TESTING=OFF" must imply "BUILD_BENCH=OFF" 138 "-DBUILD_BENCH=OFF" 139 ]; 140 141 postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' 142 rules="$src/res/linux/mixxx-usb-uaccess.rules" 143 if [ ! -f "$rules" ]; then 144 echo "$rules is missing, must update the Nix file." 145 exit 1 146 fi 147 mkdir -p "$out/lib/udev/rules.d" 148 cp "$rules" "$out/lib/udev/rules.d/69-mixxx-usb-uaccess.rules" 149 ''; 150 151 meta = { 152 homepage = "https://mixxx.org"; 153 description = "Digital DJ mixing software"; 154 mainProgram = "mixxx"; 155 changelog = "https://github.com/mixxxdj/mixxx/blob/${version}/CHANGELOG.md"; 156 license = lib.licenses.gpl2; 157 maintainers = with lib.maintainers; [ 158 benley 159 bfortz 160 ]; 161 platforms = lib.platforms.linux; 162 }; 163}