fixes, fixes, fixes

svn path=/nixpkgs/trunk/; revision=5863
This commit is contained in:
Armijn Hemel 2006-07-21 14:24:43 +00:00
parent de51340b0c
commit a0d71d4a50
3 changed files with 19 additions and 7 deletions

View File

@ -9,6 +9,8 @@ for i in $createModules; do
dst=$out/bin/$(basename $i | cut -c34-)
sed \
-e "s^@coreutils\@^$coreutils^g" \
-e "s^@findutils\@^$findutils^g" \
-e "s^@kernelpkgs\@^$kernelpkgs^g" \
-e "s^@nix\@^$nix^g" \
< $i > $dst
chmod +x $dst

View File

@ -5,32 +5,41 @@ archivesDir=/
cpwd=@coreutils@/bin/pwd
storeExpr=$(@nix@/bin/nix-store -qR $(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).everything' | @nix@/bin/nix-instantiate -)))
storeExpr=$(@nix@/bin/nix-store -qR $(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).everything' | @nix@/bin/nix-instantiate -)))
kernel=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).kernel' | @nix@/bin/nix-instantiate -))
kernel=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).kernel' | @nix@/bin/nix-instantiate -))
ov511=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).ov511' | @nix@/bin/nix-instantiate -))
ov511=$(@nix@/bin/nix-store -r $(echo '(import @kernelpkgs@).ov511' | @nix@/bin/nix-instantiate -))
#echo making kernel stuff
kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)
echo removing old kernel tree
@coreutils@/bin/rm -rf $archivesDir/lib/modules/$kernelVersion
echo making new kernel tree
@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion
#echo $kernelVersion
cd $kernel
# make directories
echo making kernel directories
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
# link all files
echo linking kernel modules
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $kernel/% $archivesDir/%
# make directories
echo making ov511 directories
cd $ov511
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
# link all files
echo linking ov511 modules
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%

View File

@ -6,4 +6,5 @@ derivation {
builder = ./builder.sh;
createModules = ./create-modules.sh;
inherit stdenv coreutils nix findutils;
kernelpkgs = ./kernel.nix;
}