nixpkgs/pkgs/applications/misc/styx/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2016-12-07 06:01:03 +00:00
{ stdenv, fetchFromGitHub, caddy, asciidoctor
, file, lessc, sass, multimarkdown }:
2016-10-07 05:08:24 +00:00
stdenv.mkDerivation rec {
name = "styx-${version}";
2016-12-07 06:01:03 +00:00
version = "0.4.0";
2016-10-07 05:08:24 +00:00
src = fetchFromGitHub {
owner = "styx-static";
repo = "styx";
rev = "v${version}";
2016-12-07 06:01:03 +00:00
sha256 = "1s4465absxqwlwhn5rf51h0s1rw25ls581yjg0fy9kbyhy979qvs";
2016-10-07 05:08:24 +00:00
};
2016-12-07 06:01:03 +00:00
setSourceRoot = "cd styx-*/src; export sourceRoot=`pwd`";
server = "${caddy.bin}/bin/caddy";
2016-10-07 05:08:24 +00:00
nativeBuildInputs = [ asciidoctor ];
2016-12-07 06:01:03 +00:00
propagatedBuildInputs = [
file
lessc
sass
asciidoctor
multimarkdown
];
2016-10-07 05:08:24 +00:00
installPhase = ''
mkdir $out
2016-11-03 03:58:53 +00:00
install -D -m 777 styx.sh $out/bin/styx
2016-10-07 05:08:24 +00:00
mkdir -p $out/share/styx
2016-11-03 03:58:53 +00:00
cp -r lib $out/share/styx
cp -r scaffold $out/share/styx
2016-12-07 06:01:03 +00:00
cp builder.nix $out/share/styx
2016-10-07 05:08:24 +00:00
mkdir -p $out/share/doc/styx
2016-11-03 03:58:53 +00:00
asciidoctor doc/manual.adoc -o $out/share/doc/styx/index.html
2016-10-07 05:08:24 +00:00
substituteAllInPlace $out/bin/styx
substituteAllInPlace $out/share/doc/styx/index.html
'';
meta = with stdenv.lib; {
description = "Nix based static site generator";
maintainers = with maintainers; [ ericsagnes ];
homepage = https://styx-static.github.io/styx-site/;
downloadPage = https://github.com/styx-static/styx/;
platforms = platforms.all;
license = licenses.mit;
};
}