Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 196 lines 3.5 kB view raw
1{ 2 lib, 3 config, 4 clangStdenv, 5 fetchFromGitHub, 6 autoconf, 7 automake, 8 libtool, 9 intltool, 10 pkg-config, 11 jansson, 12 swift-corelibs-libdispatch, 13 # deadbeef can use either gtk2 or gtk3 14 gtk2Support ? false, 15 gtk2, 16 gtk3Support ? true, 17 gtk3, 18 gsettings-desktop-schemas, 19 wrapGAppsHook3, 20 # input plugins 21 vorbisSupport ? true, 22 libvorbis, 23 mp123Support ? true, 24 libmad, 25 flacSupport ? true, 26 flac, 27 wavSupport ? true, 28 libsndfile, 29 cdaSupport ? true, 30 libcdio, 31 libcddb, 32 aacSupport ? true, 33 faad2, 34 opusSupport ? true, 35 opusfile, 36 wavpackSupport ? false, 37 wavpack, 38 ffmpegSupport ? false, 39 ffmpeg, 40 apeSupport ? true, 41 yasm, 42 # misc plugins 43 zipSupport ? true, 44 libzip, 45 artworkSupport ? true, 46 imlib2, 47 hotkeysSupport ? true, 48 libX11, 49 osdSupport ? true, 50 dbus, 51 # output plugins 52 alsaSupport ? true, 53 alsa-lib, 54 pulseSupport ? config.pulseaudio or true, 55 libpulseaudio, 56 pipewireSupport ? true, 57 pipewire, 58 # effect plugins 59 resamplerSupport ? true, 60 libsamplerate, 61 overloadSupport ? true, 62 zlib, 63 # transports 64 remoteSupport ? true, 65 curl, 66}: 67 68assert gtk2Support || gtk3Support; 69 70let 71 inherit (lib) optionals; 72 73 version = "1.10.0"; 74in 75clangStdenv.mkDerivation { 76 pname = "deadbeef"; 77 inherit version; 78 79 src = fetchFromGitHub { 80 owner = "DeaDBeeF-Player"; 81 repo = "deadbeef"; 82 fetchSubmodules = true; 83 rev = version; 84 hash = "sha256-qa0ULmE15lV2vkyXPNW9kSISQZEANrjwJwykTiifk5Q="; 85 }; 86 87 buildInputs = [ 88 jansson 89 swift-corelibs-libdispatch 90 ] 91 ++ optionals gtk2Support [ 92 gtk2 93 ] 94 ++ optionals gtk3Support [ 95 gtk3 96 gsettings-desktop-schemas 97 ] 98 ++ optionals vorbisSupport [ 99 libvorbis 100 ] 101 ++ optionals mp123Support [ 102 libmad 103 ] 104 ++ optionals flacSupport [ 105 flac 106 ] 107 ++ optionals wavSupport [ 108 libsndfile 109 ] 110 ++ optionals cdaSupport [ 111 libcdio 112 libcddb 113 ] 114 ++ optionals aacSupport [ 115 faad2 116 ] 117 ++ optionals opusSupport [ 118 opusfile 119 ] 120 ++ optionals zipSupport [ 121 libzip 122 ] 123 ++ optionals ffmpegSupport [ 124 ffmpeg 125 ] 126 ++ optionals apeSupport [ 127 yasm 128 ] 129 ++ optionals artworkSupport [ 130 imlib2 131 ] 132 ++ optionals hotkeysSupport [ 133 libX11 134 ] 135 ++ optionals osdSupport [ 136 dbus 137 ] 138 ++ optionals alsaSupport [ 139 alsa-lib 140 ] 141 ++ optionals pulseSupport [ 142 libpulseaudio 143 ] 144 ++ optionals pipewireSupport [ 145 pipewire 146 ] 147 ++ optionals resamplerSupport [ 148 libsamplerate 149 ] 150 ++ optionals overloadSupport [ 151 zlib 152 ] 153 ++ optionals wavpackSupport [ 154 wavpack 155 ] 156 ++ optionals remoteSupport [ 157 curl 158 ]; 159 160 nativeBuildInputs = [ 161 autoconf 162 automake 163 intltool 164 libtool 165 pkg-config 166 ] 167 ++ optionals gtk3Support [ 168 wrapGAppsHook3 169 ]; 170 171 enableParallelBuilding = true; 172 173 preConfigure = '' 174 ./autogen.sh 175 ''; 176 177 postPatch = '' 178 # Fix the build on c++17 compiler: 179 # https://github.com/DeaDBeeF-Player/deadbeef/issues/3012 180 # TODO: remove after 1.9.5 release. 181 substituteInPlace plugins/adplug/Makefile.am --replace 'adplug_la_CXXFLAGS = ' 'adplug_la_CXXFLAGS = -std=c++11 ' 182 ''; 183 184 meta = with lib; { 185 description = "Ultimate Music Player for GNU/Linux"; 186 mainProgram = "deadbeef"; 187 homepage = "http://deadbeef.sourceforge.net/"; 188 downloadPage = "https://github.com/DeaDBeeF-Player/deadbeef"; 189 license = licenses.gpl2; 190 platforms = [ 191 "x86_64-linux" 192 "i686-linux" 193 ]; 194 maintainers = [ maintainers.abbradar ]; 195 }; 196}