From 25387a1bedefb391db9f8585cfa1d160fc3bacfe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Apr 2016 20:53:24 +0200 Subject: [PATCH] nixos-checkout: Remove This command was useful when NixOS was spread across multiple repositories, but now it's pretty pointless (and obfuscates what happens, i.e. "git clone git://github.com/NixOS/nixpkgs.git"). --- nixos/doc/manual/development/sources.xml | 32 ++++------ .../cd-dvd/system-tarball-fuloong2f.nix | 3 +- .../cd-dvd/system-tarball-sheevaplug.nix | 3 +- .../installer/tools/nixos-checkout.nix | 60 ------------------- nixos/modules/module-list.nix | 1 - 5 files changed, 13 insertions(+), 86 deletions(-) delete mode 100644 nixos/modules/installer/tools/nixos-checkout.nix diff --git a/nixos/doc/manual/development/sources.xml b/nixos/doc/manual/development/sources.xml index 879a31e32c59..fd0b0109b322 100644 --- a/nixos/doc/manual/development/sources.xml +++ b/nixos/doc/manual/development/sources.xml @@ -11,35 +11,25 @@ uses the NixOS and Nixpkgs sources provided by the nixos-unstable channel (kept in /nix/var/nix/profiles/per-user/root/channels/nixos). To modify NixOS, however, you should check out the latest sources from -Git. This is done using the following command: +Git. This is as follows: -$ nixos-checkout /my/sources - - -or - - -$ mkdir -p /my/sources -$ cd /my/sources -$ nix-env -i git $ git clone git://github.com/NixOS/nixpkgs.git $ cd nixpkgs $ git remote add channels git://github.com/NixOS/nixpkgs-channels.git $ git remote update channels -This will check out the latest NixOS sources to -/my/sources/nixpkgs/nixos -and the Nixpkgs sources to -/my/sources/nixpkgs. -(The NixOS source tree lives in a subdirectory of the Nixpkgs -repository.) The remote channels refers to a -read-only repository that tracks the Nixpkgs/NixOS channels (see for more information about channels). Thus, -the Git branch channels/nixos-14.12 will contain -the latest built and tested version available in the -nixos-14.12 channel. +This will check out the latest Nixpkgs sources to +./nixpkgs the NixOS sources to +./nixpkgs/nixos. (The NixOS source tree lives in +a subdirectory of the Nixpkgs repository.) The remote +channels refers to a read-only repository that +tracks the Nixpkgs/NixOS channels (see +for more information about channels). Thus, the Git branch +channels/nixos-14.12 will contain the latest built +and tested version available in the nixos-14.12 +channel. It’s often inconvenient to develop directly on the master branch, since if somebody has just committed (say) a change to GCC, diff --git a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix index 6fe490b02bf4..d984cb307170 100644 --- a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix +++ b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix @@ -52,8 +52,7 @@ in # Include some utilities that are useful for installing or repairing # the system. environment.systemPackages = - [ pkgs.subversion # for nixos-checkout - pkgs.w3m # needed for the manual anyway + [ pkgs.w3m # needed for the manual anyway pkgs.testdisk # useful for repairing boot problems pkgs.mssys # for writing Microsoft boot sectors / MBRs pkgs.parted diff --git a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix index 7badfcb8df22..9e733241993d 100644 --- a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix +++ b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix @@ -49,8 +49,7 @@ in # Include some utilities that are useful for installing or repairing # the system. environment.systemPackages = - [ pkgs.subversion # for nixos-checkout - pkgs.w3m # needed for the manual anyway + [ pkgs.w3m # needed for the manual anyway pkgs.ddrescue pkgs.ccrypt pkgs.cryptsetup # needed for dm-crypt volumes diff --git a/nixos/modules/installer/tools/nixos-checkout.nix b/nixos/modules/installer/tools/nixos-checkout.nix deleted file mode 100644 index 07274e139f7d..000000000000 --- a/nixos/modules/installer/tools/nixos-checkout.nix +++ /dev/null @@ -1,60 +0,0 @@ -# This module generates the nixos-checkout script, which performs a -# checkout of the Nixpkgs Git repository. - -{ config, lib, pkgs, ... }: - -with lib; - -let - - nixosCheckout = pkgs.substituteAll { - name = "nixos-checkout"; - dir = "bin"; - isExecutable = true; - src = pkgs.writeScript "nixos-checkout" - '' - #! ${pkgs.stdenv.shell} -e - - if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then - echo "Usage: `basename $0` [PREFIX]. See NixOS Manual for more info." - exit 0 - fi - - prefix="$1" - if [ -z "$prefix" ]; then prefix=/etc/nixos; fi - mkdir -p "$prefix" - cd "$prefix" - - if [ -z "$(type -P git)" ]; then - echo "installing Git..." - nix-env -iA nixos.git - fi - - # Move any old nixpkgs directories out of the way. - backupTimestamp=$(date "+%Y%m%d%H%M%S") - - if [ -e nixpkgs -a ! -e nixpkgs/.git ]; then - mv nixpkgs nixpkgs-$backupTimestamp - fi - - # Check out the Nixpkgs sources. - if ! [ -e nixpkgs/.git ]; then - echo "Creating repository in $prefix/nixpkgs..." - git init --quiet nixpkgs - else - echo "Updating repository in $prefix/nixpkgs..." - fi - cd nixpkgs - git remote add origin git://github.com/NixOS/nixpkgs.git || true - git remote add channels git://github.com/NixOS/nixpkgs-channels.git || true - git remote set-url origin --push git@github.com:NixOS/nixpkgs.git - git remote update - git checkout master - ''; - }; - -in - -{ - environment.systemPackages = [ nixosCheckout ]; -} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index bb8fa48105ac..e59ec07b8aa5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -47,7 +47,6 @@ ./i18n/input-method/nabi.nix ./i18n/input-method/uim.nix ./installer/tools/auto-upgrade.nix - ./installer/tools/nixos-checkout.nix ./installer/tools/tools.nix ./misc/assertions.nix ./misc/crashdump.nix