-
Notifications
You must be signed in to change notification settings - Fork 3
/
default.nix
41 lines (37 loc) · 897 Bytes
/
default.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
{
pkgs ? import (fetchTarball "https://hydra.flyingcircus.io/build/457353/download/1/nixexprs.tar.xz") {}
, revCount ? 0
, shortRev ? "0000000"
, gitTag ? ""
}:
let
sphinx-intl = pkgs.python3Packages.callPackage ./sphinx-intl.nix {};
buildEnv = pkgs.python3.withPackages (ps: with ps; [
linkify-it-py
myst-docutils
sphinx
sphinx-copybutton
sphinx-intl
sphinx_rtd_theme
furo
]);
version = "${toString revCount}.${shortRev}";
in pkgs.stdenv.mkDerivation {
name = "flyingcircus-docs";
configurePhase = ":";
buildInputs = [ buildEnv ] ++ (with pkgs; [ python3 git gnumake ]);
doCheck = false;
buildPhase = ''
make html
make html-de
'';
installPhase = ''
mkdir $out
mv _build/en/html $out/en
mv _build/de/html $out/de
'';
src = ./.;
dontStrip = true;
dontPatchELF = true;
inherit revCount shortRev gitTag version;
}