about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-01 20:47:08 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-01 20:52:06 +0100
commitf3d94cfc23a2787772a369e2ca9e0cd94e72b8b3 (patch)
tree2501bf5c09108c836925aefc4674ebec0b508193 /nixos/modules/installer
parentbf4cafd1ddbd7c396a9df6a5d0fb02f2b7d21896 (diff)
downloadnixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar.gz
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar.bz2
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar.lz
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar.xz
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.tar.zst
nixlib-f3d94cfc23a2787772a369e2ca9e0cd94e72b8b3.zip
Revert "Add the tool "nixos-typecheck" that can check an option declaration to:"
This reverts commit cad8957eabcbf73062226d28366fd446c15c8737. It
breaks NixOps, but more importantly, such major changes to the module
system really need to be reviewed.
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-option.sh4
-rw-r--r--nixos/modules/installer/tools/nixos-typecheck.sh52
-rw-r--r--nixos/modules/installer/tools/tools.nix8
3 files changed, 3 insertions, 61 deletions
diff --git a/nixos/modules/installer/tools/nixos-option.sh b/nixos/modules/installer/tools/nixos-option.sh
index dd21dc71ee2b..17c17d05e288 100644
--- a/nixos/modules/installer/tools/nixos-option.sh
+++ b/nixos/modules/installer/tools/nixos-option.sh
@@ -115,8 +115,8 @@ let
       let name = head attrsNames; rest = tail attrsNames; in
       if isOption result.options then
         walkOptions rest {
-          options = result.options.type.getSubOptionsPrefix "";
-          opt = ''(\${result.opt}.type.getSubOptionsPrefix "")'';
+          options = result.options.type.getSubOptions "";
+          opt = ''(\${result.opt}.type.getSubOptions "")'';
           cfg = ''\${result.cfg}."\${name}"'';
         }
       else
diff --git a/nixos/modules/installer/tools/nixos-typecheck.sh b/nixos/modules/installer/tools/nixos-typecheck.sh
deleted file mode 100644
index f9557be0c50e..000000000000
--- a/nixos/modules/installer/tools/nixos-typecheck.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-#! @shell@
-
-if [ -x "@shell@" ]; then export SHELL="@shell@"; fi;
-
-set -e
-
-showSyntax() {
-cat >&1 << EOF
-nixos-typecheck
-usage:
-  nixos-typecheck [action] [args]
-where:
-  action = silent | printAll | printUnspecified | getSpecs
-    with default action: printUnspecified
-  args = any argument supported by nix-build
-EOF
-}
-
-
-# Parse the command line.
-extraArgs=()
-action=printUnspecified
-
-while [ "$#" -gt 0 ]; do
-    i="$1"; shift 1
-    case "$i" in
-      --help)
-        showSyntax
-        ;;
-      silent|printAll|printUnspecified|getSpecs)
-        action="$i"
-        ;;
-      *)
-        extraArgs="$extraArgs $i"
-        ;;
-    esac
-done
-
-
-if [ "$action" = silent ]; then
-    nix-build --no-out-link '<nixpkgs/nixos>' -A typechecker.silent $extraArgs
-elif [ "$action" = printAll ]; then
-    nix-build --no-out-link '<nixpkgs/nixos>' -A typechecker.printAll $extraArgs
-elif [ "$action" = printUnspecified ]; then
-    nix-build --no-out-link '<nixpkgs/nixos>' -A typechecker.printUnspecified $extraArgs
-elif [ "$action" = getSpecs ]; then
-    ln -s $(nix-build --no-out-link '<nixpkgs/nixos>' -A typechecker.specifications $extraArgs)/share/doc/nixos/options-specs.json specifications.json
-else
-    showSyntax
-    exit 1
-fi
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index 69bd0d26b773..9ac3b7a5b16f 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -54,11 +54,6 @@ let
     inherit (config.system) nixosVersion nixosCodeName nixosRevision;
   };
 
-  nixos-typecheck = makeProg {
-    name = "nixos-typecheck";
-    src = ./nixos-typecheck.sh;
-  };
-
 in
 
 {
@@ -72,11 +67,10 @@ in
         nixos-generate-config
         nixos-option
         nixos-version
-        nixos-typecheck
       ];
 
     system.build = {
-      inherit nixos-install nixos-generate-config nixos-option nixos-rebuild nixos-typecheck;
+      inherit nixos-install nixos-generate-config nixos-option nixos-rebuild;
     };
 
   };