git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #68146 from averelld/rstudio-build-fix

rstudio: fix build with new hunspell-dicts

commitf024caa7a8f274a16048e71c30e1bac9e75c0ab4 authorLinus Heckemann <git@sphalerite.org> dateTue 10 Sep 2019, 14:04 (7 years ago) parent8668af2cd9aec6
1 file changed+9−2
pkgs/applications/editors/rstudio/default.nix+9−2
pkgs/applications/editors/rstudio/default.nix+9−2
@@ -4,6 +4,7 @@
44, llvmPackages
55}:
66
7+with stdenv.lib;
78let
89 verMajor = "1";
910 verMinor = "2";
@@ -47,7 +48,13 @@ stdenv.mkDerivation rec {
4748 sha256 = "19x000m3jwnkqgi6ic81lkzyjvvxcfacw2j0vcfcaknvvagzhyhb";
4849 };
4950
50− hunspellDictionaries = with stdenv.lib; filter isDerivation (unique (attrValues hunspellDicts));
51+ hunspellDictionaries = filter isDerivation (unique (attrValues hunspellDicts));
52+ # These dicts contain identically-named dict files, so we only keep the
53+ # -large versions in case of clashes
54+ largeDicts = filter (d: hasInfix "-large-wordlist" d) hunspellDictionaries;
55+ otherDicts = filter (d: !(hasAttr "dictFileName" d &&
56+ elem d.dictFileName (map (d: d.dictFileName) largeDicts))) hunspellDictionaries;
57+ dictionaries = largeDicts ++ otherDicts;
5158
5259 mathJaxSrc = fetchurl {
5360 url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-26.zip;
@@ -77,7 +84,7 @@ stdenv.mkDerivation rec {
7784 mv gwt-${gwtVer} $GWT_LIB_DIR/gwt/${gwtVer}
7885
7986 mkdir dependencies/common/dictionaries
80− for dict in ${builtins.concatStringsSep " " hunspellDictionaries}; do
87+ for dict in ${builtins.concatStringsSep " " dictionaries}; do
8188 for i in "$dict/share/hunspell/"*; do
8289 ln -sv $i dependencies/common/dictionaries/
8390 done