2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, gitUpdater
|
|
|
|
, alsa-lib
|
|
|
|
, cmake
|
|
|
|
, Cocoa
|
|
|
|
, CoreAudio
|
|
|
|
, Foundation
|
|
|
|
, libjack2
|
|
|
|
, lhasa
|
|
|
|
, makeWrapper
|
|
|
|
, perl
|
|
|
|
, pkg-config
|
|
|
|
, rtmidi
|
|
|
|
, SDL2
|
|
|
|
, zlib
|
|
|
|
, zziplib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "milkytracker";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.04.00";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-08-04 22:07:22 +00:00
|
|
|
owner = "milkytracker";
|
|
|
|
repo = "MilkyTracker";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-ta4eV/FGBfgTppJwDam0OKQ7udtlinbWly/FPCE+Qss=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
2023-08-04 22:07:22 +00:00
|
|
|
# Fix crash after querying midi ports
|
|
|
|
# Remove when version > 1.04.00
|
2023-07-15 17:15:38 +00:00
|
|
|
(fetchpatch {
|
2023-08-04 22:07:22 +00:00
|
|
|
url = "https://github.com/milkytracker/MilkyTracker/commit/7e9171488fc47ad2de646a4536794fda21e7303d.patch";
|
|
|
|
hash = "sha256-CmnIwmGGnsnlRrvVAXe2zaQf1CFMB5BJPKmiwGOHgGY=";
|
2023-07-15 17:15:38 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
lhasa
|
|
|
|
libjack2
|
|
|
|
perl
|
|
|
|
rtmidi
|
|
|
|
SDL2
|
|
|
|
zlib
|
|
|
|
zziplib
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
alsa-lib
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
Cocoa
|
|
|
|
CoreAudio
|
|
|
|
Foundation
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
2020-12-25 13:55:36 +00:00
|
|
|
install -Dm644 $src/resources/milkytracker.desktop $out/share/applications/milkytracker.desktop
|
|
|
|
install -Dm644 $src/resources/pictures/carton.png $out/share/pixmaps/milkytracker.png
|
|
|
|
install -Dm644 $src/resources/milkytracker.appdata $out/share/appdata/milkytracker.appdata.xml
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Music tracker application, similar to Fasttracker II";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://milkytracker.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
# ibtool -> real Xcode -> I can't get that, and Ofborg can't test that
|
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "milkytracker";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
})
|