mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
Generate the module-list.nix which index all valid modules.
Non-valid modules are commented inside the generated list. Move module paths which are not the module directory into the legacy.nix file. svn path=/nixos/branches/modular-nixos/; revision=15751
This commit is contained in:
parent
054528b28d
commit
b022f2e95a
55
maintainers/scripts/gen-module-list.sh
Executable file
55
maintainers/scripts/gen-module-list.sh
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
prog=$0
|
||||
|
||||
usage(){
|
||||
echo 1>&2 "
|
||||
$prog module-dir
|
||||
|
||||
This script generate the index file inside the module directory.
|
||||
"
|
||||
exit 1
|
||||
}
|
||||
|
||||
: ${NIXPKGS=/etc/nixos/nixpkgs}
|
||||
|
||||
is_module(){
|
||||
local file=$1
|
||||
echo "
|
||||
let
|
||||
appIfFun = f: x: if builtins.isFunction f then f x else f;
|
||||
in
|
||||
builtins.isAttrs (
|
||||
appIfFun (import $file) {
|
||||
pkgs = (import $NIXPKGS) {};
|
||||
config = {};
|
||||
dummy = 42;
|
||||
}
|
||||
)
|
||||
" | nix-instantiate - --eval-only
|
||||
}
|
||||
|
||||
generate_index(){
|
||||
local path="$1"
|
||||
cd "$path"
|
||||
echo -n "$path: " 1>&2
|
||||
{ echo "[ # This file have been generated by $(basename $prog)";
|
||||
for file in : $(find ./ -wholename '*.impl[./]*' -or -wholename './module-list.nix' -or -type f -name '*.nix' -print); do
|
||||
[ "$file" = ':' ] && continue;
|
||||
echo -n . 1>&2
|
||||
if test "$(is_module "$file" 2> /dev/null)" = "Bool(True)"; then
|
||||
echo " $file"
|
||||
else
|
||||
echo "##### $file"
|
||||
is_module "$file" 2>&1 | sed 's/^/# /'
|
||||
fi
|
||||
done
|
||||
echo ']';
|
||||
} > ./module-list.nix
|
||||
echo 1>&2
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
[ $# -eq 1 ] || usage;
|
||||
|
||||
generate_index "$1"
|
20
modules/legacy.nix
Normal file
20
modules/legacy.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
require = [
|
||||
../etc/default.nix
|
||||
../system/assertion.nix
|
||||
../system/nixos-environment.nix
|
||||
../system/nixos-installer.nix
|
||||
../system/system-options.nix
|
||||
../upstart-jobs/cron/locate.nix
|
||||
../upstart-jobs/filesystems.nix
|
||||
../upstart-jobs/guest-users.nix
|
||||
../upstart-jobs/kbd.nix
|
||||
../upstart-jobs/ldap
|
||||
../upstart-jobs/lvm.nix
|
||||
../upstart-jobs/network-interfaces.nix
|
||||
../upstart-jobs/pcmcia.nix
|
||||
../upstart-jobs/swap.nix
|
||||
../upstart-jobs/swraid.nix
|
||||
../upstart-jobs/tty-backgrounds.nix
|
||||
];
|
||||
}
|
|
@ -1,25 +1,9 @@
|
|||
[ #./hardware/network/intel-3945abg.nix
|
||||
../etc/default.nix
|
||||
../system/assertion.nix
|
||||
../system/nixos-environment.nix
|
||||
../system/nixos-installer.nix
|
||||
../system/system-options.nix
|
||||
../upstart-jobs/cron/locate.nix
|
||||
../upstart-jobs/filesystems.nix
|
||||
../upstart-jobs/guest-users.nix
|
||||
../upstart-jobs/kbd.nix
|
||||
../upstart-jobs/ldap
|
||||
../upstart-jobs/lvm.nix
|
||||
../upstart-jobs/network-interfaces.nix
|
||||
../upstart-jobs/pcmcia.nix
|
||||
../upstart-jobs/swap.nix
|
||||
../upstart-jobs/swraid.nix
|
||||
../upstart-jobs/tty-backgrounds.nix
|
||||
[ # This file have been generated by gen-module-list.sh
|
||||
./config/fonts.nix
|
||||
./config/i18n.nix
|
||||
./config/system-path.nix
|
||||
./config/unix-odbc-drivers.nix
|
||||
./config/users-groups.nix
|
||||
./config/system-path.nix
|
||||
./installer/grub/grub.nix
|
||||
./security/setuid-wrappers.nix
|
||||
./security/sudo.nix
|
||||
|
@ -44,22 +28,22 @@
|
|||
./services/monitoring/zabbix-agent.nix
|
||||
./services/monitoring/zabbix-server.nix
|
||||
./services/network-filesystems/nfs-kernel.nix
|
||||
./services/network-filesystems/samba.nix # TODO: doesn't start here (?)
|
||||
./services/network-filesystems/samba.nix
|
||||
./services/networking/avahi-daemon.nix
|
||||
./services/networking/bind.nix
|
||||
./services/networking/bitlbee.nix
|
||||
./services/networking/dhclient.nix
|
||||
./services/networking/dhcpd.nix
|
||||
./services/networking/ejabberd.nix # untested, dosen't compile on x86_64-linux
|
||||
./services/networking/ejabberd.nix
|
||||
./services/networking/gnunet.nix
|
||||
./services/networking/gw6c.nix
|
||||
./services/networking/ifplugd.nix
|
||||
./services/networking/ircd-hybrid.nix # TODO: doesn't compile on x86_64-linux, can't test
|
||||
./services/networking/ircd-hybrid.nix
|
||||
./services/networking/ntpd.nix
|
||||
./services/networking/openfire.nix
|
||||
./services/networking/openvpn.nix
|
||||
./services/networking/portmap.nix
|
||||
./services/networking/ssh/lshd.nix # GNU lshd SSH2 deamon (TODO: does neither start nor generate seed file ?)
|
||||
./services/networking/ssh/lshd.nix
|
||||
./services/networking/ssh/sshd.nix
|
||||
./services/networking/vsftpd.nix
|
||||
./services/printing/cupsd.nix
|
||||
|
@ -71,11 +55,54 @@
|
|||
./services/system/nscd.nix
|
||||
./services/ttys/gpm.nix
|
||||
./services/ttys/mingetty.nix
|
||||
./services/web-servers/apache-httpd
|
||||
./services/web-servers/apache-httpd/default.nix
|
||||
##### ./services/web-servers/apache-httpd/per-server-options.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix:6:2':
|
||||
# the argument named `forMainServer' required by the function is missing
|
||||
##### ./services/web-servers/apache-httpd/subversion.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/services/web-servers/apache-httpd/subversion.nix:1:2':
|
||||
# the argument named `serverInfo' required by the function is missing
|
||||
##### ./services/web-servers/apache-httpd/tomcat-connector.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/services/web-servers/apache-httpd/tomcat-connector.nix:1:2':
|
||||
# the argument named `serverInfo' required by the function is missing
|
||||
##### ./services/web-servers/apache-httpd/twiki.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/services/web-servers/apache-httpd/twiki.nix:1:2':
|
||||
# the argument named `serverInfo' required by the function is missing
|
||||
##### ./services/web-servers/apache-httpd/zabbix.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/services/web-servers/apache-httpd/zabbix.nix:1:2':
|
||||
# the argument named `serverInfo' required by the function is missing
|
||||
./services/web-servers/jboss.nix
|
||||
./services/web-servers/tomcat.nix # untested, too lazy to get that jdk
|
||||
./services/web-servers/tomcat.nix
|
||||
./services/x11/xfs.nix
|
||||
./services/x11/xserver/default.nix
|
||||
./services/x11/xserver/desktop-managers/default.nix
|
||||
./services/x11/xserver/desktop-managers/gnome.nix
|
||||
./services/x11/xserver/desktop-managers/kde-environment.nix
|
||||
./services/x11/xserver/desktop-managers/kde.nix
|
||||
./services/x11/xserver/desktop-managers/kde4.nix
|
||||
./services/x11/xserver/desktop-managers/none.nix
|
||||
./services/x11/xserver/desktop-managers/xterm.nix
|
||||
./services/x11/xserver/display-managers/default.nix
|
||||
./services/x11/xserver/display-managers/kdm.nix
|
||||
./services/x11/xserver/display-managers/slim.nix
|
||||
./services/x11/xserver/window-managers/compiz.nix
|
||||
./services/x11/xserver/window-managers/default.nix
|
||||
./services/x11/xserver/window-managers/kwm.nix
|
||||
./services/x11/xserver/window-managers/metacity.nix
|
||||
./services/x11/xserver/window-managers/none.nix
|
||||
./services/x11/xserver/window-managers/twm.nix
|
||||
./services/x11/xserver/window-managers/wmii.nix
|
||||
./services/x11/xserver/window-managers/xmonad.nix
|
||||
./system/activation/activation-script.nix
|
||||
./system/activation/top-level.nix
|
||||
./system/boot/kernel.nix
|
||||
|
@ -84,5 +111,12 @@
|
|||
./system/upstart-events/ctrl-alt-delete.nix
|
||||
./system/upstart-events/halt.nix
|
||||
./system/upstart-events/maintenance-shell.nix
|
||||
##### ./system/upstart/make-job.nix
|
||||
# error: while evaluating the attribute `<let-body>' at `(string):2:8':
|
||||
# while evaluating the function at `(string):3:22':
|
||||
# while evaluating the function at `/trace/nixos/modules/system/upstart/make-job.nix:1:2':
|
||||
# the argument named `runCommand' required by the function is missing
|
||||
./system/upstart/tools.nix
|
||||
./system/upstart/upstart.nix
|
||||
./legacy.nix
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue