Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cc4925adae9a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b2a14ee339fa
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 20, 2017

  1. hunskell: add basque dictionary Xuxen 5

    mkDict doesn't easily adapt to dictionaries that have multiple source
    files but no readme, so I did not use it. Having a "generic" function
    that then has per-language quirks is a bad abstraction.
    
    A small utility function that copies a given file to hunspell's and
    myspell's dirs and a separate one that copies a given readme file would
    be more useful.
    Unai Zalakain committed May 20, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    ijjk JJ Kasper
    Copy the full SHA
    337687c View commit details
  2. Merge pull request #25944 from unaizalakain/init-xuxen

    hunskell: add basque dictionary Xuxen 5
    Mic92 authored May 20, 2017

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b2a14ee View commit details
Showing with 65 additions and 0 deletions.
  1. +65 −0 pkgs/development/libraries/hunspell/dictionaries.nix
65 changes: 65 additions & 0 deletions pkgs/development/libraries/hunspell/dictionaries.nix
Original file line number Diff line number Diff line change
@@ -92,6 +92,39 @@ let
};
};

mkDictFromXuxen =
{ shortName, srcs, shortDescription, longDescription, dictFileName }:
stdenv.mkDerivation rec {
name = "hunspell-dict-${shortName}-xuxen-${version}";
version = "5-2015.11.10";

inherit srcs;

phases = ["unpackPhase" "installPhase"];
sourceRoot = ".";
# Copy files stripping until first dash (path and hash)
unpackCmd = "cp $curSrc \${curSrc##*-}";
installPhase = ''
# hunspell dicts
install -dm755 "$out/share/hunspell"
install -m644 ${dictFileName}.dic "$out/share/hunspell/"
install -m644 ${dictFileName}.aff "$out/share/hunspell/"
# myspell dicts symlinks
install -dm755 "$out/share/myspell/dicts"
ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
'';

meta = with stdenv.lib; {
homepage = http://xuxen.eus/;
description = shortDescription;
longDescription = longDescription;
license = licenses.gpl2;
maintainers = with maintainers; [ zalakain ];
platforms = platforms.all;
};
};

in {

/* ENGLISH */
@@ -191,4 +224,36 @@ in {
sha256 = "0m9frz75fx456bczknay5i446gdcp1smm48lc0qfwzhz0j3zcdrd";
};
};

/* BASQUE */

eu-es = mkDictFromXuxen {
shortName = "eu-es";
dictFileName = "eu_ES";
shortDescription = "Basque (Xuxen 5)";
longDescription = ''
Itxura berritzeaz gain, testuak zuzentzen laguntzeko zenbait hobekuntza
egin dira Xuxen.eus-en. Lexikoari dagokionez, 18645 sarrera berri erantsi
ditugu, eta proposamenak egiteko sistema ere aldatu dugu. Esate baterako,
gaizki idatzitako hitz baten inguruko proposamenak eskuratzeko, euskaraz
idaztean egiten ditugun akats arruntenak hartu dira kontuan. Sistemak
ematen dituen proposamenak ordenatzeko, berriz, aipatutako irizpidea
erabiltzeaz gain, Internetetik automatikoki eskuratutako euskarazko corpus
bateko datuen arabera ordenatu daitezke emaitzak. Erabiltzaileak horrela
ordenatu nahi baditu proposamenak, hautatu egin behar du aukera hori
testu-kutxaren azpian dituen aukeren artean. Interesgarria da proposamenak
ordenatzeko irizpide hori, hala sistemak formarik erabilienak proposatuko
baitizkigu gutxiago erabiltzen direnen aurretik.
'';
srcs = [
(fetchurl {
url = "http://xuxen.eus/static/hunspell/eu_ES.aff";
sha256 = "12w2j6phzas2rdzc7f20jnk93sm59m2zzfdgxv6p8nvcvbrkmc02";
})
(fetchurl {
url = "http://xuxen.eus/static/hunspell/eu_ES.dic";
sha256 = "0lw193jr7ldvln5x5z9p21rz1by46h0say9whfcw2kxs9vprd5b3";
})
];
};
}