diff --git a/Lake/Build/Actions.lean b/Lake/Build/Actions.lean index b37542a63d..c45a7cb940 100644 --- a/Lake/Build/Actions.lean +++ b/Lake/Build/Actions.lean @@ -3,9 +3,8 @@ Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Sebastian Ullrich, Mac Malone -/ -import Lake.Build.Job -import Lake.Config.Env import Lake.Util.Proc +import Lake.Util.NativeLib namespace Lake open System diff --git a/Lake/Config/Env.lean b/Lake/Config/Env.lean index 944d9481b5..6f859eacff 100644 --- a/Lake/Config/Env.lean +++ b/Lake/Config/Env.lean @@ -19,12 +19,6 @@ structure Env where sharedLibPath : SearchPath deriving Inhabited, Repr -/-- Gets a `SearchPath` from an environment variable. -/ -def getSearchPath (envVar : String) : BaseIO SearchPath := do - match (← IO.getEnv envVar) with - | some path => pure <| SearchPath.parse path - | none => pure [] - namespace Env /-- Compute an `Lake.Env` object from the given installs and set environment variables. -/ diff --git a/Lake/Util/NativeLib.lean b/Lake/Util/NativeLib.lean index a6554d2262..672c333748 100644 --- a/Lake/Util/NativeLib.lean +++ b/Lake/Util/NativeLib.lean @@ -34,3 +34,9 @@ def sharedLibPathEnvVar := "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH" + +/-- Gets a `SearchPath` from an environment variable. -/ +def getSearchPath (envVar : String) : BaseIO SearchPath := do + match (← IO.getEnv envVar) with + | some path => pure <| SearchPath.parse path + | none => pure []