<commit_before># This module generates the nixos-checkout script, which replaces the
# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with
# Subversion checkouts.

{config, pkgs, ...}:

with pkgs.lib;

let

  nixosCheckout = pkgs.substituteAll {
    name = "nixos-checkout";
    dir = "bin";
    isExecutable = true;
    src = pkgs.writeScript "nixos-checkout"
      ''
        cd /etc/nixos

        # Move any old nixos or nixpkgs directories out of the way.
        backupTimestamp=$(date "+%Y%m%d%H%M%S")

        if test -e nixos -a ! -e nixos/.svn; then
            mv nixos nixos-$backupTimestamp
        fi

        if test -e nixpkgs -a ! -e nixpkgs/.svn; then
            mv nixpkgs nixpkgs-$backupTimestamp
        fi

        # Check out the NixOS and Nixpkgs sources.
        svn co https://svn.nixos.org/repos/nix/nixos/trunk nixos
        svn co https://svn.nixos.org/repos/nix/nixpkgs/trunk nixpkgs
      '';
   };
  
in

{
  environment.systemPackages = [ nixosCheckout ];
}<commit_msg>* nixos-checkout depends on subversion.  (The original nixos-checkout   did a "nix-env -i subversion", which may be preferable to a static   dependency.)<commit_after># This module generates the nixos-checkout script, which replaces the
# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with
# Subversion checkouts.

{config, pkgs, ...}:

with pkgs.lib;

let

  nixosCheckout = pkgs.substituteAll {
    name = "nixos-checkout";
    dir = "bin";
    isExecutable = true;
    src = pkgs.writeScript "nixos-checkout"
      ''
        cd /etc/nixos

        # Move any old nixos or nixpkgs directories out of the way.
        backupTimestamp=$(date "+%Y%m%d%H%M%S")

        if test -e nixos -a ! -e nixos/.svn; then
            mv nixos nixos-$backupTimestamp
        fi

        if test -e nixpkgs -a ! -e nixpkgs/.svn; then
            mv nixpkgs nixpkgs-$backupTimestamp
        fi

        # Check out the NixOS and Nixpkgs sources.
        ${pkgs.subversion}/bin/svn co https://svn.nixos.org/repos/nix/nixos/trunk nixos
        ${pkgs.subversion}/bin/svn co https://svn.nixos.org/repos/nix/nixpkgs/trunk nixpkgs
      '';
   };
  
in

{
  environment.systemPackages =
    [ nixosCheckout
      # Since the checkout script depends on Subversion, we may as
      # well put it in $PATH.
      pkgs.subversion
    ];
}
{'fraction_non_alphanumeric': 0.10907541542394546, 'fraction_numerical': 0.0, 'mean_word_length': 2.335227272727273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7380239', 'n_tokens_mistral': 892, 'n_tokens_neox': 830, 'n_words': 222}