2021-11-07 10:47:57 +01:00
|
|
|
{lib, stdenv, fetchurl, fetchpatch, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod
|
2017-01-20 00:29:59 +01:00
|
|
|
, speex, ncurses
|
|
|
|
, keymap ? "default"
|
2011-03-10 23:20:35 +01:00
|
|
|
, conf ? "unknown"
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-20 12:34:30 +02:00
|
|
|
pname = "gmu";
|
|
|
|
version = "0.10.1";
|
2017-01-20 00:29:59 +01:00
|
|
|
|
2011-03-10 23:20:35 +01:00
|
|
|
src = fetchurl {
|
2021-06-20 12:34:30 +02:00
|
|
|
url = "https://wej.k.vu/files/${pname}-${version}.tar.gz";
|
2017-01-20 00:29:59 +01:00
|
|
|
sha256 = "03x0mc0xw2if0bpf0a15yprcyx1xccki039zvl2099dagwk6xskv";
|
2011-03-10 23:20:35 +01:00
|
|
|
};
|
|
|
|
|
2021-11-07 10:47:57 +01:00
|
|
|
patches = [
|
|
|
|
# pull pending upstream inclusion fix for ncurses-6.3:
|
|
|
|
# https://github.com/jhe2/gmu/pull/7
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/jhe2/gmu/commit/c8b3a10afee136feb333754ef6ec26383b11072f.patch";
|
|
|
|
sha256 = "0xp2j3jp8pkmv6yvnzi378m2dylbfsaqrsrkw7hbxw6kglzj399r";
|
|
|
|
})
|
|
|
|
|
|
|
|
# pull upstream fix for -fno-common toolchains like
|
|
|
|
# upstream gcc-10 of clang-13.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/jhe2/gmu/commit/b705209f08ddfda141ad358ccd0c3d2d099be5e6.patch";
|
|
|
|
sha256 = "1ci2b8kz3r58rzmivlfhqjmcgqwlkwlzzhnyxlk36vmk240a3gqq";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-01-20 00:29:59 +01:00
|
|
|
buildInputs = [ SDL SDL_gfx SDL_image tremor flac mpg123 libmikmod speex ncurses ];
|
2011-03-10 23:20:35 +01:00
|
|
|
|
2017-01-20 00:29:59 +01:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2011-03-10 23:20:35 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp ${keymap}.keymap $out/share/gmu/default.keymap
|
|
|
|
cp gmuinput.${conf}.conf $out/share/gmu/gmuinput.conf
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/etc/gmu
|
2011-03-10 23:20:35 +01:00
|
|
|
cp gmu.${conf}.conf $out/etc/gmu/gmu.conf
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://wejp.k.vu/projects/gmu";
|
2011-03-10 23:20:35 +01:00
|
|
|
description = "Open source music player for portable gaming consoles and handhelds";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2011-03-10 23:20:35 +01:00
|
|
|
};
|
|
|
|
}
|