2021-07-23 16:02:20 +02:00
|
|
|
{ lib, stdenv, fetchurl, swt, jre, makeWrapper, alsa-lib, jack2, fluidsynth, libpulseaudio }:
|
2015-03-07 17:48:54 +01:00
|
|
|
|
2018-08-20 21:11:29 +02:00
|
|
|
let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux";
|
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then
|
2021-07-23 16:02:20 +02:00
|
|
|
{ arch = "x86"; sha256 = "afa4b1116aee18e3ddd93132467809d0bcf03715cf9ad55b895f021a13e1cb8a"; }
|
2015-03-11 18:34:26 +01:00
|
|
|
else
|
2021-07-23 16:02:20 +02:00
|
|
|
{ arch = "x86_64"; sha256 = "55ab653c601727a2077080e7ea4d76fe7a897379934ed9a5b544e20d490f53f9"; };
|
2015-03-07 17:48:54 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2021-07-23 16:02:20 +02:00
|
|
|
version = "1.5.4";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "tuxguitar";
|
2015-03-07 17:48:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-23 16:02:20 +02:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}-linux-${metadata.arch}.tar.gz";
|
2015-03-07 17:48:54 +01:00
|
|
|
sha256 = metadata.sha256;
|
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-03-07 17:48:54 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2015-03-08 11:14:02 +01:00
|
|
|
mkdir -p $out/bin
|
2019-10-27 13:03:55 +01:00
|
|
|
cp -r dist lib share $out/
|
|
|
|
cp tuxguitar.sh $out/bin/tuxguitar
|
2015-03-07 17:48:54 +01:00
|
|
|
|
2019-10-27 13:03:55 +01:00
|
|
|
ln -s $out/dist $out/bin/dist
|
|
|
|
ln -s $out/lib $out/bin/lib
|
2015-03-08 11:14:02 +01:00
|
|
|
ln -s $out/share $out/bin/share
|
|
|
|
|
|
|
|
wrapProgram $out/bin/tuxguitar \
|
2021-07-23 16:02:20 +02:00
|
|
|
--set JAVA "${jre}/bin/java" \
|
2021-06-10 04:57:09 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : "$out/lib/:${lib.makeLibraryPath [ swt alsa-lib jack2 fluidsynth libpulseaudio ]}" \
|
2015-03-08 11:14:02 +01:00
|
|
|
--prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar"
|
2015-03-07 17:48:54 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-03-07 17:48:54 +01:00
|
|
|
description = "A multitrack guitar tablature editor";
|
|
|
|
longDescription = ''
|
|
|
|
TuxGuitar is a multitrack guitar tablature editor and player written
|
|
|
|
in Java-SWT. It can open GuitarPro, PowerTab and TablEdit files.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.tuxguitar.com.ar/";
|
2015-03-07 17:48:54 +01:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = [ maintainers.ardumont ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|