fixes, fixes, fixes
svn path=/nixpkgs/trunk/; revision=5863
This commit is contained in:
parent
de51340b0c
commit
a0d71d4a50
@ -9,6 +9,8 @@ for i in $createModules; do
|
|||||||
dst=$out/bin/$(basename $i | cut -c34-)
|
dst=$out/bin/$(basename $i | cut -c34-)
|
||||||
sed \
|
sed \
|
||||||
-e "s^@coreutils\@^$coreutils^g" \
|
-e "s^@coreutils\@^$coreutils^g" \
|
||||||
|
-e "s^@findutils\@^$findutils^g" \
|
||||||
|
-e "s^@kernelpkgs\@^$kernelpkgs^g" \
|
||||||
-e "s^@nix\@^$nix^g" \
|
-e "s^@nix\@^$nix^g" \
|
||||||
< $i > $dst
|
< $i > $dst
|
||||||
chmod +x $dst
|
chmod +x $dst
|
||||||
|
@ -5,32 +5,41 @@ archivesDir=/
|
|||||||
|
|
||||||
cpwd=@coreutils@/bin/pwd
|
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
|
#echo making kernel stuff
|
||||||
|
|
||||||
kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)
|
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
|
@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion
|
||||||
|
|
||||||
#echo $kernelVersion
|
#echo $kernelVersion
|
||||||
|
|
||||||
cd $kernel
|
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/%
|
@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/%
|
@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
|
cd $ov511
|
||||||
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
|
@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/%
|
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%
|
||||||
|
@ -6,4 +6,5 @@ derivation {
|
|||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
createModules = ./create-modules.sh;
|
createModules = ./create-modules.sh;
|
||||||
inherit stdenv coreutils nix findutils;
|
inherit stdenv coreutils nix findutils;
|
||||||
|
kernelpkgs = ./kernel.nix;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user