* Don't set the prefix to /nix by default, rather use the Autoconf
default of /usr/local. However, localstatedir and storedir are set to /nix/var/nix and /nix/store respectively unless they're explicitly overriden.
This commit is contained in:
		
							parent
							
								
									a55113411f
								
							
						
					
					
						commit
						285d26374a
					
				
					 3 changed files with 12 additions and 11 deletions
				
			
		
							
								
								
									
										10
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								configure.ac
									
										
									
									
									
								
							| 
						 | 
					@ -18,8 +18,6 @@ fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_DEFINE_UNQUOTED(NIX_VERSION, ["$VERSION"], [Nix version.])
 | 
					AC_DEFINE_UNQUOTED(NIX_VERSION, ["$VERSION"], [Nix version.])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_PREFIX_DEFAULT(/nix)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
AC_CANONICAL_HOST
 | 
					AC_CANONICAL_HOST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,6 +59,10 @@ AC_SUBST(system)
 | 
				
			||||||
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
 | 
					AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# State should be stored in /nix/var, unless the user overrides it explicitly.
 | 
				
			||||||
 | 
					test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Windows-specific stuff.
 | 
					# Windows-specific stuff.
 | 
				
			||||||
if test "$sys_name" = "cygwin"; then
 | 
					if test "$sys_name" = "cygwin"; then
 | 
				
			||||||
    # We cannot delete open files.
 | 
					    # We cannot delete open files.
 | 
				
			||||||
| 
						 | 
					@ -174,7 +176,7 @@ AC_SUBST(xmlflags)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_ARG_WITH(store-dir, AC_HELP_STRING([--with-store-dir=PATH],
 | 
					AC_ARG_WITH(store-dir, AC_HELP_STRING([--with-store-dir=PATH],
 | 
				
			||||||
  [path of the Nix store]),
 | 
					  [path of the Nix store]),
 | 
				
			||||||
  storedir=$withval, storedir='${prefix}/store')
 | 
					  storedir=$withval, storedir='/nix/store')
 | 
				
			||||||
AC_SUBST(storedir)
 | 
					AC_SUBST(storedir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_ARG_ENABLE(old-db-compat, AC_HELP_STRING([--disable-old-db-compat],
 | 
					AC_ARG_ENABLE(old-db-compat, AC_HELP_STRING([--disable-old-db-compat],
 | 
				
			||||||
| 
						 | 
					@ -240,7 +242,7 @@ if test -z "$bzip2"; then
 | 
				
			||||||
  bzip2_lib='-L${top_builddir}/externals/inst-bzip2/lib -lbz2'
 | 
					  bzip2_lib='-L${top_builddir}/externals/inst-bzip2/lib -lbz2'
 | 
				
			||||||
  bzip2_include='-I${top_builddir}/externals/inst-bzip2/include'
 | 
					  bzip2_include='-I${top_builddir}/externals/inst-bzip2/include'
 | 
				
			||||||
  # The binary will be copied to $libexecdir.
 | 
					  # The binary will be copied to $libexecdir.
 | 
				
			||||||
  bzip2_bin='${libexecdir}'
 | 
					  bzip2_bin='${libexecdir}/nix'
 | 
				
			||||||
  # But for testing, we have to use the temporary copy :-(
 | 
					  # But for testing, we have to use the temporary copy :-(
 | 
				
			||||||
  bzip2_bin_test='${top_builddir}/externals/inst-bzip2/bin'
 | 
					  bzip2_bin_test='${top_builddir}/externals/inst-bzip2/bin'
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,8 +16,7 @@ Group: Software Deployment
 | 
				
			||||||
URL: http://nixos.org/
 | 
					URL: http://nixos.org/
 | 
				
			||||||
Source0: %{name}-@version@.tar.bz2
 | 
					Source0: %{name}-@version@.tar.bz2
 | 
				
			||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
 | 
					BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
 | 
				
			||||||
%define _prefix /nix
 | 
					Prefix: /usr
 | 
				
			||||||
Prefix: %{_prefix}
 | 
					 | 
				
			||||||
Requires: /usr/bin/perl
 | 
					Requires: /usr/bin/perl
 | 
				
			||||||
Requires: curl
 | 
					Requires: curl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,9 +75,9 @@ fi
 | 
				
			||||||
%{_prefix}/lib
 | 
					%{_prefix}/lib
 | 
				
			||||||
%{_prefix}/libexec
 | 
					%{_prefix}/libexec
 | 
				
			||||||
%{_prefix}/include
 | 
					%{_prefix}/include
 | 
				
			||||||
%{_prefix}/var
 | 
					 | 
				
			||||||
%{_prefix}/share
 | 
					%{_prefix}/share
 | 
				
			||||||
%{_prefix}/store
 | 
					/nix/var
 | 
				
			||||||
 | 
					/nix/store
 | 
				
			||||||
%config
 | 
					%config
 | 
				
			||||||
%{_prefix}/etc
 | 
					%{_prefix}/etc
 | 
				
			||||||
#%doc
 | 
					#%doc
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,9 +29,9 @@ ln -s $TOP/scripts/nix-build $NIX_BIN_DIR/
 | 
				
			||||||
ln -s $TOP/scripts/nix-install-package $NIX_BIN_DIR/
 | 
					ln -s $TOP/scripts/nix-install-package $NIX_BIN_DIR/
 | 
				
			||||||
ln -s $TOP/scripts/nix-push $NIX_BIN_DIR/
 | 
					ln -s $TOP/scripts/nix-push $NIX_BIN_DIR/
 | 
				
			||||||
ln -s $TOP/scripts/nix-pull $NIX_BIN_DIR/
 | 
					ln -s $TOP/scripts/nix-pull $NIX_BIN_DIR/
 | 
				
			||||||
ln -s $bzip2_bin_test/bzip2 $NIX_BIN_DIR/
 | 
					 | 
				
			||||||
ln -s $bzip2_bin_test/bunzip2 $NIX_BIN_DIR/
 | 
					 | 
				
			||||||
mkdir $NIX_BIN_DIR/nix
 | 
					mkdir $NIX_BIN_DIR/nix
 | 
				
			||||||
 | 
					ln -s $bzip2_bin_test/bzip2 $NIX_BIN_DIR/nix/
 | 
				
			||||||
 | 
					ln -s $bzip2_bin_test/bunzip2 $NIX_BIN_DIR/nix/
 | 
				
			||||||
ln -s $TOP/scripts/copy-from-other-stores.pl $NIX_BIN_DIR/nix/
 | 
					ln -s $TOP/scripts/copy-from-other-stores.pl $NIX_BIN_DIR/nix/
 | 
				
			||||||
ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
 | 
					ln -s $TOP/scripts/download-using-manifests.pl $NIX_BIN_DIR/nix/
 | 
				
			||||||
ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
 | 
					ln -s $TOP/scripts/readmanifest.pm $NIX_BIN_DIR/nix/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue