libopenmpt: 0.5.11 -> 0.6.2, refactor
- Post-rename cleanup to better match its library status: - Moved files to library directory - Changed outputs - Some formatting improvements - Added update script
This commit is contained in:
parent
12769bc7e1
commit
4d3b9839a4
4 changed files with 98 additions and 43 deletions
|
@ -1,42 +0,0 @@
|
|||
{ config, lib, stdenv, fetchurl, fetchpatch, zlib, pkg-config, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
|
||||
, usePulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libopenmpt";
|
||||
version = "0.5.11";
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
|
||||
sha256 = "1c54lldr2imjzhlhq5lvwhj7d5794xm97cby9pznr5wdjjay0sa4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix pending upstream inclusion for gcc-12 include headers:
|
||||
# https://github.com/OpenMPT/openmpt/pull/8
|
||||
(fetchpatch {
|
||||
name = "gcc-12.patch";
|
||||
url = "https://github.com/OpenMPT/openmpt/commit/6e7a43190ef2f9ba0b3efc19b9527261b69ec8f7.patch";
|
||||
sha256 = "081m1rf09bbrlg52aihaajmld5dcnwbp6y7zpyik92mm332r330h";
|
||||
})
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ]
|
||||
++ lib.optional usePulseAudio libpulseaudio;
|
||||
|
||||
configureFlags = lib.optional (!usePulseAudio) "--without-pulseaudio";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cross-platform command-line based module file player";
|
||||
homepage = "https://lib.openmpt.org/libopenmpt/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ OPNA2608 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
66
pkgs/development/libraries/audio/libopenmpt/default.nix
Normal file
66
pkgs/development/libraries/audio/libopenmpt/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ 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";
|
||||
version = "0.6.2";
|
||||
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
|
||||
sha256 = "1dp645gg6d3pzjh82srq1d7qvyxi5h22k7yfdjiyzbyry8pxdh2h";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
mpg123
|
||||
libogg
|
||||
libvorbis
|
||||
portaudio
|
||||
libsndfile
|
||||
flac
|
||||
] ++ lib.optional usePulseAudio libpulseaudio;
|
||||
|
||||
configureFlags = lib.optional (!usePulseAudio) "--without-pulseaudio";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
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";
|
||||
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;
|
||||
};
|
||||
}
|
31
pkgs/development/libraries/audio/libopenmpt/update.sh
Executable file
31
pkgs/development/libraries/audio/libopenmpt/update.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts curl xmlstarlet
|
||||
|
||||
attr=libopenmpt
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
# Get update notifications, remove updates for libopenmpt-modplug, find latest eligible & extract versions
|
||||
versions="$(
|
||||
curl -s 'https://lib.openmpt.org/libopenmpt/feed.xml' |
|
||||
xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n |
|
||||
grep -v 'libopenmpt-modplug' | head -n1 |
|
||||
grep -Eo '([0-9][^,\s]+)' | tr '\n' ' '
|
||||
)"
|
||||
echo "Latest $attr versions: $versions"
|
||||
|
||||
# Find a version that is > current version and not a rc
|
||||
# rc's have different download path and a full release will usually follow shortly
|
||||
currentVersion="$(nix-instantiate --eval -E "with import ./. {}; $attr.version" | tr -d '"')"
|
||||
echo "Current $attr version: $currentVersion"
|
||||
for version in $versions; do
|
||||
(echo "$version" | grep -q 'rc') && continue
|
||||
[ "$version" = "$(printf '%s\n%s' "$version" "$currentVersion" | sort -V | head -n1)" ] && continue
|
||||
|
||||
echo "Updating to $version. Please check if other versions qualify for backport to stable!"
|
||||
update-source-version "$attr" "$version"
|
||||
exit 0
|
||||
done
|
||||
|
||||
echo "No version eligible for bump."
|
||||
exit 0
|
|
@ -28138,7 +28138,7 @@ with pkgs;
|
|||
|
||||
vivaldi-widevine = callPackage ../applications/networking/browsers/vivaldi/widevine.nix { };
|
||||
|
||||
libopenmpt = callPackage ../applications/audio/libopenmpt { };
|
||||
libopenmpt = callPackage ../development/libraries/audio/libopenmpt { };
|
||||
|
||||
openrazer-daemon = with python3Packages; toPythonApplication openrazer-daemon;
|
||||
|
||||
|
|
Loading…
Reference in a new issue