1 { lib, stdenv, fetchFromGitHub, caddy, asciidoctor
2 , file, lessc, sass, multimarkdown, linkchecker
3 , perlPackages, python3Packages }:
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
10 owner = "styx-static";
13 hash = "sha256-f6iA/nHpKnm3BALoQq8SzdcSzJLCFSferEf69SpgD2Y=";
16 server = "${caddy}/bin/caddy";
17 linkcheck = "${linkchecker}/bin/linkchecker";
19 nativeBuildInputs = [ asciidoctor ];
21 outputs = [ "out" "lib" "themes" ];
23 propagatedBuildInputs = [
29 perlPackages.ImageExifTool
30 python3Packages.parsimonious
35 install -D -m 777 src/styx.sh $out/bin/styx
37 mkdir -p $out/share/styx-src
38 cp -r ./* $out/share/styx-src
40 mkdir -p $out/share/doc/styx
41 asciidoctor src/doc/index.adoc -o $out/share/doc/styx/index.html
42 asciidoctor src/doc/styx-themes.adoc -o $out/share/doc/styx/styx-themes.html
43 asciidoctor src/doc/library.adoc -o $out/share/doc/styx/library.html
44 cp -r src/doc/highlight $out/share/doc/styx/
45 cp -r src/doc/imgs $out/share/doc/styx/
47 substituteAllInPlace $out/bin/styx
48 substituteAllInPlace $out/share/doc/styx/index.html
49 substituteAllInPlace $out/share/doc/styx/styx-themes.html
50 substituteAllInPlace $out/share/doc/styx/library.html
52 mkdir -p $out/share/styx/scaffold
53 cp -r src/scaffold $out/share/styx
54 cp -r src/tools $out/share/styx
60 cp -r themes/* $themes
64 description = "Nix based static site generator";
65 maintainers = with maintainers; [ ericsagnes ];
66 homepage = "https://styx-static.github.io/styx-site/";
67 downloadPage = "https://github.com/styx-static/styx/";
68 platforms = platforms.all;
69 license = licenses.mit;