diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-23 16:34:38 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-23 20:08:21 +0200 |
commit | 441dcd68d88a2e82aebd3572eae8032fb33d8eaf (patch) | |
tree | 9b313767aa81df1a109ca1aa64a68758738ecd58 /nixos/modules | |
parent | ab701322dccce5af14475093618cce88449abb42 (diff) | |
download | nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar.gz nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar.bz2 nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar.lz nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar.xz nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.tar.zst nixlib-441dcd68d88a2e82aebd3572eae8032fb33d8eaf.zip |
Get rid of special-casing of system.path in the manual generation
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/config/system-path.nix | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index e65be03afaca..e640592a97eb 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -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 + ''; + }; + }; } |