2023-07-08 07:59:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, makeWrapper
|
2021-06-10 02:57:09 +00:00
|
|
|
, SDL2, alsa-lib, libjack2, lhasa, perl, rtmidi, zlib, zziplib }:
|
2013-10-29 16:14:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-12 14:31:57 +00:00
|
|
|
version = "1.03.00";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "milkytracker";
|
2013-10-29 16:14:53 +00:00
|
|
|
|
2018-09-13 04:21:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "milkytracker";
|
|
|
|
repo = "MilkyTracker";
|
|
|
|
rev = "v${version}";
|
2020-12-12 14:31:57 +00:00
|
|
|
sha256 = "025fj34gq2kmkpwcswcyx7wdxb89vm944dh685zi4bxx0hz16vvk";
|
2013-10-29 16:14:53 +00:00
|
|
|
};
|
|
|
|
|
2023-07-08 07:59:57 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2022-34927.patch";
|
|
|
|
url = "https://github.com/milkytracker/MilkyTracker/commit/3a5474f9102cbdc10fbd9e7b1b2c8d3f3f45d91b.patch";
|
|
|
|
hash = "sha256-YnN1Khcbct7iG7TdwxFU1XVCeKR/Zrhe+oMepvh8cRU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-12-01 16:48:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/milkytracker/MilkyTracker/issues/262
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'CMAKE_CXX_STANDARD 98' 'CMAKE_CXX_STANDARD 11'
|
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
|
2017-08-31 00:50:17 +00:00
|
|
|
|
2021-06-10 02:57:09 +00:00
|
|
|
buildInputs = [ SDL2 alsa-lib libjack2 lhasa perl rtmidi zlib zziplib ];
|
2013-10-29 16:14:53 +00:00
|
|
|
|
2020-02-18 07:53:48 +00:00
|
|
|
# Somehow this does not get set automatically
|
|
|
|
cmakeFlags = [ "-DSDL2MAIN_LIBRARY=${SDL2}/lib/libSDL2.so" ];
|
|
|
|
|
2020-12-09 11:50:58 +00:00
|
|
|
postInstall = ''
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-11-11 13:20:43 +00:00
|
|
|
description = "Music tracker application, similar to Fasttracker II";
|
2021-12-31 18:50:30 +00:00
|
|
|
homepage = "https://milkytracker.org/";
|
2018-09-13 04:21:08 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2013-11-07 10:05:13 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2021-12-02 21:37:56 +00:00
|
|
|
maintainers = with maintainers; [];
|
2013-10-29 16:14:53 +00:00
|
|
|
};
|
|
|
|
}
|