14 # https://gitlab.com/uade-music-player/uade/-/issues/38
15 , withWriteAudio ? !stdenv.hostPlatform.isDarwin
18 stdenv.mkDerivation rec {
22 src = fetchFromGitLab {
23 owner = "uade-music-player";
25 rev = "uade-${version}";
26 sha256 = "sha256-skPEXBQwyr326zCmZ2jwGxcBoTt3Y/h2hagDeeqbMpw=";
30 patchShebangs configure
31 substituteInPlace configure \
32 --replace 'PYTHON_SETUP_ARGS=""' 'PYTHON_SETUP_ARGS="--prefix=$out"'
33 substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \
34 --replace '-e stat' '-n stat' \
35 --replace '/usr/local' "$out"
36 substituteInPlace python/uade/generate_oscilloscope_view.py \
37 --replace "default='uade123'" "default='$out/bin/uade123'"
38 # https://gitlab.com/uade-music-player/uade/-/issues/37
39 substituteInPlace write_audio/Makefile.in \
40 --replace 'g++' '${stdenv.cc.targetPrefix}c++'
47 ] ++ lib.optionals withWriteAudio [
58 ] ++ lib.optionals withWriteAudio [
59 (python3.withPackages (p: with p; [
67 "--bencode-tools-prefix=${bencodetools}"
69 ] ++ lib.optionals (!withWriteAudio) [
70 "--without-write-audio"
73 enableParallelBuilding = true;
75 hardeningDisable = [ "format" ];
78 wrapProgram $out/bin/mod2ogg2.sh \
79 --prefix PATH : $out/bin:${lib.makeBinPath [ sox lame flac vorbis-tools ]}
80 # This is an old script, don't break expectations by renaming it
81 ln -s $out/bin/mod2ogg2{.sh,}
82 '' + lib.optionalString withWriteAudio ''
83 wrapProgram $out/bin/generate_amiga_oscilloscope_view \
84 --prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}"
88 description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API";
89 homepage = "https://zakalwe.fi/uade/";
90 # It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g.
91 # - hippel-coso player is "[not] under any Open Source certified license"
92 # - infogrames player is disassembled from Andi Silvas player, unknown license
93 # Let's make it easy and flag the whole package as unfree.
94 license = licenses.unfree;
95 maintainers = with maintainers; [ OPNA2608 ];
96 mainProgram = "uade123";
97 platforms = platforms.unix;