3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/installer/nixos-checkout.sh
Eelco Dolstra 2c62eac3a1 * Check if Subversion is already installed.
svn path=/nixos/trunk/; revision=7886
2007-02-08 19:53:21 +00:00

31 lines
796 B
Bash

#! @shell@ -e
set -x
# Obtain Subversion.
if test -z "$(type -tp svn)"; then
nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable
nix-channel --update
nix-env -i subversion
fi
cd /etc/nixos
# Move any old nixos or nixpkgs directories out of the way.
backupTimestamp=$(date "+%Y%m%d%H%M%S")
if test -e nixos -a ! -e nixos/.svn; then
mv nixos nixos-$backupTimestamp
fi
if test -e nixpkgs -a ! -e nixpkgs/.svn; then
mv nixpkgs nixpkgs-$backupTimestamp
fi
# Check out the NixOS and Nixpkgs sources.
svn co https://svn.cs.uu.nl:12443/repos/trace/nixos/trunk nixos
svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs
# A few symlink.
ln -sfn ../nixpkgs/pkgs nixos/pkgs
ln -sfn nixpkgs/pkgs/top-level/all-packages.nix install-source.nix