2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
2021-08-05 21:33:18 +00:00
|
|
|
, autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk2
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, SDL
|
|
|
|
, jack2
|
2020-08-20 17:08:02 +00:00
|
|
|
, audiofile
|
2020-04-24 23:36:52 +00:00
|
|
|
, goocanvas # graphical envelope editing
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "soundtracker";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "1.0.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
# Past releases get moved to the "old releases" directory.
|
2020-08-20 17:08:02 +00:00
|
|
|
# Only the latest release is at the top level.
|
|
|
|
# Nonetheless, only the name of the file seems to affect which file is
|
|
|
|
# downloaded, so this path should be fine both for old and current releases.
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "mirror://sourceforge/soundtracker/soundtracker-${version}.tar.xz";
|
|
|
|
sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
# Darwin binutils don't support D option for ar
|
|
|
|
# ALSA macros are missing on Darwin, causing error
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace ARFLAGS=crD ARFLAGS=cru \
|
|
|
|
--replace AM_PATH_ALSA '#AM_PATH_ALSA'
|
|
|
|
# Avoid X11-specific workaround code on more than just Windows
|
|
|
|
substituteInPlace app/keys.c \
|
|
|
|
--replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)'
|
|
|
|
# "The application with bundle ID (null) is running setugid(), which is not allowed."
|
|
|
|
sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-graphics-backend=gdk"
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
"--disable-alsa"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-08-05 21:33:18 +00:00
|
|
|
autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk2
|
|
|
|
SDL
|
|
|
|
jack2
|
2020-08-20 17:08:02 +00:00
|
|
|
audiofile
|
2020-04-24 23:36:52 +00:00
|
|
|
goocanvas
|
2021-06-28 23:13:55 +00:00
|
|
|
] ++ lib.optional stdenv.isLinux alsa-lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker";
|
|
|
|
longDescription = ''
|
|
|
|
SoundTracker is a pattern-oriented music editor (similar to the DOS
|
|
|
|
program 'FastTracker'). Samples are lined up on tracks and patterns
|
|
|
|
which are then arranged to a song. Supported module formats are XM and
|
|
|
|
MOD; the player code is the one from OpenCP. A basic sample recorder
|
|
|
|
and editor is also included.
|
|
|
|
'';
|
|
|
|
homepage = "http://www.soundtracker.org/";
|
|
|
|
downloadPage = "https://sourceforge.net/projects/soundtracker/files/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|