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