-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.nix
More file actions
94 lines (89 loc) · 2.5 KB
/
doc.nix
File metadata and controls
94 lines (89 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ config, pkgs, ... }:
{
documentation = {
dev = {
enable = true;
};
man = {
generateCaches = true;
};
};
environment.systemPackages = with pkgs; [
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.nl
biber
evince
ghostscript
hunspell-personal
libreoffice
okular
pdftk
sc-im
visidata
xournal
zathura
];
services.dictd = {
enable = true;
DBs = with pkgs.dictdDBs; [
deu2eng
eng2deu
nld2eng
eng2nld
wordnet
wiktionary
];
};
nixpkgs.overlays = [
(final: prev: rec {
hunspell-personal =
with prev;
let
personal-langs = with hunspellDicts; [
de_DE
en_US-large
(stdenv.mkDerivation rec {
pname = "hunspell-dict-nl-opentaal";
version = "2.20.19";
src = fetchFromGitHub {
owner = "OpenTaal";
repo = "opentaal-hunspell";
rev = "${version}";
sha256 = "sha256-/rYufNGkXWH7UQDa8ZI55JtP9LM+0j7Pad8zm2tFqko=";
};
meta = {
description = "Dutch dictionary for spelling checker Hunspell and Nuspell";
homepage = "https://github.com/OpenTaal/opentaal-hunspell";
license = {
fullName = "Revised BSD License and/or CC BY 3.0";
url = "https://github.com/OpenTaal/opentaal-hunspell/blob/${version}/LICENSE.txt";
};
maintainers = with maintainers; [ ];
platforms = lib.platforms.all;
};
dictFileName = "nl";
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/"
runHook postInstall
'';
})
];
in
(hunspellWithDicts personal-langs).overrideAttrs (old: {
buildCommand = ''
${old.buildCommand}
cp -r ${hunspell.man}/share $out/share
'';
});
})
];
}