about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--scripts/nix-prefetch-url.in2
-rw-r--r--substitute.mk1
3 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 46036113b81b..708e61968424 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,7 @@ AC_PATH_PROG(w3m, w3m, false)
 AC_PATH_PROG(flex, flex, false)
 AC_PATH_PROG(bison, bison, false)
 NEED_PROG(perl, perl)
+NEED_PROG(sed, sed)
 NEED_PROG(tar, tar)
 AC_PATH_PROG(dot, dot)
 AC_PATH_PROG(dblatex, dblatex)
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 7d8bd93a42d8..31170fa953ea 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -24,7 +24,7 @@ fi
 # Handle escaped characters in the URI.  `+', `=' and `?' are the only
 # characters that are valid in Nix store path names but have a special
 # meaning in URIs.
-name=$(basename "$url" | sed -e 's/%2b/+/g' -e 's/%3d/=/g' -e 's/%3f/\?/g')
+name=$(basename "$url" | @sed@ -e 's/%2b/+/g' -e 's/%3d/=/g' -e 's/%3f/\?/g')
 if test -z "$name"; then echo "invalid url"; exit 1; fi
 
 
diff --git a/substitute.mk b/substitute.mk
index ae11ce2b31f6..729116477795 100644
--- a/substitute.mk
+++ b/substitute.mk
@@ -16,6 +16,7 @@
 	 -e "s^@bzip2_bin_test\@^$(bzip2_bin_test)^g" \
 	 -e "s^@perl\@^$(perl)^g" \
 	 -e "s^@coreutils\@^$(coreutils)^g" \
+	 -e "s^@sed\@^$(sed)^g" \
 	 -e "s^@tar\@^$(tar)^g" \
 	 -e "s^@gzip\@^$(gzip)^g" \
 	 -e "s^@tr\@^$(tr)^g" \