diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2008-01-04 17:02:12 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2008-01-04 17:02:12 +0000 |
commit | 498d47b5833ae4748b6274a2e0a710fb59e315eb (patch) | |
tree | d06f4fc7d23452ad5521736ef920c9c4ad03c83c /pkgs | |
parent | 8c615616c7b045abf7a12055f41b75f0af0303d5 (diff) | |
download | nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar.gz nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar.bz2 nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar.lz nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar.xz nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.tar.zst nixpkgs-498d47b5833ae4748b6274a2e0a710fb59e315eb.zip |
Added module_aggregator. Pass some directories with modules to it, and it will give you a directory to use instead of pkgs.kernel . addSbinPath in builderDefs to use sbin/ in addToEnv . Some catching up in xlaunch.
svn path=/nixpkgs/trunk/; revision=10075
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/module-init-tools/aggregator.nix | 33 | ||||
-rw-r--r-- | pkgs/tools/X11/xlaunch/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 | ||||
-rw-r--r-- | pkgs/top-level/builder-defs.nix | 7 |
4 files changed, 49 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/module-init-tools/aggregator.nix b/pkgs/os-specific/linux/module-init-tools/aggregator.nix new file mode 100644 index 00000000000..b0a518cd216 --- /dev/null +++ b/pkgs/os-specific/linux/module-init-tools/aggregator.nix @@ -0,0 +1,33 @@ +args : with args; + with builderDefs { + addSbinPath = true; + src = ""; + buildInputs = [lndir module_init_tools]; + configureFlags = []; + } null; /* null is a terminator for sumArgs */ +let + +doCollect = FullDepEntry ('' +ensureDir $out/ +cd $out/ +for i in $moduleSources; do + lndir $i/ +done +cd lib/modules/ +rm */modules.* +MODULE_DIR=$PWD/ depmod -a +'') [minInit addInputs defEnsureDir]; +in +stdenv.mkDerivation rec { + name = "module-aggregator"; + inherit moduleSources; + builder = writeScript (name + "-builder") + (textClosure [doCollect doForceShare doPropagate]); + meta = { + description = " + A directory to hold all the modules, including those + built separately from kernel. Earlier directories in + moduleSources have higher priority. +"; + }; +} diff --git a/pkgs/tools/X11/xlaunch/default.nix b/pkgs/tools/X11/xlaunch/default.nix index 73a85be7f12..89c94ffd515 100644 --- a/pkgs/tools/X11/xlaunch/default.nix +++ b/pkgs/tools/X11/xlaunch/default.nix @@ -37,7 +37,9 @@ EOF _display=\${_display:-:0} _display=\${_display#:} echo Using :\$_display - (egrep \"^ +env\" /etc/event.d/xserver | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo X \\\$_XARGS_ ) | bash & + XCMD=\"\$(egrep \"^env\" /etc/event.d/xserver | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ )\" + echo \"\$XCMD\" + echo \"\$XCMD\" | bash & while ! test -e /tmp/.X11-unix/X\$_display &>/dev/null ; do sleep 0.5; done su -l \${USER:-identityless-shelter} -c \"DISPLAY=:\$_display \$*\"; ' >\$out/libexec/xlaunch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06cbd02097a..0c455514b94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3314,7 +3314,6 @@ rec { [(getConfig ["kernel" "addConfig"] "")]; }; - libselinux = import ../os-specific/linux/libselinux { inherit fetchurl stdenv libsepol; }; @@ -3409,6 +3408,13 @@ rec { inherit fetchurl stdenv; }; + module_aggregation = moduleSources: + import ../os-specific/linux/module-init-tools/aggregator.nix { + inherit fetchurl stdenv module_init_tools moduleSources + builderDefs; + inherit (xorg) lndir; + }; + modutils = import ../os-specific/linux/modutils { inherit fetchurl bison flex; stdenv = overrideGCC stdenv gcc34; diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 155743558d9..aa53c9ba157 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -3,7 +3,7 @@ args: with args; with stringsWithDeps; with lib; { inherit writeScript; - + addSbinPath = getAttr ["addSbinPath"] false args; forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"]; @@ -135,6 +135,11 @@ args: with args; with stringsWithDeps; with lib; fail fi " else "") + +(if addSbinPath then " + if test -d \$1/sbin; then + export _PATH=\$_PATH\${_PATH:+:}\$1/sbin + fi + " else "") +" if test -d \$1/bin; then export _PATH=\$_PATH\${_PATH:+:}\$1/bin |