mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
d3d9204ce5
* milkytracker: adopt, 1.03.00 -> 1.04.00 * milkytracker: Add Darwin support * milkytracker: Mark Darwin broken Only thing that doesn't build are some resource files which require Xcode for ibtool. I don't have it, and Ofborg seemingly doesn't have it either, so I can't get it to build. * milkytracker: Remove SDL2MAIN_LIBRARY flag Doesn't seem necessary anymore?
86 lines
1.9 KiB
Nix
86 lines
1.9 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, gitUpdater
|
|
, alsa-lib
|
|
, cmake
|
|
, Cocoa
|
|
, CoreAudio
|
|
, Foundation
|
|
, libjack2
|
|
, lhasa
|
|
, makeWrapper
|
|
, perl
|
|
, pkg-config
|
|
, rtmidi
|
|
, SDL2
|
|
, zlib
|
|
, zziplib
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "milkytracker";
|
|
version = "1.04.00";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "milkytracker";
|
|
repo = "MilkyTracker";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-ta4eV/FGBfgTppJwDam0OKQ7udtlinbWly/FPCE+Qss=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix crash after querying midi ports
|
|
# Remove when version > 1.04.00
|
|
(fetchpatch {
|
|
url = "https://github.com/milkytracker/MilkyTracker/commit/7e9171488fc47ad2de646a4536794fda21e7303d.patch";
|
|
hash = "sha256-CmnIwmGGnsnlRrvVAXe2zaQf1CFMB5BJPKmiwGOHgGY=";
|
|
})
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
makeWrapper
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
lhasa
|
|
libjack2
|
|
perl
|
|
rtmidi
|
|
SDL2
|
|
zlib
|
|
zziplib
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
alsa-lib
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
Cocoa
|
|
CoreAudio
|
|
Foundation
|
|
];
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
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
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
rev-prefix = "v";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Music tracker application, similar to Fasttracker II";
|
|
homepage = "https://milkytracker.org/";
|
|
license = licenses.gpl3Plus;
|
|
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 ];
|
|
};
|
|
})
|