diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/hunspell | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/hunspell')
-rw-r--r-- | pkgs/development/libraries/hunspell/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/hunspell/dictionaries.nix | 119 | ||||
-rw-r--r-- | pkgs/development/libraries/hunspell/wrapper.nix | 2 |
3 files changed, 85 insertions, 42 deletions
diff --git a/pkgs/development/libraries/hunspell/default.nix b/pkgs/development/libraries/hunspell/default.nix index 20acc49bb83..fe4fc1e6d33 100644 --- a/pkgs/development/libraries/hunspell/default.nix +++ b/pkgs/development/libraries/hunspell/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, ncurses, readline, autoreconfHook }: +{ lib, stdenv, fetchurl, fetchpatch, ncurses, readline, autoreconfHook }: stdenv.mkDerivation rec { version = "1.7.0"; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://hunspell.sourceforge.net"; description = "Spell checker"; longDescription = '' @@ -58,6 +58,6 @@ stdenv.mkDerivation rec { ''; platforms = platforms.all; license = with licenses; [ gpl2 lgpl21 mpl11 ]; - maintainers = with stdenv.lib.maintainers; [ ]; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/libraries/hunspell/dictionaries.nix b/pkgs/development/libraries/hunspell/dictionaries.nix index 2cdc30109d9..596326b36df 100644 --- a/pkgs/development/libraries/hunspell/dictionaries.nix +++ b/pkgs/development/libraries/hunspell/dictionaries.nix @@ -1,14 +1,15 @@ /* hunspell dictionaries */ -{ stdenv, fetchurl, fetchFromGitHub, unzip, coreutils, bash, which, zip, ispell, perl, hunspell }: +{ lib, stdenv, fetchurl, fetchFromGitHub, unzip, coreutils, bash, which, zip, ispell, perl, hunspell }: let mkDict = - { name, readmeFile, dictFileName, ... }@args: + { pname, readmeFile, dictFileName, ... }@args: stdenv.mkDerivation ({ - inherit name; + inherit pname; installPhase = '' + runHook preInstall # hunspell dicts install -dm755 "$out/share/hunspell" install -m644 ${dictFileName}.dic "$out/share/hunspell/" @@ -19,7 +20,7 @@ let ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/" # docs install -dm755 "$out/share/doc" - install -m644 ${readmeFile} $out/share/doc/${name}.txt + install -m644 ${readmeFile} $out/share/doc/${pname}.txt runHook postInstall ''; } // args); @@ -29,7 +30,7 @@ let mkDict rec { inherit dictFileName; version = "2.2"; - name = "hunspell-dict-${shortName}-rla-${version}"; + pname = "hunspell-dict-${shortName}-rla"; readmeFile = "README.txt"; src = fetchFromGitHub { owner = "sbosio"; @@ -37,7 +38,7 @@ let rev = "v${version}"; sha256 = "0n9ms092k7vg7xpd3ksadxydbrizkb7js7dfxr08nbnnb9fgy0i8"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "Hunspell dictionary for ${shortDescription} from rla"; homepage = "https://github.com/sbosio/rla-es"; license = with licenses; [ gpl3 lgpl3 mpl11 ]; @@ -45,7 +46,8 @@ let platforms = platforms.all; }; phases = "unpackPhase patchPhase buildPhase installPhase"; - buildInputs = [ bash coreutils unzip which zip ]; + nativeBuildInputs = [ unzip ]; + buildInputs = [ bash coreutils which zip ]; patchPhase = '' substituteInPlace ortograf/herramientas/make_dict.sh \ --replace /bin/bash bash \ @@ -69,14 +71,14 @@ let version = "2.40"; # Should really use a string function or something _version = "2-40"; - name = "hunspell-dict-${shortName}-dsso-${version}"; + pname = "hunspell-dict-${shortName}-dsso"; _name = "ooo_swedish_dict_${_version}"; readmeFile = "LICENSE_en_US.txt"; src = fetchurl { url = "https://extensions.libreoffice.org/extensions/swedish-spelling-dictionary-den-stora-svenska-ordlistan/${version}/@@download/file/${_name}.oxt"; sha256 = "b982881cc75f5c4af1199535bd4735ee476bdc48edf63e3f05fb4f715654a7bc"; }; - meta = with stdenv.lib; { + meta = with lib; { longDescription = '' Svensk ordlista baserad på DSSO (den stora svenska ordlistan) och Göran Anderssons (goran@init.se) arbete med denna. Ordlistan hämtas från @@ -86,7 +88,7 @@ let license = licenses.lgpl3; platforms = platforms.all; }; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; phases = "unpackPhase installPhase"; sourceRoot = "."; unpackCmd = '' @@ -103,7 +105,7 @@ let ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/" # docs install -dm755 "$out/share/doc" - install -m644 ${readmeFile} $out/share/doc/${name}.txt + install -m644 ${readmeFile} $out/share/doc/${pname}.txt ''; }; @@ -112,13 +114,13 @@ let mkDict rec { inherit dictFileName; version = "5.3"; - name = "hunspell-dict-${shortName}-dicollecte-${version}"; + pname = "hunspell-dict-${shortName}-dicollecte"; readmeFile = "README_dict_fr.txt"; src = fetchurl { url = "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip"; sha256 = "0ca7084jm7zb1ikwzh1frvpb97jn27i7a5d48288h2qlfp068ik0"; }; - meta = with stdenv.lib; { + meta = with lib; { inherit longDescription; description = "Hunspell dictionary for ${shortDescription} from Dicollecte"; homepage = "https://www.dicollecte.org/home.php?prj=fr"; @@ -126,13 +128,13 @@ let maintainers = with maintainers; [ renzo ]; platforms = platforms.all; }; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; phases = "unpackPhase installPhase"; sourceRoot = "."; unpackCmd = '' unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile} ''; - postInstall = stdenv.lib.optionalString isDefault '' + postInstall = lib.optionalString isDefault '' for ext in aff dic; do ln -sv $out/share/hunspell/${dictFileName}.$ext $out/share/hunspell/fr_FR.$ext ln -sv $out/share/myspell/dicts/${dictFileName}.$ext $out/share/myspell/dicts/fr_FR.$ext @@ -145,17 +147,17 @@ let mkDict rec { inherit src srcFileName dictFileName; version = "2018.04.16"; - name = "hunspell-dict-${shortName}-wordlist-${version}"; + pname = "hunspell-dict-${shortName}-wordlist"; srcReadmeFile = "README_" + srcFileName + ".txt"; readmeFile = "README_" + dictFileName + ".txt"; - meta = with stdenv.lib; { + meta = with lib; { description = "Hunspell dictionary for ${shortDescription} from Wordlist"; homepage = "http://wordlist.aspell.net/"; license = licenses.bsd3; maintainers = with maintainers; [ renzo ]; platforms = platforms.all; }; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; phases = "unpackPhase installPhase"; sourceRoot = "."; unpackCmd = '' @@ -173,16 +175,16 @@ let mkDict rec { inherit src dictFileName; version = "2.4"; - name = "hunspell-dict-${shortName}-linguistico-${version}"; + pname = "hunspell-dict-${shortName}-linguistico"; readmeFile = dictFileName + "_README.txt"; - meta = with stdenv.lib; { + meta = with lib; { description = "Hunspell dictionary for ${shortDescription}"; homepage = "https://sourceforge.net/projects/linguistico/"; license = licenses.gpl3; maintainers = with maintainers; [ renzo ]; platforms = platforms.all; }; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; phases = "unpackPhase patchPhase installPhase"; sourceRoot = "."; prePatch = '' @@ -197,7 +199,7 @@ let mkDictFromXuxen = { shortName, srcs, shortDescription, longDescription, dictFileName }: stdenv.mkDerivation rec { - name = "hunspell-dict-${shortName}-xuxen-${version}"; + pname = "hunspell-dict-${shortName}-xuxen"; version = "5-2015.11.10"; inherit srcs; @@ -217,7 +219,7 @@ let ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/" ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://xuxen.eus/"; description = shortDescription; longDescription = longDescription; @@ -230,7 +232,7 @@ let mkDictFromJ3e = { shortName, shortDescription, dictFileName }: stdenv.mkDerivation rec { - name = "hunspell-dict-${shortName}-j3e-${version}"; + pname = "hunspell-dict-${shortName}-j3e"; version = "20161207"; src = fetchurl { @@ -254,7 +256,7 @@ let ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/" ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.j3e.de/ispell/igerman98/index_en.html"; description = shortDescription; license = with licenses; [ gpl2 gpl3 ]; @@ -271,7 +273,7 @@ let , readmeFile ? "README_${dictFileName}.txt" , sourceRoot ? dictFileName }: mkDict rec { - name = "hunspell-dict-${shortName}-libreoffice-${version}"; + pname = "hunspell-dict-${shortName}-libreoffice"; version = "6.3.0.4"; inherit dictFileName readmeFile; src = fetchFromGitHub { @@ -283,7 +285,7 @@ let buildPhase = '' cp -a ${sourceRoot}/* . ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://wiki.documentfoundation.org/Development/Dictionaries"; description = "Hunspell dictionary for ${shortDescription} from LibreOffice"; license = license; @@ -651,7 +653,7 @@ in rec { shortName = "hu-hu"; dictFileName = "hu_HU"; shortDescription = "Hungarian (Hungary)"; - license = with stdenv.lib.licenses; [ mpl20 lgpl3 ]; + license = with lib.licenses; [ mpl20 lgpl3 ]; }; /* SWEDISH */ @@ -698,7 +700,7 @@ in rec { uk_UA = uk-ua; uk-ua = mkDict rec { - name = "hunspell-dict-uk-ua-${version}"; + pname = "hunspell-dict-uk-ua"; version = "4.6.3"; _version = "4-6.3"; @@ -714,7 +716,7 @@ in rec { unzip $src ${dictFileName}/{${dictFileName}.dic,${dictFileName}.aff,${readmeFile}} ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Hunspell dictionary for Ukrainian (Ukraine) from LibreOffice"; homepage = "https://extensions.libreoffice.org/extensions/ukrainian-spelling-dictionary-and-thesaurus/"; license = licenses.mpl20; @@ -730,7 +732,7 @@ in rec { shortName = "ru-ru"; dictFileName = "ru_RU"; shortDescription = "Russian (Russian)"; - license = with stdenv.lib.licenses; [ mpl20 lgpl3 ]; + license = with lib.licenses; [ mpl20 lgpl3 ]; }; /* CZECH */ @@ -741,7 +743,7 @@ in rec { dictFileName = "cs_CZ"; shortDescription = "Czech (Czechia)"; readmeFile = "README_cs.txt"; - license = with stdenv.lib.licenses; [ gpl2 ]; + license = with lib.licenses; [ gpl2 ]; }; /* SLOVAK */ @@ -752,19 +754,19 @@ in rec { dictFileName = "sk_SK"; shortDescription = "Slovak (Slovakia)"; readmeFile = "README_sk.txt"; - license = with stdenv.lib.licenses; [ gpl2 lgpl21 mpl11 ]; + license = with lib.licenses; [ gpl2 lgpl21 mpl11 ]; }; /* DANISH */ da_DK = da-dk; da-dk = mkDict rec { - name = "hunspell-dict-da-dk-${version}"; - version = "2.5.137"; + pname = "hunspell-dict-da-dk"; + version = "2.5.189"; src = fetchurl { url = "https://stavekontrolden.dk/dictionaries/da_DK/da_DK-${version}.oxt"; - sha256 = "16y0smkg1mq0133r1fbw5ak6s2xw39281knk5ivhanakayq789qx"; + sha256 = "sha256:0i1cw0nfg24b0sg2yc3q7315ng5vc5245nvh0l1cndkn2c9z4978"; }; shortName = "da-dk"; @@ -776,11 +778,52 @@ in rec { unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile} -d ${dictFileName} ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Hunspell dictionary for Danish (Denmark) from Stavekontrolden"; homepage = "https://github.com/jeppebundsgaard/stavekontrolden"; - license = with stdenv.lib.licenses; [ gpl2Only lgpl21Only mpl11 ]; + license = with lib.licenses; [ gpl2Only lgpl21Only mpl11 ]; maintainers = with maintainers; [ louisdk1 ]; }; }; + + /* DUTCH */ + + nl_NL = nl_nl; + nl_nl = mkDict rec { + pname = "hunspell-dict-nl-nl"; + version = "2.20.19"; + + src = fetchFromGitHub { + owner = "OpenTaal"; + repo = "opentaal-hunspell"; + rev = version; + sha256 = "0jma8mmrncyzd77kxliyngs4z6z4769g3nh0a7xn2pd4s5y2xdpy"; + }; + + preInstall = '' + mv nl.aff nl_NL.aff + mv nl.dic nl_NL.dic + ''; + + dictFileName = "nl_NL"; + readmeFile = "README.md"; + + meta = with lib; { + description = "Hunspell dictionary for Dutch (Netherlands) from OpenTaal"; + homepage = "https://www.opentaal.org/"; + license = with licenses; [ bsd3 cc-by-nc-30 ]; + maintainers = with maintainers; [ artturin ]; + }; + }; + + /* HEBREW */ + + he_IL = he-il; + he-il = mkDictFromLibreOffice { + shortName = "he-il"; + dictFileName = "he_IL"; + shortDescription = "Hebrew (Israel)"; + readmeFile = "README_he_IL.txt"; + license = with lib.licenses; [ agpl3Plus ]; + }; } diff --git a/pkgs/development/libraries/hunspell/wrapper.nix b/pkgs/development/libraries/hunspell/wrapper.nix index 34c3d26c55e..4ae17723275 100644 --- a/pkgs/development/libraries/hunspell/wrapper.nix +++ b/pkgs/development/libraries/hunspell/wrapper.nix @@ -5,7 +5,7 @@ let in stdenv.mkDerivation { name = (appendToName "with-dicts" hunspell).name; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; buildCommand = '' makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${searchPath} ''; |