diff --git a/maintainers/scripts/gen-module-list.sh b/maintainers/scripts/gen-module-list.sh index c63d1a69521..e964f11edd1 100755 --- a/maintainers/scripts/gen-module-list.sh +++ b/maintainers/scripts/gen-module-list.sh @@ -30,19 +30,31 @@ is_module(){ " | nix-instantiate - --eval-only } +find_mask(){ + local maskfile="$1" + if test -r "${maskfile}"; then + cat "${maskfile}" + echo + echo "./module-list.nix" + else + echo "./module-list.nix" + fi | \ + sed -ne 's/[ ]*#.*//; /^[ ]*$/ d; s/\(.*\)/-wholename '"'\1'"' -or /p' | tr -d '\n' +} + generate_index(){ local path="$1" cd "$path" echo -n "$path: " 1>&2 { echo "[ # This file has been generated by $(basename $prog)"; - for file in : $(find ./ -wholename '*.impl[./]*' -or -wholename './module-list.nix' -or -type f -name '*.nix' -print | sort); do + for file in : $(eval find ./ $(find_mask ./module-list.mask) -type f -name "'*.nix'" -print | sort); 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/^/# /' + is_module "$file" 2>&1 | sed "s/^/# /; s,$(pwd),.," fi done echo ']'; diff --git a/modules/module-list.mask b/modules/module-list.mask new file mode 100644 index 00000000000..10e9f58925e --- /dev/null +++ b/modules/module-list.mask @@ -0,0 +1,4 @@ +# CD-DVD modules are not generic. +# Avoid all modules from ./installer/cd-dvd/ + +./installer/cd-dvd/* diff --git a/modules/module-list.nix b/modules/module-list.nix index c6b2d930e5c..7bdb0d685dc 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -76,27 +76,27 @@ ##### ./services/web-servers/apache-httpd/per-server-options.nix # error: while evaluating the attribute `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/services/web-servers/apache-httpd/per-server-options.nix:6:2': +# while evaluating the function at `./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 `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/services/web-servers/apache-httpd/subversion.nix:1:2': +# while evaluating the function at `./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 `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/services/web-servers/apache-httpd/tomcat-connector.nix:1:2': +# while evaluating the function at `./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 `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/services/web-servers/apache-httpd/twiki.nix:1:2': +# while evaluating the function at `./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 `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/services/web-servers/apache-httpd/zabbix.nix:1:2': +# while evaluating the function at `./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 @@ -129,7 +129,7 @@ ##### ./system/etc/make-etc.nix # error: while evaluating the attribute `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/system/etc/make-etc.nix:1:2': +# while evaluating the function at `./system/etc/make-etc.nix:1:2': # the argument named `stdenv' required by the function is missing ./system/upstart-events/ctrl-alt-delete.nix ./system/upstart-events/halt.nix @@ -137,7 +137,7 @@ ##### ./system/upstart/make-job.nix # error: while evaluating the attribute `' at `(string):2:8': # while evaluating the function at `(string):3:22': -# while evaluating the function at `/home/eelco/Dev/modular-nixos/modules/system/upstart/make-job.nix:1:2': +# while evaluating the function at `./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