biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / misc / styx / default.nix
blob96278fd9c3222f5dadfc21bbc39fe8927797f680
1 { lib, stdenv, fetchFromGitHub, caddy, asciidoctor
2 , file, lessc, sass, multimarkdown, linkchecker
3 , perlPackages, python3Packages }:
5 stdenv.mkDerivation rec {
6   pname = "styx";
7   version = "0.7.5";
9   src = fetchFromGitHub {
10     owner  = "styx-static";
11     repo   = "styx";
12     rev    = "v${version}";
13     hash = "sha256-f6iA/nHpKnm3BALoQq8SzdcSzJLCFSferEf69SpgD2Y=";
14   };
16   server = "${caddy}/bin/caddy";
17   linkcheck = "${linkchecker}/bin/linkchecker";
19   nativeBuildInputs = [ asciidoctor ];
21   outputs = [ "out" "lib" "themes" ];
23   propagatedBuildInputs = [
24     file
25     lessc
26     sass
27     asciidoctor
28     multimarkdown
29     perlPackages.ImageExifTool
30     python3Packages.parsimonious
31   ];
33   installPhase = ''
34     mkdir $out
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
56     mkdir $lib
57     cp -r src/lib/* $lib
59     mkdir $themes
60     cp -r themes/* $themes
61   '';
63   meta = with lib; {
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;
70     mainProgram  = "styx";
71   };