about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/aspell
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-08 17:57:14 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 11:31:47 +0000
commitee7984efa14902a2ddd820c937457667a4f40c6a (patch)
treec9c1d046733cefe5e21fdd8a52104175d47b2443 /nixpkgs/pkgs/development/libraries/aspell
parentffc9d4ba381da62fd08b361bacd1e71e2a3d934d (diff)
parentb3c692172e5b5241b028a98e1977f9fb12eeaf42 (diff)
downloadnixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.gz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.bz2
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.lz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.xz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.zst
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.zip
Merge commit 'b3c692172e5b5241b028a98e1977f9fb12eeaf42'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aspell')
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/default.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix10
2 files changed, 16 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aspell/default.nix b/nixpkgs/pkgs/development/libraries/aspell/default.nix
index 01acced98f6f..777bad1e5a53 100644
--- a/nixpkgs/pkgs/development/libraries/aspell/default.nix
+++ b/nixpkgs/pkgs/development/libraries/aspell/default.nix
@@ -23,7 +23,14 @@ stdenv.mkDerivation rec {
     sha256 = "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr";
   };
 
-  patches = lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
+  patches = [
+    (fetchpatch {
+      #  objstack: assert that the alloc size will fit within a chunk
+      name = "CVE-2019-25051.patch";
+      url = "https://github.com/gnuaspell/aspell/commit/0718b375425aad8e54e1150313b862e4c6fd324a.patch";
+      sha256 = "03z259xrk41x3j190gaprf3mqysyfgh3a04rjmch3h625vj95x39";
+    })
+  ] ++ lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
 
   postPatch = ''
     patch interfaces/cc/aspell.h < ${./clang.patch}
diff --git a/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix
index 3923416c4a35..81f4bb6c2dce 100644
--- a/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix
+++ b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix
@@ -153,7 +153,7 @@ let
         }
       '';
 
-      phases = [ "preBuild" "buildPhase" "installPhase" ];
+      dontUnpack = true;
     } // args);
 
 in rec {
@@ -905,7 +905,11 @@ in rec {
 
     langInputs = [ en ];
 
-    buildPhase = "cat $src | aspell-affix en-computers --dont-validate-words --lang=en";
+    buildPhase = ''
+      runHook preBuild
+      cat $src | aspell-affix en-computers --dont-validate-words --lang=en
+      runHook postBuild
+    '';
     installPhase = "aspell-install en-computers";
 
     meta = {
@@ -930,8 +934,10 @@ in rec {
     langInputs = [ en ];
 
     buildPhase = ''
+      runHook preBuild
       cat $src1 | aspell-plain en_US-science --dont-validate-words --lang=en
       cat $src2 | aspell-plain en_GB-science --dont-validate-words --lang=en
+      runHook postBuild
     '';
     installPhase = "aspell-install en_US-science en_GB-science";