Skip to content

Commit

Permalink
Improve description in the comments for ‘custom-sdist’ script impleme…
Browse files Browse the repository at this point in the history
…ntation
  • Loading branch information
unclechu committed Mar 20, 2021
1 parent b636cb9 commit 7d9242d
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions nix/custom-sdist-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
# Shortcuts for executables that are already escaped for Bash
c = builtins.mapAttrs (n: v: esc v) executables;

assetsCommit = "be365c601ad94a108967701c70042b994d7dd3f3";
assetsCommit = "b636cb9651c6ededbbda80489c79ff4a68653d96";

staticAssetUrl = filePath:
"https://raw.githubusercontent.com/unclechu/place-cursor-at/" +
Expand All @@ -37,10 +37,21 @@ let
}
[ "cp" "mv" "mktemp" "basename" ];
in

# Script that prepares ‘README.md’ file for being published on Hackage.
# It replaces relative links to some files in the repo to links to GitHub static
# content links relative to specific commit (so that content stays the same).
#
# This script makes some preparations for publishing on Hackage and then calls
# ‘cabal sdist’.
#
# Those preparations include:
#
# 1. Replace relative links to some files in ‘README.md’ with links to static
# content on GitHub (or to normal GitHub pages for some cases). Those files
# aren’t packaged into ‘sdist’ bundle so the links would be just broken
# otherwise. New links will be attached to a specific commit so the content
# stays the same.
#
# 2. Replace Markdown table in ‘README.md’ with just ASCII table wrapped into
# a code block
#
writeCheckedExecutable "custom-sdist" ''
${
builtins.concatStringsSep "\n"
Expand Down

0 comments on commit 7d9242d

Please sign in to comment.