From a8c9c11f9ec5b0d0d5eec279b66da84a89008f61 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 May 2014 14:38:07 +0200 Subject: Manual: Note about using a local branch --- nixos/doc/manual/development.xml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'nixos/doc') diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml index 6873710205d9..2f0c2a7aa8da 100644 --- a/nixos/doc/manual/development.xml +++ b/nixos/doc/manual/development.xml @@ -39,7 +39,37 @@ This will check out the latest NixOS sources to and the Nixpkgs sources to /my/sources/nixpkgs. (The NixOS source tree lives in a subdirectory of the Nixpkgs -repository.) If you want to rebuild your system using your (modified) +repository.) + +It’s often inconvenient to develop directly on the master +branch, since if somebody has just committed (say) a change to GCC, +then the binary cache may not have caught up yet and you’ll have to +rebuild everything from source. So you may want to create a local +branch based on your current NixOS version: + + +$ nixos-version +14.04.273.ea1952b (Baboon) + +$ git checkout -b local ea1952b + + +Or, to base your local branch on the latest version available in the +NixOS channel: + + +$ curl -sI http://nixos.org/channels/nixos-unstable/ | grep Location +Location: http://releases.nixos.org/nixos/unstable/nixos-14.10pre43986.acaf4a6/ + +$ git checkout -b local acaf4a6 + + +You can then use git rebase to sync your local +branch with the upstream branch, and use git +cherry-pick to copy commits from your local branch to the +upstream branch. + +If you want to rebuild your system using your (modified) sources, you need to tell nixos-rebuild about them using the flag: -- cgit 1.4.1