1 { aspell, aspellDicts_de, aspellDicts_en, buildEnv, fetchurl, fortune, gnugrep, makeWrapper, lib, stdenv, tk, tre }:
4 name = "env-ding-aspell";
12 stdenv.mkDerivation rec {
17 url = "http://ftp.tu-chemnitz.de/pub/Local/urz/ding/ding-${version}.tar.gz";
18 sha256 = "sha256-aabIH894WihsBTo1LzIBzIZxxyhRYVxLcHpDQwmwmOU=";
21 nativeBuildInputs = [ makeWrapper ];
22 buildInputs = [ aspellEnv fortune gnugrep tk tre ];
24 patches = [ ./dict.patch ];
28 mkdir -p $out/share/dict
29 mkdir -p $out/share/man/man1
30 mkdir -p $out/share/applications
31 mkdir -p $out/share/pixmaps
33 for f in ding ding.1; do
34 sed -i "s@/usr/share@$out/share@g" "$f"
37 sed -i "s@/usr/bin/fortune@fortune@g" ding
39 sed -i "s@/usr/bin/ding@$out/bin/ding@g" ding.desktop
42 cp -v de-en.txt $out/share/dict/
43 cp -v ding.1 $out/share/man/man1/
44 cp -v ding.png $out/share/pixmaps/
45 cp -v ding.desktop $out/share/applications/
47 wrapProgram $out/bin/ding --prefix PATH : ${lib.makeBinPath [ gnugrep aspellEnv tk fortune ]} --prefix ASPELL_CONF : "\"prefix ${aspellEnv};\""
51 description = "Simple and fast dictionary lookup tool";
53 homepage = "https://www-user.tu-chemnitz.de/~fri/ding/";
54 license = licenses.gpl2Plus;
55 platforms = platforms.linux; # homepage says: unix-like except darwin
56 maintainers = [ maintainers.exi ];