Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Russian dictionary for hunspell #53564

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions pkgs/development/libraries/hunspell/dictionaries.nix
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,41 @@ let
};
};

mkDictFromBB =
{ shortName, shortDescription, dictFileName }:
stdenv.mkDerivation rec {
name = "hunspell-dict-${shortName}-BB-${version}";
version = "20131101";
folderName = "ru_RU_UTF-8_${version}";

src = fetchurl {
url = "https://bitbucket.org/Shaman_Alex/russian-dictionary-hunspell/downloads/ru_RU_UTF-8_${version}.zip";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you hardcode a single-language source url, it is fine but then there is no point in defining a function.

sha256 = "024lm9cmdd69vzb5qjjkm9v0cy9v7xv3f0c1lkz92mkh0nihrhy9";
};

buildInputs = [ ispell perl hunspell unzip ];

phases = ["unpackPhase" "installPhase"];
unpackCmd = ''
unzip $src ${dictFileName}.dic ${dictFileName}.aff -d src
'';
installPhase = ''
# hunspell dicts
install -dm755 "$out/share/hunspell"
install -m644 ${dictFileName}.dic "$out/share/hunspell/"
install -m644 ${dictFileName}.aff "$out/share/hunspell/"
'';

meta = with stdenv.lib; {
homepage = https://code.google.com/archive/p/hunspell-ru/;
description = shortDescription;
license = with licenses; [ lgpl3 ];
maintainers = with maintainers; [ ];
platforms = platforms.all;
};
};


in {

/* ENGLISH */
Expand Down Expand Up @@ -544,4 +579,13 @@ in {
shortDescription = "German (Switzerland)";
dictFileName = "de_CH";
};

/* RUSSIAN */

ru-ru = mkDictFromBB {
shortName = "ru-ru";
shortDescription = "Russian (Russia)";
dictFileName = "ru_RU";
};

}
34 changes: 34 additions & 0 deletions pkgs/shells/ksh/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ stdenv, meson, ninja, fetchFromGitHub, which, python }:

stdenv.mkDerivation rec {
name = "ksh-${version}";
version = "93v";

src = fetchFromGitHub {
owner = "att";
repo = "ast";
rev = "b8d88244ae87857e7bbd6da230ffbbc51165df70";
sha256 = "12kf14n8vz36hnsy3wp6lnyv1841p7hcq25y1d78w532dil69lx9";
};

nativeBuildInputs = [ meson ninja which python ];

meta = with stdenv.lib; {
description = "KornShell Command And Programming Language";
longDescription = ''
The KornShell language was designed and developed by David G. Korn at
AT&T Bell Laboratories. It is an interactive command language that
provides access to the UNIX system and to many other systems, on the
many different computers and workstations on which it is implemented.
'';
homepage = https://github.com/att/ast;
license = licenses.cpl10;
maintainers = with maintainers; [ ];
platforms = platforms.all;
};

passthru = {
shellPath = "/bin/ksh";
};
}

4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6521,7 +6521,9 @@ in
fish-foreign-env = callPackage ../shells/fish/fish-foreign-env { };

ion = callPackage ../shells/ion { };


ksh = callPackage ../shells/ksh { };

mksh = callPackage ../shells/mksh { };

oh = callPackage ../shells/oh { };
Expand Down