about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am7
-rwxr-xr-xtest/register18
3 files changed, 18 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e488ed78ff00..22e320a7c015 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,5 +10,6 @@ AC_CANONICAL_HOST
 AC_PROG_CC
 AC_PROG_CXX
 
-AC_CONFIG_FILES(Makefile src/Makefile src/nix-instantiate)
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([src/nix-instantiate], [chmod +x src/nix-instantiate])
 AC_OUTPUT
\ No newline at end of file
diff --git a/src/Makefile.am b/src/Makefile.am
index 17d801fbf370..e1db3c4ebe86 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,3 +3,10 @@ bin_PROGRAMS = nix
 nix_SOURCES = nix.cc md5.c
 nix_CXXFLAGS = -DSYSTEM=\"@host@\"
 nix_LDADD = -ldb_cxx-4 -lATerm
+
+install-data-local:
+	$(INSTALL) -d $(localstatedir)/nix
+	$(INSTALL) -d $(localstatedir)/nix/descriptors
+	$(INSTALL) -d $(localstatedir)/nix/sources
+	$(INSTALL) -d $(prefix)/pkg
+	$(bindir)/nix init
diff --git a/test/register b/test/register
index e03296495a92..57fe5b6c0d01 100755
--- a/test/register
+++ b/test/register
@@ -1,19 +1,19 @@
 #! /bin/sh
 
-mkdir -p $NIX/db
-mkdir -p $NIX/pkg
-mkdir -p $NIX/descr
-mkdir -p $NIX/netcache
+if test -z "$NIX"; then NIX=/nix; fi
 
-nix init
+echo target $NIX
 
-if ! nix-instantiate $NIX/descr $NIX/netcache tmpl/*.nix; then
+if ! nix-instantiate $NIX/var/nix/descriptors $NIX/var/nix/sources tmpl/*.nix; then
     exit 1;
 fi
 
-for i in $NIX/netcache/*; do nix regfile $i; done
-for i in build/*; do nix regfile $i; done
-for i in $NIX/descr/*; do 
+rm -f build/*~
+cp -p build/* $NIX/var/nix/sources
+
+for i in $NIX/var/nix/sources/*; do nix regfile $i; done
+
+for i in $NIX/var/nix/descriptors/*; do 
     md5sum $i
     nix regfile $i
 done