mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
* nixos-checkout: add an argument to specify the directory where the
sources should be stored. E.g. "nixos-checkout /home/eelco/srcs" will check out to /home/eelco/srcs/{nixos,nixpkgs}. Probably the /etc/nixos default should be removed eventually because /etc is a pretty weird place to keep large source trees. svn path=/nixos/trunk/; revision=34086
This commit is contained in:
parent
846cb81234
commit
29b05fb62a
2 changed files with 13 additions and 7 deletions
|
@ -14,7 +14,12 @@ let
|
|||
isExecutable = true;
|
||||
src = pkgs.writeScript "nixos-checkout"
|
||||
''
|
||||
cd /etc/nixos
|
||||
#! ${pkgs.stdenv.shell} -e
|
||||
|
||||
prefix="$1"
|
||||
if [ -z "$prefix" ]; then prefix=/etc/nixos; fi
|
||||
mkdir -p "$prefix"
|
||||
cd "$prefix"
|
||||
|
||||
# Move any old nixos or nixpkgs directories out of the way.
|
||||
backupTimestamp=$(date "+%Y%m%d%H%M%S")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue