forked from mirrors/nixpkgs
Get rid of special-casing of system.path in the manual generation
This commit is contained in:
parent
ab701322dc
commit
441dcd68d8
|
@ -7,14 +7,8 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
# To prevent infinite recursion, remove system.path from the
|
||||
# options. Not sure why this happens.
|
||||
options_ =
|
||||
options //
|
||||
{ system = removeAttrs options.system ["path"]; };
|
||||
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
|
||||
(builtins.toXML (optionAttrSetToDocList options_)));
|
||||
(builtins.toXML (optionAttrSetToDocList options)));
|
||||
|
||||
optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
|
||||
${pkgs.libxslt}/bin/xsltproc \
|
||||
|
|
|
@ -7,8 +7,6 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
cfg = config.environment;
|
||||
|
||||
extraManpages = pkgs.runCommand "extra-manpages" { buildInputs = [ pkgs.help2man ]; }
|
||||
''
|
||||
mkdir -p $out/share/man/man1
|
||||
|
@ -87,33 +85,9 @@ in
|
|||
system = {
|
||||
|
||||
path = mkOption {
|
||||
default = cfg.systemPackages;
|
||||
description = ''
|
||||
The packages you want in the boot environment.
|
||||
'';
|
||||
|
||||
apply = list: pkgs.buildEnv {
|
||||
name = "system-path";
|
||||
paths = list;
|
||||
inherit (cfg) pathsToLink;
|
||||
ignoreCollisions = true;
|
||||
# !!! Hacky, should modularise.
|
||||
postBuild =
|
||||
''
|
||||
if [ -x $out/bin/update-mime-database -a -w $out/share/mime/packages ]; then
|
||||
$out/bin/update-mime-database -V $out/share/mime
|
||||
fi
|
||||
|
||||
if [ -x $out/bin/gtk-update-icon-cache -a -f $out/share/icons/hicolor/index.theme ]; then
|
||||
$out/bin/gtk-update-icon-cache $out/share/icons/hicolor
|
||||
fi
|
||||
|
||||
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
|
||||
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -138,5 +112,27 @@ in
|
|||
"/share/man"
|
||||
];
|
||||
|
||||
system.path = pkgs.buildEnv {
|
||||
name = "system-path";
|
||||
paths = config.environment.systemPackages;
|
||||
inherit (config.environment) pathsToLink;
|
||||
ignoreCollisions = true;
|
||||
# !!! Hacky, should modularise.
|
||||
postBuild =
|
||||
''
|
||||
if [ -x $out/bin/update-mime-database -a -w $out/share/mime/packages ]; then
|
||||
$out/bin/update-mime-database -V $out/share/mime
|
||||
fi
|
||||
|
||||
if [ -x $out/bin/gtk-update-icon-cache -a -f $out/share/icons/hicolor/index.theme ]; then
|
||||
$out/bin/gtk-update-icon-cache $out/share/icons/hicolor
|
||||
fi
|
||||
|
||||
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
|
||||
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue