2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-06-02 15:57:37 +02:00
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, curl
|
2021-07-09 02:38:09 +02:00
|
|
|
, espeak
|
2020-06-02 15:57:37 +02:00
|
|
|
, file
|
|
|
|
, gtk3
|
2021-07-09 02:38:09 +02:00
|
|
|
, gtkdatabox
|
2020-06-02 15:57:37 +02:00
|
|
|
, intltool
|
2021-01-17 06:49:22 +01:00
|
|
|
, pkg-config
|
2020-06-02 15:57:37 +02:00
|
|
|
}:
|
2012-07-02 16:37:17 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "klavaro";
|
2023-09-04 15:44:19 +02:00
|
|
|
version = "3.14";
|
2012-07-02 16:37:17 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://sourceforge/klavaro/${pname}-${version}.tar.bz2";
|
2023-09-04 15:44:19 +02:00
|
|
|
hash = "sha256-hxh+SdMBxRDmlkCYzbYSEmvwMNKodf15nq3K0+rlbas=";
|
2012-07-02 16:37:17 +02:00
|
|
|
};
|
|
|
|
|
2021-01-17 06:49:22 +01:00
|
|
|
nativeBuildInputs = [ intltool makeWrapper pkg-config ];
|
2021-07-09 02:38:09 +02:00
|
|
|
buildInputs = [ curl gtk3 gtkdatabox ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/tutor.c --replace '"espeak ' '"${espeak}/bin/espeak '
|
|
|
|
'';
|
2014-11-08 17:12:37 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/klavaro \
|
|
|
|
--prefix LD_LIBRARY_PATH : $out/lib
|
|
|
|
'';
|
2012-07-02 16:37:17 +02:00
|
|
|
|
2020-06-02 15:57:37 +02:00
|
|
|
# Fixes /usr/bin/file: No such file or directory
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "/usr/bin/file" "${file}/bin/file"
|
|
|
|
'';
|
|
|
|
|
2023-08-05 09:23:43 +02:00
|
|
|
# remove forbidden references to $TMPDIR
|
|
|
|
preFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
for f in "$out"/bin/*; do
|
|
|
|
if isELF "$f"; then
|
|
|
|
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
'';
|
2017-05-16 16:35:52 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-06-02 15:57:37 +02:00
|
|
|
description = "Free touch typing tutor program";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://klavaro.sourceforge.net/";
|
2020-08-26 15:37:04 +02:00
|
|
|
changelog = "https://sourceforge.net/p/klavaro/code/HEAD/tree/trunk/ChangeLog";
|
2020-06-02 15:57:37 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ mimame davidak ];
|
2012-07-02 16:37:17 +02:00
|
|
|
};
|
|
|
|
}
|