uade: Modernise

This commit is contained in:
OPNA2608
2024-11-11 12:41:14 +01:00
parent c802a0129d
commit cb171c5233
+29 -27
View File
@@ -2,62 +2,63 @@
lib,
stdenv,
fetchFromGitLab,
bencodetools,
flac,
lame,
libao,
makeWrapper,
python3,
pkg-config,
which,
makeWrapper,
libao,
bencodetools,
sox,
lame,
flac,
vorbis-tools,
which,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "uade";
version = "3.02";
src = fetchFromGitLab {
owner = "uade-music-player";
repo = "uade";
rev = "uade-${version}";
rev = "uade-${finalAttrs.version}";
hash = "sha256-skPEXBQwyr326zCmZ2jwGxcBoTt3Y/h2hagDeeqbMpw=";
};
postPatch = ''
patchShebangs configure
substituteInPlace configure \
--replace 'PYTHON_SETUP_ARGS=""' 'PYTHON_SETUP_ARGS="--prefix=$out"'
substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \
--replace '-e stat' '-n stat' \
--replace '/usr/local' "$out"
--replace-fail '-e stat' '-n stat' \
--replace-fail '/usr/local' "$out"
substituteInPlace python/uade/generate_oscilloscope_view.py \
--replace "default='uade123'" "default='$out/bin/uade123'"
--replace-fail "default='uade123'" "default='$out/bin/uade123'"
# https://gitlab.com/uade-music-player/uade/-/issues/37
substituteInPlace write_audio/Makefile.in \
--replace 'g++' '${stdenv.cc.targetPrefix}c++'
--replace-fail 'g++' '${stdenv.cc.targetPrefix}c++'
'';
nativeBuildInputs = [
makeWrapper
pkg-config
which
makeWrapper
];
buildInputs = [
libao
bencodetools
sox
lame
flac
lame
libao
sox
vorbis-tools
];
configureFlags = [
"--bencode-tools-prefix=${bencodetools}"
"--with-text-scope"
"--without-write-audio"
(lib.strings.withFeature true "text-scope")
(lib.strings.withFeature false "write-audio")
];
enableParallelBuilding = true;
@@ -68,26 +69,27 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/mod2ogg2.sh \
--prefix PATH : $out/bin:${
lib.makeBinPath [
sox
lame
flac
lame
sox
vorbis-tools
]
}
# This is an old script, don't break expectations by renaming it
ln -s $out/bin/mod2ogg2{.sh,}
'';
meta = with lib; {
meta = {
description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API";
homepage = "https://zakalwe.fi/uade/";
# It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g.
# - hippel-coso player is "[not] under any Open Source certified license"
# - infogrames player is disassembled from Andi Silvas player, unknown license
# Let's make it easy and flag the whole package as unfree.
license = licenses.unfree;
maintainers = with maintainers; [ OPNA2608 ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ OPNA2608 ];
mainProgram = "uade123";
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
})