From a0cc18111766494882db511f6d073b5ac1b12d69 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Jun 2012 15:39:07 +0000 Subject: [PATCH] * nixos-checkout: get the NixOS/Nixpkgs sources from GitHub. svn path=/nixos/trunk/; revision=34347 --- modules/installer/tools/nixos-checkout.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/installer/tools/nixos-checkout.nix b/modules/installer/tools/nixos-checkout.nix index d591c01df19..a36906ff4a2 100644 --- a/modules/installer/tools/nixos-checkout.nix +++ b/modules/installer/tools/nixos-checkout.nix @@ -1,6 +1,6 @@ # This module generates the nixos-checkout script, which replaces the # NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with -# Subversion checkouts. +# Git checkouts. {config, pkgs, ...}: @@ -21,6 +21,11 @@ let mkdir -p "$prefix" cd "$prefix" + if [ -z "$(type -P git)" ]; then + echo "installing Git..." + nix-env -iA nixos.pkgs.git || nix-env -i git + fi + # Move any old nixos or nixpkgs directories out of the way. backupTimestamp=$(date "+%Y%m%d%H%M%S") @@ -33,18 +38,13 @@ let fi # Check out the NixOS and Nixpkgs sources. - ${pkgs.subversion}/bin/svn co https://nixos.org/repos/nix/nixos/trunk nixos - ${pkgs.subversion}/bin/svn co https://nixos.org/repos/nix/nixpkgs/trunk nixpkgs + git clone git://github.com/NixOS/nixos.git nixos + git clone git://github.com/NixOS/nixpkgs.git nixpkgs ''; }; in { - environment.systemPackages = - [ nixosCheckout - # Since the checkout script depends on Subversion, we may as - # well put it in $PATH. - pkgs.subversion - ]; + environment.systemPackages = [ nixosCheckout ]; }