summary refs log tree commit diff
path: root/nixos/doc
diff options
context:
space:
mode:
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>2014-12-20 16:49:18 -0800
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2014-12-20 16:49:18 -0800
commitc231506b5ad9c4609278204b0480c994d91333e2 (patch)
tree1c0333f3daa25c7385d0b156d5b170dd2330a47e /nixos/doc
parentf94580da695808d04626775d6aa3864a91b735b2 (diff)
parent9334085e80600e4baf9561b3a9836937a6f73d5f (diff)
downloadnixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar.gz
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar.bz2
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar.lz
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar.xz
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.tar.zst
nixpkgs-c231506b5ad9c4609278204b0480c994d91333e2.zip
Merge pull request #5362 from nbp/update-channels
Add a script to add git branches for each channel.

To create / update references to remote / local channels, you have to run `./maintainers/scripts/update-channel-branches.sh` while you are at the top-level of nixpkgs work directory.  To make this convenient for Nixpkgs / NixOS developer, one can run the following command:

```
$ git config --add alias.fetch-channels '!sh -c "$(git rev-parse --show-cdup)maintainers/scripts/update-channel-branches.sh"'
```

Which will register the alias fetch-channels such that the script can used from sub-directory of nixpkgs by running `git fetch-channels`.
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/development/sources.xml18
1 files changed, 10 insertions, 8 deletions
diff --git a/nixos/doc/manual/development/sources.xml b/nixos/doc/manual/development/sources.xml
index f9fadd6bf5e..3ac07da19f1 100644
--- a/nixos/doc/manual/development/sources.xml
+++ b/nixos/doc/manual/development/sources.xml
@@ -40,20 +40,22 @@ rebuild everything from source. So you may want to create a local
 branch based on your current NixOS version:
 
 <screen>
-$ nixos-version
-14.04.273.ea1952b (Baboon)
-
-$ git checkout -b local ea1952b
+$ <replaceable>/my/sources</replaceable>/nixpkgs/maintainers/scripts/update-channel-branches.sh
+Fetching channels from https://nixos.org/channels:
+ * [new branch]      cbe467e           -> channels/remotes/nixos-unstable
+Fetching channels from nixos-version:
+ * [new branch]      9ff4738           -> channels/current-system
+Fetching channels from ~/.nix-defexpr:
+ * [new branch]      0d4acad           -> channels/root/nixos
+$ git checkout -b local channels/current-system
 </screen>
 
 Or, to base your local branch on the latest version available in the
 NixOS channel:
 
 <screen>
-$ curl -sI https://nixos.org/channels/nixos-unstable/ | grep Location
-Location: https://releases.nixos.org/nixos/unstable/nixos-14.10pre43986.acaf4a6/
-
-$ git checkout -b local acaf4a6
+$ <replaceable>/my/sources</replaceable>/nixpkgs/maintainers/scripts/update-channel-branches.sh
+$ git checkout -b local channels/remotes/nixos-unstable
 </screen>
 
 You can then use <command>git rebase</command> to sync your local