2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, SDL
|
|
|
|
, gtk3
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sfxr";
|
|
|
|
version = "1.2.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.drpetter.se/files/sfxr-sdl-${version}.tar.gz";
|
|
|
|
sha256 = "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace "usr/" ""
|
|
|
|
substituteInPlace sdlkit.h --replace \
|
|
|
|
"/usr/share/sfxr/sfxr.bmp" \
|
|
|
|
"$out/share/sfxr/sfxr.bmp"
|
|
|
|
substituteInPlace main.cpp \
|
|
|
|
--replace \
|
|
|
|
"/usr/share/sfxr/font.tga" \
|
|
|
|
"$out/share/sfxr/font.tga" \
|
|
|
|
--replace \
|
|
|
|
"/usr/share/sfxr/ld48.tga" \
|
|
|
|
"$out/share/sfxr/ld48.tga"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
desktop-file-utils
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL
|
|
|
|
gtk3
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.drpetter.se/project_sfxr.html";
|
|
|
|
description = "A videogame sound effect generator";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|