--- tools/nuke.orig	2017-04-14 23:02:41.000000000 -0500
+++ tools/nuke	2017-11-26 09:46:44.000000000 -0600
@@ -274,18 +274,7 @@
      momc)
 
 (function select-compiler ()
-     (ifDarwin
-              ;; clang built-in to 10.7.3
-              (set clang "/usr/bin/clang")
-              (if (not (NSFileManager fileExistsNamed:clang))
-                  ;; use xcode-select to get from e.g. /Developer or Xcode.app
-                  (set DEVROOT (NSString stringWithShellCommand:"xcode-select -print-path"))
-                  (set clang "#{DEVROOT}/usr/bin/clang")
-                  (if (not (NSFileManager fileExistsNamed:clang))
-                      (set clang nil))))
-     (ifLinux (set clang "/usr/bin/clang"))
-     ;; default to gcc
-     (if clang clang (else "gcc")))
+     "@CC@")
 
 (function select-debugger ()
      (if (command-exists "lldb") "lldb" (else "gdb")))
@@ -559,7 +548,7 @@
                     (set @arch (list (NSString stringWithShellCommand:"arch"))))
             
             (ifDarwin
-                     (then (set FRAMEWORK_ROOT "/Library/Frameworks"))
+                     (then (set FRAMEWORK_ROOT "@FRAMEWORKS_DIR@"))
                      (else (set FRAMEWORK_ROOT "/usr/local/frameworks")))
             
             ;; framework directory tasks
@@ -586,6 +575,7 @@
             
             ;; framework architecture-specific executable
             (set @framework_executables (NSMutableArray array))
+            (set @framework_install_path "#{FRAMEWORK_ROOT}")
             (@arch each:
                    (do (architecture)
                        (set framework_executable "build/#{architecture}/framework-#{@framework}")
@@ -714,7 +704,7 @@
                       (@framework_extra_install))
                   (SH "sudo mkdir -p #{FRAMEWORK_ROOT}")
                   (SH "sudo rm -rf #{FRAMEWORK_ROOT}/#{@framework}.framework")
-                  (SH "sudo cp -rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
+                  (SH "sudo cp -Rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
             
             (task "test" => "framework" is
                   (SH "nutest test/test_*.nu"))
