Eelco Dolstra wrote:
    Now I have Apache running, and I want to ask to make nixos-checkout
always check out services SVN trunk to /etc/nixos/nixos/services (it
doesn't now - but it is required to build httpd upstart scripts). Also

Good point, I've made an issue about it: https://bugs.cs.uu.nl/browse/NIXOS-64

Well, if it deserves a bug entry (I hoped someone who has write access
for this part will just add the needed lines), it deserves submitting
tested patch. Here goes a version that checks out and moves non-SVN
copies away in the same way for nixos, nixpkgs and services trees.

By the way, shouldn't the copy on CD bear .svn directories being just an ordinary checkout? I guess anyway everyone will finally check out a newer version...

Raskin

#! /nix/store/x9l05dlh1qhdnzyp6bfkwnyy4vmy3bfs-bash-3.2-p17/bin/sh -e
set -x

# Obtain Subversion.
if test -z "$(type -tp svn)"; then
    nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable
    nix-channel --update
    nix-env -i subversion
fi

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

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

# Check out the NixOS and Nixpkgs sources.
svn co https://svn.cs.uu.nl:12443/repos/trace/nixos/trunk nixos
svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs
svn co https://svn.cs.uu.nl:12443/repos/trace/services/trunk nixos/services

# A few symlink.
ln -sfn ../nixpkgs/pkgs nixos/pkgs
ln -sfn nixpkgs/pkgs/top-level/all-packages.nix install-source.nix

_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to