depot/third_party/nixpkgs/pkgs/development/libraries/libmodplug/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

32 lines
1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv, fetchurl, file }:
stdenv.mkDerivation rec {
pname = "libmodplug";
version = "0.8.9.0";
src = fetchurl {
url = "mirror://sourceforge/project/modplug-xmms/libmodplug/${version}/${pname}-${version}.tar.gz";
sha256 = "1pnri98a603xk47smnxr551svbmgbzcw018mq1k6srbrq6kaaz25";
};
# Unfortunately, upstream appears inactive and the patches from the fork dont apply cleanly.
# Modify `src/fastmix.cpp` to remove usage of the register storage class, which is
# not allowed in C++17 and is an error in clang 16.
prePatch = "substituteInPlace src/fastmix.cpp --replace 'register ' ''";
outputs = [ "out" "dev" ];
preConfigure = ''
substituteInPlace configure \
--replace ' -mmacosx-version-min=10.5' "" \
--replace /usr/bin/file ${file}/bin/file
'';
meta = with lib; {
description = "MOD playing library";
homepage = "https://modplug-xmms.sourceforge.net/";
license = licenses.publicDomain;
platforms = platforms.unix;
maintainers = with maintainers; [ raskin ];
};
}