mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
* Better installation: make directories, create database.
* Fixed the register script.
This commit is contained in:
parent
2eea8832f0
commit
814b256da4
3 changed files with 18 additions and 10 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue