python312Packages.databricks-sdk: 0.41.0 -> 0.43.0 (#380426)
[NixPkgs.git] / pkgs / by-name / so / soundtracker / package.nix
blob4fb702a11eb222c037e836887c413b7edee74e53
2   lib,
3   stdenv,
4   fetchzip,
5   pkg-config,
6   autoreconfHook,
7   gtk2,
8   alsa-lib,
9   SDL,
10   jack2,
11   audiofile,
12   goocanvas, # graphical envelope editing
13   libxml2,
14   libsndfile,
17 stdenv.mkDerivation (finalAttrs: {
18   pname = "soundtracker";
19   version = "1.0.5";
21   src = fetchzip {
22     # Past releases get moved to the "old releases" directory.
23     # Only the latest release is at the top level.
24     # Nonetheless, only the name of the file seems to affect which file is
25     # downloaded, so this path should be fine both for old and current releases.
26     url = "mirror://sourceforge/soundtracker/soundtracker-${finalAttrs.version}.tar.xz";
27     hash = "sha256-g96Z1SdFGMq7WFI6x+UtmAHPZF0C+tHUOjNhmK2ld8I=";
28   };
30   postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
31     # Darwin binutils don't support D option for ar
32     # ALSA macros are missing on Darwin, causing error
33     substituteInPlace configure.ac \
34       --replace ARFLAGS=crD ARFLAGS=cru \
35       --replace AM_PATH_ALSA '#AM_PATH_ALSA'
36     # Avoid X11-specific workaround code on more than just Windows
37     substituteInPlace app/keys.c \
38       --replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)'
39     # "The application with bundle ID (null) is running setugid(), which is not allowed."
40     sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c
41   '';
43   configureFlags =
44     [
45       "--with-graphics-backend=gdk"
46     ]
47     ++ lib.optionals stdenv.hostPlatform.isDarwin [
48       "--disable-alsa"
49     ];
51   enableParallelBuilding = true;
53   nativeBuildInputs = [
54     pkg-config
55     autoreconfHook
56   ];
58   buildInputs = [
59     gtk2
60     SDL
61     jack2
62     audiofile
63     goocanvas
64     libxml2
65     libsndfile
66   ] ++ lib.optional stdenv.hostPlatform.isLinux alsa-lib;
68   meta = with lib; {
69     description = "Music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker";
70     longDescription = ''
71       SoundTracker is a pattern-oriented music editor (similar to the DOS
72       program 'FastTracker'). Samples are lined up on tracks and patterns
73       which are then arranged to a song. Supported module formats are XM and
74       MOD; the player code is the one from OpenCP. A basic sample recorder
75       and editor is also included.
76     '';
77     homepage = "http://www.soundtracker.org/";
78     downloadPage = "https://sourceforge.net/projects/soundtracker/files/";
79     license = licenses.gpl2Plus;
80     maintainers = with maintainers; [ fgaz ];
81     platforms = platforms.all;
82     hydraPlatforms = platforms.linux; # sdl-config times out on darwin
83   };