summary refs log tree commit diff
path: root/pkgs/applications/misc/styx
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2017-08-26 13:46:32 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2017-08-26 13:46:32 +0900
commit833467ed963b63f1bd12c274518bfabecf554fda (patch)
treee42fa49ee88aa36e836d60b7e8e4fc810e2cae7f /pkgs/applications/misc/styx
parent1799e1464722fabbd0473cb9e836caa21e905e66 (diff)
downloadnixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar.gz
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar.bz2
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar.lz
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar.xz
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.tar.zst
nixlib-833467ed963b63f1bd12c274518bfabecf554fda.zip
styx: 0.6.0 -> 0.7.0
Diffstat (limited to 'pkgs/applications/misc/styx')
-rw-r--r--pkgs/applications/misc/styx/default.nix47
-rw-r--r--pkgs/applications/misc/styx/themes.nix104
2 files changed, 25 insertions, 126 deletions
diff --git a/pkgs/applications/misc/styx/default.nix b/pkgs/applications/misc/styx/default.nix
index 8e3b0e747ae1..2cdf047a10fc 100644
--- a/pkgs/applications/misc/styx/default.nix
+++ b/pkgs/applications/misc/styx/default.nix
@@ -4,22 +4,22 @@
 
 stdenv.mkDerivation rec {
   name    = "styx-${version}";
-  version = "0.6.0";
+  version = "0.7.0";
 
   src = fetchFromGitHub {
     owner  = "styx-static";
     repo   = "styx";
     rev    = "v${version}";
-    sha256 = "1dl6zmic8bv17f3ib8by66c2fj7izlnv9dh2cfa2m0ipkxk930vk";
+    sha256 = "044zpj92w96csaddf1qnnc2w2w9iq4b7rzlqqsqnd1s0a87lm1qd";
   };
 
-  setSourceRoot = "cd styx-*/src; export sourceRoot=`pwd`";
-
   server = "${caddy.bin}/bin/caddy";
   linkcheck = "${linkchecker}/bin/linkchecker";
 
   nativeBuildInputs = [ asciidoctor ];
 
+  outputs = [ "out" "lib" "themes" ];
+
   propagatedBuildInputs = [
     file
     lessc
@@ -30,39 +30,42 @@ stdenv.mkDerivation rec {
     (python27.withPackages (ps: [ ps.parsimonious ]))
   ];
 
-  outputs = [ "out" "lib" ];
-
   installPhase = ''
     mkdir $out
-    install -D -m 777 styx.sh $out/bin/styx
+    install -D -m 777 src/styx.sh $out/bin/styx
 
-    mkdir -p $out/share/styx
-    cp -r scaffold $out/share/styx
-    cp -r nix $out/share/styx
+    mkdir -p $out/share/styx-src
+    cp -r ./* $out/share/styx-src
 
     mkdir -p $out/share/doc/styx
-    asciidoctor doc/index.adoc       -o $out/share/doc/styx/index.html
-    asciidoctor doc/styx-themes.adoc -o $out/share/doc/styx/styx-themes.html
-    asciidoctor doc/library.adoc     -o $out/share/doc/styx/library.html
-    cp -r doc/highlight $out/share/doc/styx/
-    cp -r doc/imgs $out/share/doc/styx/
-    cp -r tools $out/share
+    asciidoctor src/doc/index.adoc       -o $out/share/doc/styx/index.html
+    asciidoctor src/doc/styx-themes.adoc -o $out/share/doc/styx/styx-themes.html
+    asciidoctor src/doc/library.adoc     -o $out/share/doc/styx/library.html
+    cp -r src/doc/highlight $out/share/doc/styx/
+    cp -r src/doc/imgs $out/share/doc/styx/
 
     substituteAllInPlace $out/bin/styx
     substituteAllInPlace $out/share/doc/styx/index.html
     substituteAllInPlace $out/share/doc/styx/styx-themes.html
     substituteAllInPlace $out/share/doc/styx/library.html
 
+    mkdir -p $out/share/styx/scaffold
+    cp -r src/scaffold $out/share/styx
+    cp -r src/tools $out/share/styx
+
     mkdir $lib
-    cp -r lib/* $lib
+    cp -r src/lib/* $lib
+
+    mkdir $themes
+    cp -r themes/* $themes
   '';
 
   meta = with stdenv.lib; {
-    description = "Nix based static site generator";
-    maintainers = with maintainers; [ ericsagnes ];
-    homepage = https://styx-static.github.io/styx-site/;
+    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;
+    platforms    = platforms.all;
+    license      = licenses.mit;
   };
 }
diff --git a/pkgs/applications/misc/styx/themes.nix b/pkgs/applications/misc/styx/themes.nix
deleted file mode 100644
index e0bea3b23b6b..000000000000
--- a/pkgs/applications/misc/styx/themes.nix
+++ /dev/null
@@ -1,104 +0,0 @@
-{ fetchFromGitHub, stdenv }:
-
-let
-
-  mkThemeDrv = args: stdenv.mkDerivation {
-    name = "styx-theme-${args.themeName}-${args.version}";
-
-    src = fetchFromGitHub ({
-      owner = "styx-static";
-      repo  = "styx-theme-${args.themeName}";
-    } // args.src);
-
-    installPhase = ''
-      mkdir $out
-      cp -r * $out/
-    '';
-
-    preferLocalBuild = true;
-
-    meta = with stdenv.lib; {
-      maintainer  = with maintainers; [ ericsagnes ];
-      description = "${args.themeName} theme for styx";
-      platforms   = platforms.all;
-    } // args.meta;
-  };
-
-in
-{
-  agency = mkThemeDrv rec {
-    themeName = "agency";
-    version   = "0.6.0";
-    src = {
-      rev    = "v${version}";
-      sha256 = "1i9bajzgmxd3ffvgic6wwnqijsgkfr2mfdijkgw9yf3bxcdq5cb6";
-    };
-    meta = {
-      license = stdenv.lib.licenses.asl20;
-      longDescription = ''
-        Agency Theme is a one page portfolio for companies and freelancers.
-        This theme features several content sections, a responsive portfolio
-        grid with hover effects, full page portfolio item modals, a timeline,
-        and a contact form.
-      '';
-    };
-  };
-
-  generic-templates = mkThemeDrv rec {
-    themeName = "generic-templates";
-    version   = "0.6.0";
-    src = {
-      rev    = "v${version}";
-      sha256 = "0wr2687pffczn0sns1xvqxr2gpf5v9j64zbj6q9f7km6bq0zpiiy";
-    };
-    meta = {
-      license = stdenv.lib.licenses.mit;
-    };
-  };
-
-  hyde = mkThemeDrv rec {
-    themeName = "hyde";
-    version   = "0.6.0";
-    src = {
-      rev    = "v${version}";
-      sha256 = "0yca76p297ymxd049fkcpw8bca5b9yvv36707z31jbijriy50zxb";
-    };
-    meta = {
-      license = stdenv.lib.licenses.mit;
-      longDescription = ''
-        Port of the Jekyll Hyde theme to styx; Hyde is a brazen two-column
-        Styx theme that pairs a prominent sidebar with uncomplicated content.
-      '';
-    };
-  };
-
-  orbit = mkThemeDrv rec {
-    themeName = "orbit";
-    version   = "0.6.0";
-    src = {
-      rev    = "v${version}";
-      sha256 = "0qdx1r7dcycr5hzl9ix70pl4xf0426ghpi1lgh61zdpdhcch0xfi";
-    };
-    meta = {
-      license = stdenv.lib.licenses.cc-by-30;
-      longDescription = ''
-        Orbit is a free resume/CV template designed for developers.
-      '';
-    };
-  };
-
-  showcase = mkThemeDrv rec {
-    themeName = "showcase";
-    version   = "0.6.0";
-    src = {
-      rev    = "v${version}";
-      sha256 = "1jfhw49yag8l1zr69l01y1p4p88waig3xv3b6c3mfxc8jrchp7pb";
-    };
-    meta = {
-      license = stdenv.lib.licenses.mit;
-      longDescription = ''
-        Theme that show most of styx functionalities with a basic design.
-      '';
-    };
-  };
-}