@@ -87,8 +87,11 @@ instance Default NixBuildConfig where
8787
8888nixBuild :: MonadObelisk m => NixBuildConfig -> m FilePath
8989nixBuild cfg = withSpinner' ("Running nix-build on " <> desc) (Just $ const $ "Built " <> desc) $ do
90− withNixRemoteCheck $ fmap T.unpack $ readProcessAndLogStderr Debug $ proc "nix-build" $ mconcat
90+ output <- withNixRemoteCheck $ readProcessAndLogStderr Debug $ proc "nix-build" $ mconcat
9191 [[path], attrArg, args, outLink, buildersArg]
92+ -- Remove final newline that Nix appends
93+ Just (outPath, '\n') <- pure $ T.unsnoc output
94+ pure $ T.unpack outPath
9295 where
9396 path = _target_path $ _nixBuildConfig_target cfg
9497 attr = _target_attr $ _nixBuildConfig_target cfg