about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorDaniƫl de Kok <me@danieldk.eu>2021-02-04 08:02:30 +0100
committerGitHub <noreply@github.com>2021-02-04 08:02:30 +0100
commit9a4d1b027d93c0c8dc9d6950af3f251d88eba03a (patch)
tree4b4ac2b7424de920959c81312fb95be79806d9db /pkgs/tools/typesetting
parenta93a3ec7155d2f5a0b2fab9496296fe7d95d9966 (diff)
parentfb6c18938b88c3a46b7604d7c2375d9be4e4ffc0 (diff)
Merge pull request #111572 from tomberek/asciidoc_date
asciidoc: set revdate
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/asciidoc/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix
index 61af8102f51eb..849da7e606c04 100644
--- a/pkgs/tools/typesetting/asciidoc/default.nix
+++ b/pkgs/tools/typesetting/asciidoc/default.nix
@@ -147,6 +147,8 @@ stdenv.mkDerivation rec {
   pname = "asciidoc";
   version = "9.0.4";
 
+  # Note: a substitution to improve reproducibility should be updated once 10.0.0 is
+  # released. See the comment in `patchPhase` for more information.
   src = fetchFromGitHub {
     owner = "asciidoc";
     repo = "asciidoc-py3";
@@ -261,7 +263,15 @@ stdenv.mkDerivation rec {
   '') + ''
     patchShebangs .
 
-    sed -i -e "s,/etc/vim,,g" Makefile.in
+    # Note: this substitution will not work in the planned 10.0.0 release:
+    #
+    # https://github.com/asciidoc/asciidoc-py3/commit/dfffda23381014481cd13e8e9d8f131e1f93f08a
+    #
+    # Update this substitution to:
+    #
+    # --replace "python3 -m asciidoc.a2x" "python3 -m asciidoc.a2x -a revdate=01/01/1980"
+    substituteInPlace Makefile.in \
+      --replace "python3 a2x.py" "python3 a2x.py -a revdate=01/01/1980"
   '';
 
   preInstall = "mkdir -p $out/etc/vim";