2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromBitbucket, cmake, removeReferencesTo }:
|
2021-07-18 21:22:44 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libgme";
|
2021-07-18 21:22:44 +00:00
|
|
|
version = "0.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A collection of video game music chip emulators";
|
|
|
|
homepage = "https://bitbucket.org/mpyne/game-music-emu/overview";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchFromBitbucket {
|
|
|
|
owner = "mpyne";
|
|
|
|
repo = "game-music-emu";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "100ahb4n4pvgcry9xzlf2fr4j57n5h9x7pvyhhxys4dcy8axqqsy";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake removeReferencesTo ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
# These checks fail on aarch64-darwin
|
|
|
|
cmakeFlags = [ "-DENABLE_UBSAN=OFF" ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
# It used to reference it, in the past, but thanks to the postFixup hook, now
|
|
|
|
# it doesn't.
|
|
|
|
disallowedReferences = [ stdenv.cc.cc ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
2020-06-18 07:06:33 +00:00
|
|
|
remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/lib/libgme.so)"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|