about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--corepkgs/buildenv/Makefile.am4
-rwxr-xr-xcorepkgs/buildenv/builder.pl.in (renamed from corepkgs/buildenv/builder.pl)2
-rwxr-xr-xscripts/nix-collect-garbage.in2
-rw-r--r--scripts/nix-install-package.in2
-rw-r--r--scripts/nix-prefetch-url.in2
-rw-r--r--scripts/nix-pull.in2
-rw-r--r--scripts/nix-push.in2
-rw-r--r--substitute.mk1
9 files changed, 15 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 689c2617e15d..093812e7acc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,11 @@ AC_PATH_PROG(xmllint, xmllint)
 AC_PATH_PROG(xsltproc, xsltproc)
 AC_PATH_PROG(flex, flex, false)
 AC_PATH_PROG(bison, bison, false)
+AC_PATH_PROG(perl, perl)
+if test -z "$perl"; then
+  echo "Perl is required for Nix."
+  exit 1
+fi
 
 AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH],
   [path of the DocBook XML DTD]),
diff --git a/corepkgs/buildenv/Makefile.am b/corepkgs/buildenv/Makefile.am
index f6a14600f3c4..7a5df476d3d8 100644
--- a/corepkgs/buildenv/Makefile.am
+++ b/corepkgs/buildenv/Makefile.am
@@ -1,3 +1,5 @@
+all-local: builder.pl
+
 install-exec-local:
 	$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
 	$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
@@ -6,4 +8,4 @@ install-exec-local:
 
 include ../../substitute.mk
 
-EXTRA_DIST = default.nix builder.pl
+EXTRA_DIST = default.nix builder.pl.in
diff --git a/corepkgs/buildenv/builder.pl b/corepkgs/buildenv/builder.pl.in
index 3bbb178c8570..d9ff73e17d2a 100755
--- a/corepkgs/buildenv/builder.pl
+++ b/corepkgs/buildenv/builder.pl.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! @perl@ -w
 
 use strict;
 use Cwd;
diff --git a/scripts/nix-collect-garbage.in b/scripts/nix-collect-garbage.in
index a3ee7bd5ee33..c701ad482f00 100755
--- a/scripts/nix-collect-garbage.in
+++ b/scripts/nix-collect-garbage.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! @perl@ -w
 
 use strict;
 use IPC::Open2;
diff --git a/scripts/nix-install-package.in b/scripts/nix-install-package.in
index c71a6ca5fdee..73afead7d825 100644
--- a/scripts/nix-install-package.in
+++ b/scripts/nix-install-package.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! @perl@ -w
 
 use strict;
 use POSIX qw(tmpnam);
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 6cc3b7a26706..d921e922b589 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! @perl@ -w
 
 use strict;
 use IPC::Open2;
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index 2b2d4e857ab5..acb4c0732623 100644
--- a/scripts/nix-pull.in
+++ b/scripts/nix-pull.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w -I@libexecdir@/nix
+#! @perl@ -w -I@libexecdir@/nix
 
 use strict;
 use IPC::Open2;
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index 356fe1952207..167d787b759c 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! @perl@ -w
 
 use strict;
 use POSIX qw(tmpnam);
diff --git a/substitute.mk b/substitute.mk
index 6882393bc89d..73a93963f192 100644
--- a/substitute.mk
+++ b/substitute.mk
@@ -9,6 +9,7 @@
 	 -e "s^@storedir\@^$(storedir)^g" \
 	 -e "s^@system\@^$(system)^g" \
 	 -e "s^@wget\@^$(wget)^g" \
+	 -e "s^@perl\@^$(perl)^g" \
 	 -e "s^@version\@^$(VERSION)^g" \
 	 < $< > $@ || rm $@
 	if test -x $<; then chmod +x $@; fi