Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 file, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "libmodplug"; 10 version = "0.8.9.0"; 11 12 src = fetchurl { 13 url = "mirror://sourceforge/project/modplug-xmms/libmodplug/${version}/${pname}-${version}.tar.gz"; 14 sha256 = "1pnri98a603xk47smnxr551svbmgbzcw018mq1k6srbrq6kaaz25"; 15 }; 16 17 # Unfortunately, upstream appears inactive and the patches from the fork don’t apply cleanly. 18 # Modify `src/fastmix.cpp` to remove usage of the register storage class, which is 19 # not allowed in C++17 and is an error in clang 16. 20 prePatch = "substituteInPlace src/fastmix.cpp --replace 'register ' ''"; 21 22 outputs = [ 23 "out" 24 "dev" 25 ]; 26 27 preConfigure = '' 28 substituteInPlace configure \ 29 --replace ' -mmacosx-version-min=10.5' "" \ 30 --replace /usr/bin/file ${file}/bin/file 31 ''; 32 33 meta = with lib; { 34 description = "MOD playing library"; 35 homepage = "https://modplug-xmms.sourceforge.net/"; 36 license = licenses.publicDomain; 37 platforms = platforms.unix; 38 maintainers = with maintainers; [ raskin ]; 39 }; 40}