biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / audio / sfxr / default.nix
blob552bc8ea52a566a753a92afaf349d64f0eaa4c4a
1 { lib, stdenv
2 , fetchurl
3 , fetchpatch
4 , pkg-config
5 , desktop-file-utils
6 , SDL
7 , gtk3
8 , gsettings-desktop-schemas
9 , wrapGAppsHook
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "sfxr";
14   version = "1.2.1";
16   src = fetchurl {
17     url = "http://www.drpetter.se/files/sfxr-sdl-${finalAttrs.version}.tar.gz";
18     sha256 = "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya";
19   };
21   patches = [
22     # Fix segfault
23     (fetchpatch {
24       url = "https://src.fedoraproject.org/rpms/sfxr/raw/223e58e68857c2018ced635e8209bb44f3616bf8/f/sfxr-sdl-gcc8x.patch";
25       hash = "sha256-etn4AutkNrhEDH9Ep8MhH9JSJEd7V/JXwjQua5uhAmg=";
26     })
27   ];
29   postPatch = ''
30     substituteInPlace Makefile --replace "usr/" ""
31     substituteInPlace sdlkit.h --replace \
32       "/usr/share/sfxr/sfxr.bmp" \
33       "$out/share/sfxr/sfxr.bmp"
34     substituteInPlace main.cpp \
35       --replace \
36       "/usr/share/sfxr/font.tga" \
37       "$out/share/sfxr/font.tga" \
38       --replace \
39       "/usr/share/sfxr/ld48.tga" \
40       "$out/share/sfxr/ld48.tga"
41   '';
43   nativeBuildInputs = [
44     pkg-config
45     desktop-file-utils
46   ];
48   buildInputs = [
49     SDL
50     gtk3
51     gsettings-desktop-schemas
52     wrapGAppsHook
53   ];
55   makeFlags = [ "DESTDIR=$(out)" ];
57   meta = with lib; {
58     broken = stdenv.isDarwin;
59     homepage = "http://www.drpetter.se/project_sfxr.html";
60     description = "A videogame sound effect generator";
61     mainProgram = "sfxr";
62     license = licenses.mit;
63     maintainers = with maintainers; [ fgaz ];
64     platforms = platforms.unix;
65   };