about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-07-17 13:52:01 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2017-07-17 13:52:01 +0200
commit3eceecb90db691f22e46eb892bd7800f953d605e (patch)
treed7dae792d8f7a6f9eea7d8164e9849ab232d1d7d /pkgs/development/libraries
parent8e98811f76fa29e8a3782e9b0b0acc6d16926cac (diff)
parent8669fb1f96cfd68ed68d9d76ff1f0237d4d96748 (diff)
downloadnixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar.gz
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar.bz2
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar.lz
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar.xz
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.tar.zst
nixlib-3eceecb90db691f22e46eb892bd7800f953d605e.zip
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/aspell/aspell-with-dicts.nix35
-rw-r--r--pkgs/development/libraries/exiv2/default.nix6
-rw-r--r--pkgs/development/libraries/hunspell/dictionaries.nix219
-rw-r--r--pkgs/development/libraries/science/biology/elastix/default.nix29
4 files changed, 262 insertions, 27 deletions
diff --git a/pkgs/development/libraries/aspell/aspell-with-dicts.nix b/pkgs/development/libraries/aspell/aspell-with-dicts.nix
new file mode 100644
index 000000000000..eb96070f4fd7
--- /dev/null
+++ b/pkgs/development/libraries/aspell/aspell-with-dicts.nix
@@ -0,0 +1,35 @@
+# Create a derivation that contains aspell and selected dictionaries.
+# Composition is done using `pkgs.buildEnv`.
+
+{ aspell
+, aspellDicts
+, makeWrapper
+, symlinkJoin
+, runCommand
+}:
+
+f:
+
+let
+  # Dictionaries we want
+  dicts = f aspellDicts;
+
+  # A tree containing the dictionaries
+  dictEnv = symlinkJoin {
+    name = "aspell-dicts";
+    paths = dicts;
+  };
+
+in runCommand "aspell-env" {
+  buildInputs = [ makeWrapper ];
+} ''
+  # Construct wrappers in /bin
+  mkdir -p $out/bin
+  pushd "${aspell}/bin"
+  for prg in *; do
+    if [ -f "$prg" ]; then
+      makeWrapper "${aspell}/bin/$prg" "$out/bin/$prg" --set ASPELL_CONF "data-dir ${dictEnv}/lib/aspell"
+    fi
+  done
+  popd
+''
diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix
index a11be14df109..a1a07b43197f 100644
--- a/pkgs/development/libraries/exiv2/default.nix
+++ b/pkgs/development/libraries/exiv2/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, fetchpatch, zlib, expat, gettext }:
 
 stdenv.mkDerivation rec {
-  name = "exiv2-0.25";
+  name = "exiv2-0.26";
 
   src = fetchurl {
-    url = "http://www.exiv2.org/${name}.tar.gz";
-    sha256 = "197g6vgcpyf9p2cwn5p5hb1r714xsk1v4p96f5pv1z8mi9vzq2y8";
+    url = "http://www.exiv2.org/builds/${name}-trunk.tar.gz";
+    sha256 = "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7";
   };
   postPatch = "patchShebangs ./src/svn_version.sh";
 
diff --git a/pkgs/development/libraries/hunspell/dictionaries.nix b/pkgs/development/libraries/hunspell/dictionaries.nix
index 0d21649a9b1f..120b4176c196 100644
--- a/pkgs/development/libraries/hunspell/dictionaries.nix
+++ b/pkgs/development/libraries/hunspell/dictionaries.nix
@@ -1,30 +1,13 @@
 /* hunspell dictionaries */
 
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchurl, fetchFromGitHub, unzip, coreutils, bash, which, zip }:
 
-with stdenv.lib;
 
 let
-
   mkDict =
-  { name, src, meta, readmeFile, dictFileName, ... }:
-  let
-    isFrench = hasSuffix "fr_" dictFileName;
-    isItaly = hasSuffix "it_" dictFileName;
-    isSpanish = hasSuffix "es_" dictFileName;
-    isEnglish = hasSuffix "en_" dictFileName;
-  in
-  stdenv.mkDerivation rec {
-    inherit name src meta;
-    buildInputs = [ unzip ];
-    sourceRoot = ".";
-    phases = "unpackPhase installPhase" + (if isItaly then "patchPhase" else "");
-    unpackCmd = "unzip $src ${readmeFile} ${dictFileName}.dic ${dictFileName}.aff";
-    prePatch = if isItaly then ''
-    # Fix dic file empty lines (FS#22275)
-    sed '/^\/$/d' -i it_IT.dic
-    '' else "";
-
+  { name, readmeFile, dictFileName, ... }@args:
+  stdenv.mkDerivation (rec {
+    inherit name;
     installPhase = ''
       # hunspell dicts
       install -dm755 "$out/share/hunspell"
@@ -38,7 +21,45 @@ let
       install -dm755 "$out/share/doc"
       install -m644 ${readmeFile} $out/share/doc/${name}.txt
     '';
-  };
+  } // args);
+
+  mkDictFromRla =
+    { shortName, shortDescription, dictFileName }:
+    mkDict rec {
+      inherit dictFileName;
+      version = "2.2";
+      name = "hunspell-dict-${shortName}-rla-${version}";
+      readmeFile = "README.txt";
+      src = fetchFromGitHub {
+        owner = "sbosio";
+        repo = "rla-es";
+        rev = "v${version}";
+        sha256 = "0n9ms092k7vg7xpd3ksadxydbrizkb7js7dfxr08nbnnb9fgy0i8";
+      };
+      meta = with stdenv.lib; {
+        description = "Hunspell dictionary for ${shortDescription} from rla";
+        homepage = https://github.com/sbosio/rla-es;
+        license = with licenses; [ gpl3 lgpl3 mpl11 ];
+        maintainers = with maintainers; [ renzo ];
+        platforms = platforms.all;
+      };
+      phases = "unpackPhase patchPhase buildPhase installPhase";
+      buildInputs = [ bash coreutils unzip which zip ];
+      patchPhase = ''
+        substituteInPlace ortograf/herramientas/make_dict.sh \
+           --replace /bin/bash bash \
+           --replace /dev/stderr stderr.log
+
+        substituteInPlace ortograf/herramientas/remover_comentarios.sh \
+           --replace /bin/bash bash \
+      '';
+      buildPhase = ''
+        cd ortograf/herramientas
+        bash -x ./make_dict.sh -l ${dictFileName} -2
+        unzip ${dictFileName}.zip \
+          ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
+    };
 
   mkDictFromDicollecte =
     { shortName, shortDescription, longDescription, dictFileName }:
@@ -59,6 +80,12 @@ let
         maintainers = with maintainers; [ renzo ];
         platforms = platforms.all;
       };
+      buildInputs = [ unzip ];
+      phases = "unpackPhase installPhase";
+      sourceRoot = ".";
+      unpackCmd = ''
+        unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
     };
 
   mkDictFromWordlist =
@@ -75,9 +102,15 @@ let
         maintainers = with maintainers; [ renzo ];
         platforms = platforms.all;
       };
+      buildInputs = [ unzip ];
+      phases = "unpackPhase installPhase";
+      sourceRoot = ".";
+      unpackCmd = ''
+        unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
     };
 
-  mkLinguistico =
+  mkDictFromLinguistico =
     { shortName, shortDescription, dictFileName, src }:
     mkDict rec {
       inherit src dictFileName;
@@ -90,6 +123,16 @@ let
         maintainers = with maintainers; [ renzo ];
         platforms = platforms.all;
       };
+      buildInputs = [ unzip ];
+      phases = "unpackPhase patchPhase installPhase";
+      sourceRoot = ".";
+      prePatch = ''
+        # Fix dic file empty lines (FS#22275)
+        sed '/^\/$/d' -i ${dictFileName}.dic
+      '';
+      unpackCmd = ''
+        unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
     };
 
   mkDictFromXuxen =
@@ -169,6 +212,134 @@ in {
     };
   };
 
+  /* SPANISH */
+
+  es-any = mkDictFromRla {
+    shortName = "es-any";
+    shortDescription = "Spanish (any variant)";
+    dictFileName = "es_ANY";
+  };
+
+  es-ar = mkDictFromRla {
+    shortName = "es-ar";
+    shortDescription = "Spanish (Argentina)";
+    dictFileName = "es_AR";
+  };
+
+  es-bo = mkDictFromRla {
+    shortName = "es-bo";
+    shortDescription = "Spanish (Bolivia)";
+    dictFileName = "es_BO";
+  };
+
+  es-cl = mkDictFromRla {
+    shortName = "es-cl";
+    shortDescription = "Spanish (Chile)";
+    dictFileName = "es_CL";
+  };
+
+  es-co = mkDictFromRla {
+    shortName = "es-co";
+    shortDescription = "Spanish (Colombia)";
+    dictFileName = "es_CO";
+  };
+
+  es-cr = mkDictFromRla {
+    shortName = "es-cr";
+    shortDescription = "Spanish (Costra Rica)";
+    dictFileName = "es_CR";
+  };
+
+  es-cu = mkDictFromRla {
+    shortName = "es-cu";
+    shortDescription = "Spanish (Cuba)";
+    dictFileName = "es_CU";
+  };
+
+  es-do = mkDictFromRla {
+    shortName = "es-do";
+    shortDescription = "Spanish (Dominican Republic)";
+    dictFileName = "es_DO";
+  };
+
+  es-ec = mkDictFromRla {
+    shortName = "es-ec";
+    shortDescription = "Spanish (Ecuador)";
+    dictFileName = "es_EC";
+  };
+
+  es-es = mkDictFromRla {
+    shortName = "es-es";
+    shortDescription = "Spanish (Spain)";
+    dictFileName = "es_ES";
+  };
+
+  es-gt = mkDictFromRla {
+    shortName = "es-gt";
+    shortDescription = "Spanish (Guatemala)";
+    dictFileName = "es_GT";
+  };
+
+  es-hn = mkDictFromRla {
+    shortName = "es-hn";
+    shortDescription = "Spanish (Honduras)";
+    dictFileName = "es_HN";
+  };
+
+  es-mx = mkDictFromRla {
+    shortName = "es-mx";
+    shortDescription = "Spanish (Mexico)";
+    dictFileName = "es_MX";
+  };
+
+  es-ni = mkDictFromRla {
+    shortName = "es-ni";
+    shortDescription = "Spanish (Nicaragua)";
+    dictFileName = "es_NI";
+  };
+
+  es-pa = mkDictFromRla {
+    shortName = "es-pa";
+    shortDescription = "Spanish (Panama)";
+    dictFileName = "es_PA";
+  };
+
+  es-pe = mkDictFromRla {
+    shortName = "es-pe";
+    shortDescription = "Spanish (Peru)";
+    dictFileName = "es_PE";
+  };
+
+  es-pr = mkDictFromRla {
+    shortName = "es-pr";
+    shortDescription = "Spanish (Puerto Rico)";
+    dictFileName = "es_PR";
+  };
+
+  es-py = mkDictFromRla {
+    shortName = "es-py";
+    shortDescription = "Spanish (Paraguay)";
+    dictFileName = "es_PY";
+  };
+
+  es-sv = mkDictFromRla {
+    shortName = "es-sv";
+    shortDescription = "Spanish (El Salvador)";
+    dictFileName = "es_SV";
+  };
+
+  es-uy = mkDictFromRla {
+    shortName = "es-uy";
+    shortDescription = "Spanish (Uruguay)";
+    dictFileName = "es_UY";
+  };
+
+  es-ve = mkDictFromRla {
+    shortName = "es-ve";
+    shortDescription = "Spanish (Venezuela)";
+    dictFileName = "es_VE";
+  };
+
   /* FRENCH */
 
   fr-any = mkDictFromDicollecte {
@@ -215,7 +386,7 @@ in {
 
   /* ITALIAN */
 
-  it-it =  mkLinguistico rec {
+  it-it =  mkDictFromLinguistico rec {
     shortName = "it-it";
     dictFileName = "it_IT";
     shortDescription = "Hunspell dictionary for 'Italian (Italy)' from Linguistico";
diff --git a/pkgs/development/libraries/science/biology/elastix/default.nix b/pkgs/development/libraries/science/biology/elastix/default.nix
new file mode 100644
index 000000000000..55647713e6ee
--- /dev/null
+++ b/pkgs/development/libraries/science/biology/elastix/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, cmake, itk, python }:
+
+stdenv.mkDerivation rec {
+  _name    = "elastix";
+  _version = "4.8";
+  name  = "${_name}-${_version}";
+
+  src = fetchFromGitHub {
+    owner  = "SuperElastix";
+    repo   = "elastix";
+    rev    = "ef057ff89233822b26b04b31c3c043af57d5deff";
+    sha256 = "0gm3a8dgqww50h6zld9ighjk92wlpybpimjwfz4s5h82vdjsvxrm";
+  };
+
+  nativeBuildInputs = [ cmake python ];
+  buildInputs = [ itk ];
+
+  cmakeFlags = [ "-DUSE_KNNGraphAlphaMutualInformationMetric=OFF" ];
+
+  checkPhase = "ctest";
+
+  meta = with stdenv.lib; {
+    homepage = http://elastix.isi.uu.nl/;
+    description = "Image registration toolkit based on ITK";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.asl20;
+  };
+}