* nixos-checkout: get the NixOS/Nixpkgs sources from GitHub.
svn path=/nixos/trunk/; revision=34347
This commit is contained in:
parent
c4c68f97d1
commit
a0cc181117
1 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
# This module generates the nixos-checkout script, which replaces the
|
# This module generates the nixos-checkout script, which replaces the
|
||||||
# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with
|
# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with
|
||||||
# Subversion checkouts.
|
# Git checkouts.
|
||||||
|
|
||||||
{config, pkgs, ...}:
|
{config, pkgs, ...}:
|
||||||
|
|
||||||
|
@ -21,6 +21,11 @@ let
|
||||||
mkdir -p "$prefix"
|
mkdir -p "$prefix"
|
||||||
cd "$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.
|
# Move any old nixos or nixpkgs directories out of the way.
|
||||||
backupTimestamp=$(date "+%Y%m%d%H%M%S")
|
backupTimestamp=$(date "+%Y%m%d%H%M%S")
|
||||||
|
|
||||||
|
@ -33,18 +38,13 @@ let
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check out the NixOS and Nixpkgs sources.
|
# Check out the NixOS and Nixpkgs sources.
|
||||||
${pkgs.subversion}/bin/svn co https://nixos.org/repos/nix/nixos/trunk nixos
|
git clone git://github.com/NixOS/nixos.git nixos
|
||||||
${pkgs.subversion}/bin/svn co https://nixos.org/repos/nix/nixpkgs/trunk nixpkgs
|
git clone git://github.com/NixOS/nixpkgs.git nixpkgs
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages =
|
environment.systemPackages = [ nixosCheckout ];
|
||||||
[ nixosCheckout
|
|
||||||
# Since the checkout script depends on Subversion, we may as
|
|
||||||
# well put it in $PATH.
|
|
||||||
pkgs.subversion
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue