forked from darktable-org/dtdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
42 lines (41 loc) · 1.39 KB
/
shell.nix
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
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/8b3398bc7587ebb79f93dfeea1b8c574d3c6dba1.tar.gz") {}
}:
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = [
pkgs.hugo
pkgs.yarn
pkgs.rsync
pkgs.gitFull
pkgs.perlPackages.Po4a
pkgs.python38Packages.weasyprint
pkgs.linkchecker
pkgs.zip
];
shellHook = ''
PROJECTDIR=`pwd`
hugo-deploy() {
echo "This doesn't do anything, but maybe it will one day."
}
update-assets() {
cd $PROJECTDIR && cd themes/hugo-darktable-docs-theme/assets && yarn install && cd $PROJECTDIR
}
generate-po() {
cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --no-translations && cd $PROJECTDIR
}
generate-translated-files() {
cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --no-update && cd $PROJECTDIR
}
remove-translated-files() {
# cd $PROJECTDIR && cd tools/ && ./generate-translations.sh --rm-translations && cd $PROJECTDIR # This is really slow
cd $PROJECTDIR
find . -name '*.de.md' -exec rm {} \;
find . -name '*.es.md' -exec rm {} \;
find . -name '*.fr.md' -exec rm {} \;
find . -name '*.nl.md' -exec rm {} \;
find . -name '*.pl.md' -exec rm {} \;
find . -name '*.pt_br.md' -exec rm {} \;
find . -name '*.uk.md' -exec rm {} \;
}
'';
}