pcmcia-utils:
- Fix udev rules. - Accept multiple firmwares. - Allow redefinition of arguments. svn path=/nixpkgs/trunk/; revision=12741
This commit is contained in:
parent
ae163f596e
commit
6a9944cdd9
@ -3,6 +3,7 @@
|
|||||||
, sysfsutils, module_init_tools, udev
|
, sysfsutils, module_init_tools, udev
|
||||||
, firmware # Special pcmcia cards.
|
, firmware # Special pcmcia cards.
|
||||||
, config # Special hardware (map memory & port & irq)
|
, config # Special hardware (map memory & port & irq)
|
||||||
|
, lib # used to generate postInstall script.
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# FIXME: should add an option to choose between hotplug and udev.
|
# FIXME: should add an option to choose between hotplug and udev.
|
||||||
@ -18,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i "
|
sed -i "
|
||||||
s,/sbin/modprobe,$module_init_tools/sbin/modprobe,;
|
s,/sbin/modprobe,${module_init_tools}&,;
|
||||||
s,/lib/udev/,$out/sbin/,;
|
s,/lib/udev/,$out/sbin/,;
|
||||||
" udev/* # fix-color */
|
" udev/* # fix-color */
|
||||||
sed -i "
|
sed -i "
|
||||||
@ -26,18 +27,21 @@ stdenv.mkDerivation rec {
|
|||||||
s,/etc/pcmcia,$out&,;
|
s,/etc/pcmcia,$out&,;
|
||||||
" src/{startup.c,pcmcia-check-broken-cis.c} # fix-color */
|
" src/{startup.c,pcmcia-check-broken-cis.c} # fix-color */
|
||||||
''
|
''
|
||||||
+ (if firmware == null then ''sed -i "s,STARTUP = true,STARTUP = false," Makefile'' else "")
|
+ (if firmware == [] then ''sed -i "s,STARTUP = true,STARTUP = false," Makefile'' else "")
|
||||||
+ (if config == null then "" else ''
|
+ (if config == null then "" else ''
|
||||||
ln -sf ${config}/config.opts ./config/config.opts'')
|
ln -sf ${config} ./config/config.opts'')
|
||||||
;
|
;
|
||||||
|
|
||||||
makeFlags = "LEX=flex";
|
makeFlags = "LEX=flex";
|
||||||
installFlags = ''INSTALL=install DESTDIR=''${out}'';
|
installFlags = ''INSTALL=install DESTDIR=''${out}'';
|
||||||
postInstall =
|
postInstall =
|
||||||
(if firmware == null then "" else ''
|
lib.concatMapStrings (path: ''
|
||||||
ensureDir $out/lib
|
for f in : $(find ${path} -type f); do
|
||||||
ln -s ${firmware} $out/lib/firmware'')
|
test "$f" == ":" && continue;
|
||||||
;
|
ensureDir $(dirname $out/lib/firmware/$\{f#${path}});
|
||||||
|
ln -s $f $out/lib/firmware/$\{f#${path}};
|
||||||
|
done;
|
||||||
|
'') firmware;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html;
|
homepage = http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html;
|
||||||
|
@ -5419,12 +5419,13 @@ let
|
|||||||
inherit stdenv fetchurl pam libxcrypt;
|
inherit stdenv fetchurl pam libxcrypt;
|
||||||
};
|
};
|
||||||
|
|
||||||
pcmciaUtils = (import ../os-specific/linux/pcmciautils) {
|
pcmciaUtils = composedArgsAndFun (import ../os-specific/linux/pcmciautils) {
|
||||||
inherit stdenv fetchurl udev yacc flex;
|
inherit stdenv fetchurl udev yacc flex;
|
||||||
inherit sysfsutils module_init_tools;
|
inherit sysfsutils module_init_tools;
|
||||||
|
|
||||||
firmware = getConfig ["pcmciaUtils" "firmware"] null;
|
firmware = getConfig ["pcmciaUtils" "firmware"] [];
|
||||||
config = getConfig ["pcmciaUtils" "config"] null;
|
config = getConfig ["pcmciaUtils" "config"] null;
|
||||||
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
powertop = import ../os-specific/linux/powertop {
|
powertop = import ../os-specific/linux/powertop {
|
||||||
|
Loading…
Reference in New Issue
Block a user