From b34b05b3b8ca274da28184371382d683100a806c Mon Sep 17 00:00:00 2001 From: Simon Vandel Sillesen Date: Mon, 1 Feb 2016 18:44:20 +0100 Subject: [PATCH] Hunspell: add wrapper to include dictionaries use like this: (hunspellWithDicts (with hunspellDicts; [en-us en-gb-ise])) --- pkgs/development/libraries/hunspell/wrapper.nix | 13 +++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/development/libraries/hunspell/wrapper.nix diff --git a/pkgs/development/libraries/hunspell/wrapper.nix b/pkgs/development/libraries/hunspell/wrapper.nix new file mode 100644 index 00000000000..88f18e6283d --- /dev/null +++ b/pkgs/development/libraries/hunspell/wrapper.nix @@ -0,0 +1,13 @@ +{ stdenv, lib, hunspell, makeWrapper, dicts ? [] }: +with lib; +let + searchPath = makeSearchPath "share/hunspell" dicts; +in +stdenv.mkDerivation { + name = (appendToName "with-dicts" hunspell).name; + buildInputs = [ makeWrapper ]; + buildCommand = '' + makeWrapper ${hunspell}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${searchPath} + ''; + inherit (hunspell) meta; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92fd1d49a66..962283f7132 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6856,6 +6856,8 @@ let hunspellDicts = recurseIntoAttrs (callPackages ../development/libraries/hunspell/dictionaries.nix {}); + hunspellWithDicts = dicts: callPackage ../development/libraries/hunspell/wrapper.nix { inherit dicts; }; + hwloc = callPackage ../development/libraries/hwloc {}; hydraAntLogger = callPackage ../development/libraries/java/hydra-ant-logger { };