mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
new builders, new scripts, new yay!
svn path=/nixpkgs/trunk/; revision=5982
This commit is contained in:
parent
a9d8252365
commit
5ee173e814
2 changed files with 39 additions and 0 deletions
31
pkgs/os-specific/linux/kernelscripts/builder.sh
Executable file
31
pkgs/os-specific/linux/kernelscripts/builder.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
export MODULE_DIR=$out/lib/modules
|
||||
|
||||
kernelVersion=$(cd $kernel/lib/modules/; ls -d *)
|
||||
|
||||
mkdir -p $out/lib/modules/$kernelVersion
|
||||
|
||||
cd $kernel
|
||||
|
||||
# making kernel directories
|
||||
|
||||
find . -not -path "./lib/modules/$kernelVersion/build*" -type d | xargs -n 1 -i% mkdir -p $out/%
|
||||
|
||||
# symlinking kernel modules
|
||||
|
||||
find . -not -path "./lib/modules/$kernelVersion/build*" -a -not -path \
|
||||
"./System*" -a -not -path "./vmlinuz*" -type f | xargs -n 1 -i% \
|
||||
ln -s $kernel/% $archivesDir/%
|
||||
|
||||
# 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/%
|
||||
#
|
||||
# echo symlinking 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/%
|
||||
|
||||
# running depmod
|
||||
$module_init_tools/sbin/depmod -ae
|
8
pkgs/os-specific/linux/kernelscripts/default.nix
Normal file
8
pkgs/os-specific/linux/kernelscripts/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{stdenv, module_init_tools, kernel, modules}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
builder = ./builder.sh;
|
||||
name = "module-init-tools-script-0.0.1";
|
||||
|
||||
inherit module_init_tools kernel modules;
|
||||
}
|
Loading…
Reference in a new issue