about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-20T20·44+0000
committerVincent Ambo <tazjin@google.com>2019-12-20T20·44+0000
commita65cb502520d09353295a3d10c6203e3273be70f (patch)
treecc419f29713c4a53c5698e942d46e7ca9e8f0046
parent61c8ac433878ea34f5bfb4232143ad43f4af2df2 (diff)
fix: Various minor fixes for new repository layout r/240
-rwxr-xr-xbin/__dispatch.sh2
-rw-r--r--default.nix2
-rw-r--r--read-tree.nix2
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/__dispatch.sh b/bin/__dispatch.sh
index d502a9dfaf..ffb4605fd4 100755
--- a/bin/__dispatch.sh
+++ b/bin/__dispatch.sh
@@ -6,7 +6,7 @@
 # to the key in nixpkgs which represents the program you want to run.
 set -ueo pipefail
 
-readonly REPO_ROOT=$(dirname $0)/../..
+readonly REPO_ROOT=$(dirname $0)/..
 TARGET_TOOL=$(basename $0)
 
 case "${TARGET_TOOL}" in
diff --git a/default.nix b/default.nix
index 34fd8dea2e..f638b8f2b0 100644
--- a/default.nix
+++ b/default.nix
@@ -29,7 +29,7 @@ let
   readTree' = import ./read-tree.nix;
 
   localPkgs = readTree: {
-    fun         = readTree ./ops;
+    fun         = readTree ./fun;
     nix         = readTree ./nix;
     ops         = readTree ./ops;
     third_party = readTree ./third_party;
diff --git a/read-tree.nix b/read-tree.nix
index 82d5f040b2..052865914e 100644
--- a/read-tree.nix
+++ b/read-tree.nix
@@ -56,6 +56,6 @@ let
         value = importWithMark p (parts ++ [ c ]);
       }) nixFiles;
     in if dir ? "default.nix"
-      then self // (listToAttrs children)
+      then (if isAttrs self then self // (listToAttrs children) else self)
       else listToAttrs (nixChildren ++ children);
 in readTree initPath [ (baseNameOf initPath) ]