summary refs log tree commit diff
path: root/pkgs/tools/typesetting/asciidoc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/typesetting/asciidoc/default.nix')
-rw-r--r--pkgs/tools/typesetting/asciidoc/default.nix43
1 files changed, 8 insertions, 35 deletions
diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix
index 8ab1ba98e430e..1eb56c76991fe 100644
--- a/pkgs/tools/typesetting/asciidoc/default.nix
+++ b/pkgs/tools/typesetting/asciidoc/default.nix
@@ -1,47 +1,20 @@
-{ fetchurl, stdenv, python, bash }:
+{ fetchurl, stdenv, python }:
 
 stdenv.mkDerivation rec {
-  name = "asciidoc-8.2.5";
+  name = "asciidoc-8.5.1";
   src = fetchurl {
     url = "mirror://sourceforge/asciidoc/${name}.tar.gz";
-    sha256 = "1aqmii7qyhnn8pby5rlyrc3sl08br35xsdn7wpx2cy03p46pqr7a";
+    sha256 = "ccb02db04e6e6eff2149435516e88557ca30c85bc4467420f40c895e25f17a20";
   };
 
   patchPhase = ''
-    cat "asciidoc.py" | \
-      sed -e "s,^#!/usr/bin/env python,#!${python}/bin/python,g ;
-              s,^CONF_DIR = .*$,CONF_DIR = \"$out/etc/asciidoc\",g" \
-      > ,,tmp && mv ,,tmp asciidoc.py && chmod +x asciidoc.py
-    cat "a2x" | \
-      sed -e "s,^#!/usr/bin/env bash,#!${bash},g ;
-              s,^CONF_DIR=.*$,CONF_DIR=\"$out/etc/asciidoc\",g" \
-      > ,,tmp && mv ,,tmp a2x && chmod +x a2x
-
-    cat "install.sh" | \
-      sed -e "s,^CONFDIR=.*,CONFDIR=$out/etc/asciidoc,g" \
-      > ,,tmp && mv ,,tmp install.sh
-    cat "install.sh" | \
-      sed -e "s,^BINDIR=.*,BINDIR=$out/bin,g" \
-      > ,,tmp && mv ,,tmp install.sh
-    cat "install.sh" | \
-      sed -e "s,^MANDIR=.*,MANDIR=$out/man,g" \
-      > ,,tmp && mv ,,tmp install.sh
-    cat "install.sh" | \
-      sed -e "s,^VIM_CONFDIR=.*,VIM_CONFDIR=$out/etc/vim,g" \
-      > ,,tmp && mv ,,tmp install.sh
-
-    chmod +x install.sh
+    for n in asciidoc.py a2x.py; do
+      sed -i -e "s,^#!/usr/bin/env python,#!${python}/bin/python,g" "$n"
+      chmod +x "$n"
+    done
   '';
 
   buildInputs = [ python ];
-  configurePhase = ''true'';
-  installPhase = ''
-    ensureDir $out/bin
-    ensureDir $out/etc
-    ensureDir $out/etc/vim
-    ensureDir $out/man
-    ./install.sh
-  '';
 
   meta = {
     longDescription = ''
@@ -51,4 +24,4 @@ stdenv.mkDerivation rec {
     homepage = http://www.methods.co.nz/asciidoc/;
     license = "GPLv2+";
   };
-}
\ No newline at end of file
+}