* Put the Nixpkgs and NixOS manuals in the channel.
git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34761 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb
This commit is contained in:
parent
b20366e0f9
commit
6f4829b73b
3 changed files with 19 additions and 5 deletions
|
@ -136,7 +136,7 @@ sub mirrorStorePath {
|
||||||
my $ext;
|
my $ext;
|
||||||
|
|
||||||
if (isValidPath($storePath) && queryPathHash16($storePath) eq $nar->{narHash}) {
|
if (isValidPath($storePath) && queryPathHash16($storePath) eq $nar->{narHash}) {
|
||||||
print STDERR "copying $storePath instead of downloading $nar->{url}\n";
|
print STDERR "copying $storePath\n";
|
||||||
|
|
||||||
# Verify that $storePath hasn't been corrupted and compress it at the same time.
|
# Verify that $storePath hasn't been corrupted and compress it at the same time.
|
||||||
$ext = "xz";
|
$ext = "xz";
|
||||||
|
|
|
@ -18,10 +18,10 @@ if [ -z "$release" ]; then echo "Failed to get release"; exit 1; fi
|
||||||
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
||||||
if [ -z "$url" ]; then exit 1; fi
|
if [ -z "$url" ]; then exit 1; fi
|
||||||
|
|
||||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’"
|
|
||||||
|
|
||||||
releaseDir=$releasesDir/$release
|
releaseDir=$releasesDir/$release
|
||||||
|
|
||||||
|
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’, dir is ‘$releaseDir’"
|
||||||
|
|
||||||
if [ -d $releaseDir ]; then
|
if [ -d $releaseDir ]; then
|
||||||
echo "release already exists"
|
echo "release already exists"
|
||||||
else
|
else
|
||||||
|
@ -30,6 +30,14 @@ else
|
||||||
|
|
||||||
echo $url > $tmpDir/src-url
|
echo $url > $tmpDir/src-url
|
||||||
|
|
||||||
|
# Copy the manual.
|
||||||
|
drvpath=$(curl -H 'Accept: application/json' -L $url/job/nixos.manual | json drvpath)
|
||||||
|
if [ -z "$drvpath" ]; then exit 1; fi
|
||||||
|
outpath=$(nix-store -r $drvpath)
|
||||||
|
cp -rd $outpath/share/doc/nixos $tmpDir/manual
|
||||||
|
chmod -R u+w $tmpDir/manual
|
||||||
|
ln -s manual.html $tmpDir/manual/index.html
|
||||||
|
|
||||||
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.i686-linux/download
|
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.i686-linux/download
|
||||||
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.x86_64-linux/download
|
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.x86_64-linux/download
|
||||||
$wget --directory=$tmpDir $url/job/nixos.iso_graphical.i686-linux/download
|
$wget --directory=$tmpDir $url/job/nixos.iso_graphical.i686-linux/download
|
||||||
|
|
|
@ -17,10 +17,10 @@ if [ -z "$release" ]; then echo "Failed to get release"; exit 1; fi
|
||||||
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
||||||
if [ -z "$url" ]; then exit 1; fi
|
if [ -z "$url" ]; then exit 1; fi
|
||||||
|
|
||||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’"
|
|
||||||
|
|
||||||
releaseDir=$releasesDir/$release
|
releaseDir=$releasesDir/$release
|
||||||
|
|
||||||
|
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’, dir is ‘$releaseDir’"
|
||||||
|
|
||||||
if [ -d $releaseDir ]; then
|
if [ -d $releaseDir ]; then
|
||||||
echo "release already exists"
|
echo "release already exists"
|
||||||
else
|
else
|
||||||
|
@ -33,6 +33,12 @@ else
|
||||||
nix-cache http://cache.nixos.org \
|
nix-cache http://cache.nixos.org \
|
||||||
/data/releases/patches/all-patches "$url/job/tarball/download/4"
|
/data/releases/patches/all-patches "$url/job/tarball/download/4"
|
||||||
|
|
||||||
|
# Extract the manual.
|
||||||
|
mkdir $tmpDir/manual
|
||||||
|
tar xf $tmpDir/nixexprs.tar.xz --strip-components=2 -C $tmpDir/manual \
|
||||||
|
--wildcards '*/doc' --exclude '*.xml' --exclude '*.xsl' --exclude '*.txt' --exclude 'Makefile'
|
||||||
|
ln -s manual.html $tmpDir/manual/index.html
|
||||||
|
|
||||||
mv $tmpDir $releaseDir
|
mv $tmpDir $releaseDir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue