2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchFromGitHub
|
2020-12-03 08:41:04 +00:00
|
|
|
, unstableGitUpdater
|
2020-09-25 04:45:31 +00:00
|
|
|
, SDL
|
|
|
|
, jack2
|
|
|
|
, Foundation
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "littlegptracker";
|
2020-11-30 08:33:03 +00:00
|
|
|
version = "unstable-2020-11-26";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mdashdotdashn";
|
|
|
|
repo = "littlegptracker";
|
2020-11-30 08:33:03 +00:00
|
|
|
rev = "4aca8cd765e1ad586da62decd019e66cb64b45b8";
|
|
|
|
sha256 = "0f2ip8z5wxk8fvlw47mczsbcrzh4nh1hgw1fwf5gjrqnzm8v111x";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL
|
|
|
|
]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional stdenv.isDarwin Foundation
|
|
|
|
++ lib.optional stdenv.isLinux jack2;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Remove outdated (pre-64bit) checks that would fail on modern platforms
|
|
|
|
# (see description in patch file)
|
|
|
|
./0001-Remove-coherency-checks.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = "cd projects";
|
|
|
|
|
|
|
|
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ "PLATFORM=DEB" ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([ "-fpermissive" ] ++
|
|
|
|
lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing");
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework Foundation";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
installPhase = let extension = if stdenv.isDarwin then "app" else "deb-exe";
|
|
|
|
in "install -Dm555 lgpt.${extension} $out/bin/lgpt";
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
url = "https://github.com/Mdashdotdashn/littlegptracker.git";
|
|
|
|
};
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "A music tracker similar to lsdj optimised to run on portable game consoles";
|
|
|
|
longDescription = ''
|
|
|
|
LittleGPTracker (a.k.a 'The piggy', 'lgpt') is a music tracker optimised
|
|
|
|
to run on portable game consoles. It is currently running on Game Park's
|
|
|
|
GP2x & Caanoo, PSP, Dingoo, Windows, Mac OSX (intel/ppc) & Linux (Debian).
|
|
|
|
|
|
|
|
It implements the user interface of littlesounddj, a very famous tracker
|
|
|
|
for the Gameboy platform that has been tried and tested by many users over
|
|
|
|
the years, leading to a little complex but yet extremely efficent way of
|
|
|
|
working.
|
|
|
|
|
|
|
|
Piggy currently supports 8 monophonic 16Bit/44.1Khz stereo sample playback
|
|
|
|
channels. Additionally, the program can drive MIDI instruments (with the
|
|
|
|
gp32 and gp2x a custom MIDI interface is required).
|
|
|
|
'';
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://www.littlegptracker.com/";
|
|
|
|
downloadPage = "https://www.littlegptracker.com/download.php";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/91766#issuecomment-688751821
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
};
|
|
|
|
}
|