2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-06-02 14:57:37 +01:00
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, curl
|
2021-07-09 01:38:09 +01:00
|
|
|
, espeak
|
2020-06-02 14:57:37 +01:00
|
|
|
, file
|
|
|
|
, gtk3
|
2021-07-09 01:38:09 +01:00
|
|
|
, gtkdatabox
|
2020-06-02 14:57:37 +01:00
|
|
|
, intltool
|
2021-01-17 05:49:22 +00:00
|
|
|
, pkg-config
|
2020-06-02 14:57:37 +01:00
|
|
|
}:
|
2012-07-02 15:37:17 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "klavaro";
|
2021-07-09 01:38:09 +01:00
|
|
|
version = "3.13";
|
2012-07-02 15:37:17 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/klavaro/${pname}-${version}.tar.bz2";
|
2021-07-09 01:38:09 +01:00
|
|
|
sha256 = "0z6c3lqikk50mkz3ipm93l48qj7b98lxyip8y6ndg9y9k0z0n878";
|
2012-07-02 15:37:17 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 05:49:22 +00:00
|
|
|
nativeBuildInputs = [ intltool makeWrapper pkg-config ];
|
2021-07-09 01:38:09 +01:00
|
|
|
buildInputs = [ curl gtk3 gtkdatabox ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/tutor.c --replace '"espeak ' '"${espeak}/bin/espeak '
|
|
|
|
'';
|
2014-11-08 16:12:37 +00:00
|
|
|
|
2022-03-14 03:27:16 +00:00
|
|
|
patches = [ ./icons.patch ./trans_lang_get_similar.patch ];
|
2022-03-14 02:43:03 +00:00
|
|
|
|
2014-11-08 16:12:37 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/klavaro \
|
|
|
|
--prefix LD_LIBRARY_PATH : $out/lib
|
|
|
|
'';
|
2012-07-02 15:37:17 +01:00
|
|
|
|
2020-06-02 14:57:37 +01:00
|
|
|
# Fixes /usr/bin/file: No such file or directory
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "/usr/bin/file" "${file}/bin/file"
|
|
|
|
'';
|
|
|
|
|
2017-05-16 15:35:52 +01:00
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
|
|
|
preFixup = ''rm -rf "$(pwd)" '';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-06-02 14:57:37 +01:00
|
|
|
description = "Free touch typing tutor program";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://klavaro.sourceforge.net/";
|
2020-08-26 14:37:04 +01:00
|
|
|
changelog = "https://sourceforge.net/p/klavaro/code/HEAD/tree/trunk/ChangeLog";
|
2020-06-02 14:57:37 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ mimame davidak ];
|
2012-07-02 15:37:17 +01:00
|
|
|
};
|
|
|
|
}
|