1 { lib, stdenv, fetchurl, cmake, removeReferencesTo }:
3 stdenv.mkDerivation rec {
5 pname = "game-music-emu";
8 url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${pname}-${version}.tar.xz";
9 sha256 = "07857vdkak306d9s5g6fhmjyxk7vijzjhkmqb15s7ihfxx9lx8xb";
11 cmakeFlags = lib.optionals (stdenv.isDarwin || stdenv.hostPlatform.isMusl) [ "-DENABLE_UBSAN=OFF" ];
12 nativeBuildInputs = [ cmake removeReferencesTo ];
14 # It used to reference it, in the past, but thanks to the postFixup hook, now
16 disallowedReferences = [ stdenv.cc.cc ];
18 postFixup = lib.optionalString stdenv.isLinux ''
19 remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/lib/libgme.so)"
23 homepage = "https://bitbucket.org/mpyne/game-music-emu/wiki/Home";
24 description = "A collection of video game music file emulators";
25 license = licenses.lgpl21Plus;
26 platforms = platforms.all;
27 maintainers = with maintainers; [ luc65r lheckemann ];