forked from darktable-org/dtdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
57 lines (55 loc) · 1.78 KB
/
flake.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
description = "An environment for developing darktable's documentation";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
};
outputs = { self, nixpkgs }: {
devShell.x86_64-linux =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
pkgs.mkShell {
packages = with pkgs; [
hugo
yarn
rsync
gitFull
perlPackages.Po4a
python311Packages.weasyprint
lychee
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
}
check-links() {
cd $PROJECTDIR/content && lychee . && 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 {} \;
}
'';
};
};
}