stdenv: fix documentation for stripAllFlags and stripDebugFlags (#352127)
[NixPkgs.git] / pkgs / by-name / sf / sfxr / package.nix
blob5f2fe5e75d87ef75c492ad72c2dcd1255cd0a822
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   pkg-config,
7   desktop-file-utils,
8   SDL,
9   gtk3,
10   gsettings-desktop-schemas,
11   wrapGAppsHook3,
14 stdenv.mkDerivation (finalAttrs: {
15   pname = "sfxr";
16   version = "1.2.1";
18   src = fetchurl {
19     url = "http://www.drpetter.se/files/sfxr-sdl-${finalAttrs.version}.tar.gz";
20     sha256 = "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya";
21   };
23   patches = [
24     # Fix segfault
25     (fetchpatch {
26       url = "https://src.fedoraproject.org/rpms/sfxr/raw/223e58e68857c2018ced635e8209bb44f3616bf8/f/sfxr-sdl-gcc8x.patch";
27       hash = "sha256-etn4AutkNrhEDH9Ep8MhH9JSJEd7V/JXwjQua5uhAmg=";
28     })
29   ];
31   postPatch = ''
32     substituteInPlace Makefile --replace "usr/" ""
33     substituteInPlace sdlkit.h --replace \
34       "/usr/share/sfxr/sfxr.bmp" \
35       "$out/share/sfxr/sfxr.bmp"
36     substituteInPlace main.cpp \
37       --replace \
38       "/usr/share/sfxr/font.tga" \
39       "$out/share/sfxr/font.tga" \
40       --replace \
41       "/usr/share/sfxr/ld48.tga" \
42       "$out/share/sfxr/ld48.tga"
43   '';
45   nativeBuildInputs = [
46     pkg-config
47     desktop-file-utils
48   ];
50   buildInputs = [
51     SDL
52     gtk3
53     gsettings-desktop-schemas
54     wrapGAppsHook3
55   ];
57   makeFlags = [ "DESTDIR=$(out)" ];
59   meta = with lib; {
60     broken = stdenv.hostPlatform.isDarwin;
61     homepage = "http://www.drpetter.se/project_sfxr.html";
62     description = "Videogame sound effect generator";
63     mainProgram = "sfxr";
64     license = licenses.mit;
65     maintainers = with maintainers; [ fgaz ];
66     platforms = platforms.unix;
67   };