2022-04-27 09:35:20 +00:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, zlib
|
|
|
|
, pkg-config
|
|
|
|
, mpg123
|
|
|
|
, libogg
|
|
|
|
, libvorbis
|
|
|
|
, portaudio
|
|
|
|
, libsndfile
|
|
|
|
, flac
|
|
|
|
, usePulseAudio ? config.pulseaudio or stdenv.isLinux
|
|
|
|
, libpulseaudio
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libopenmpt";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.7.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "bin" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-WMaiiXISaCim9ljghK7nqo+L/bdaC9DjRcf/Km2e8Iw=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
mpg123
|
|
|
|
libogg
|
|
|
|
libvorbis
|
|
|
|
portaudio
|
|
|
|
libsndfile
|
|
|
|
flac
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals usePulseAudio [
|
|
|
|
libpulseaudio
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
configureFlags = [
|
|
|
|
(lib.strings.withFeature usePulseAudio "pulseaudio")
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
moveToOutput share/doc $dev
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross-platform C++ and C library to decode tracked music files into a raw PCM audio stream";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "openmpt123";
|
2022-04-27 09:35:20 +00:00
|
|
|
longDescription = ''
|
|
|
|
libopenmpt is a cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream.
|
|
|
|
openmpt123 is a cross-platform command-line or terminal based module file player.
|
|
|
|
libopenmpt is based on the player code of the OpenMPT project.
|
|
|
|
'';
|
|
|
|
homepage = "https://lib.openmpt.org/libopenmpt/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|